@sync-in/server 1.5.0 → 1.5.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/package.json +2 -2
  3. package/static/{chunk-IPSMJHMQ.js → chunk-2R6HHGUR.js} +1 -1
  4. package/static/{chunk-FR4AOLYL.js → chunk-4U5A2DEP.js} +1 -1
  5. package/static/{chunk-45UQJGGY.js → chunk-54EAZ2UD.js} +1 -1
  6. package/static/{chunk-KGPCIUD2.js → chunk-6OJZWYRZ.js} +1 -1
  7. package/static/{chunk-CK4BY2NX.js → chunk-7VRUZRJG.js} +1 -1
  8. package/static/{chunk-RASR4CK6.js → chunk-7ZRXJONB.js} +1 -1
  9. package/static/{chunk-IML5UYQG.js → chunk-CRQNEHTX.js} +1 -1
  10. package/static/{chunk-OEFBC4GG.js → chunk-F2J2IIJE.js} +1 -1
  11. package/static/{chunk-HYMDGBZL.js → chunk-FNFGUIQH.js} +1 -1
  12. package/static/{chunk-2UWN7IQF.js → chunk-GGLK52CG.js} +1 -1
  13. package/static/{chunk-SBOQGGZX.js → chunk-HX6BBYVD.js} +1 -1
  14. package/static/{chunk-RFMOUC22.js → chunk-IZL7JPTS.js} +1 -1
  15. package/static/{chunk-ENWABUR4.js → chunk-JF7S3UYQ.js} +1 -1
  16. package/static/{chunk-XTYGMF2V.js → chunk-JYXLQRHG.js} +1 -1
  17. package/static/{chunk-P734A3XZ.js → chunk-KSHPKI4G.js} +1 -1
  18. package/static/{chunk-CSBDAY77.js → chunk-L6MU6S2V.js} +1 -1
  19. package/static/{chunk-SJAFPXQV.js → chunk-LLWSLOSX.js} +1 -1
  20. package/static/{chunk-YGD22MWQ.js → chunk-MCLQFZ3S.js} +1 -1
  21. package/static/{chunk-YCWMV2YR.js → chunk-MGGT6MIJ.js} +1 -1
  22. package/static/{chunk-JVCWYSNP.js → chunk-MRSWNAVB.js} +1 -1
  23. package/static/{chunk-EILQG525.js → chunk-MVO4WZLK.js} +1 -1
  24. package/static/{chunk-NPEMJJIU.js → chunk-NE4NDO45.js} +1 -1
  25. package/static/{chunk-2VSPDSJS.js → chunk-SPTF6FSM.js} +1 -1
  26. package/static/{chunk-5TEXH3LJ.js → chunk-VJRTMDEJ.js} +1 -1
  27. package/static/{chunk-66FMKVJX.js → chunk-VPJ2V27B.js} +1 -1
  28. package/static/{chunk-34UZ7SYI.js → chunk-VUI3KV7V.js} +1 -1
  29. package/static/{chunk-KQZJSEM3.js → chunk-WI7FOANP.js} +1 -1
  30. package/static/{chunk-ZVY37DKS.js → chunk-YJMN3B4N.js} +1 -1
  31. package/static/{chunk-CXXPLBDZ.js → chunk-ZXS4V7J2.js} +1 -1
  32. package/static/index.html +1 -1
  33. package/static/main-FFIWFD2F.js +7 -0
  34. package/static/main-N5CZRHAO.js +0 -7
@@ -1 +1 @@
1
- import{Sb as de,Ya as me,wb as fe}from"./chunk-FR4AOLYL.js";import{Cb as H,Eb as I,Ed as ae,Fb as G,Gb as X,Ib as v,J as b,Jb as C,Ka as Q,Kb as y,Ma as T,N as F,Qa as Z,T as L,X as V,Xa as w,Z as z,Zc as ie,_a as $,ad as se,bb as _,cb as j,dc as ee,ed as oe,f as W,fc as te,ha as c,jb as q,kb as K,kf as ce,ma as M,md as ne,na as x,p as k,pb as R,qb as O,rb as P,ta as A,tb as J,ub as Y,ud as re,va as N,vb as U,xd as le,ya as E,yd as he,zb as D}from"./chunk-HW2H3ISM.js";var ve=["iFilter"];function Ce(r,i){if(r&1){let m=D();O(0,"span",3)(1,"fa-icon",4),H("click",function(){M(m);let e=I();return x(e.clear())}),P()()}if(r&2){let m=I();T(),R("icon",m.faTimes)}}var De=(()=>{let i=class i{constructor(){this.search=A(""),this.locale=c(he),this.faTimes=ce,this.fb=c(re),this.searchControl=this.fb.control(""),this.subscription=this.searchControl.valueChanges.pipe(b(300),F()).subscribe(t=>this.onType(t))}ngOnDestroy(){this.subscription.unsubscribe()}onKeyPress(t){(t.ctrlKey||t.metaKey)&&t.keyCode===70?(t.preventDefault(),t.stopPropagation(),this.iFilter.nativeElement.focus()):t.keyCode===27&&(t.preventDefault(),t.stopPropagation())}clear(){this.searchControl&&(this.searchControl.reset(),this.iFilter.nativeElement.value="")}onType(t){this.search.set(t)}};i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=w({type:i,selectors:[["app-input-filter"]],viewQuery:function(e,s){if(e&1&&v(ve,7),e&2){let o;C(o=y())&&(s.iFilter=o.first)}},hostBindings:function(e,s){e&1&&H("keydown",function(h){return s.onKeyPress(h)},Q)},decls:5,vars:6,consts:[["iFilter",""],[1,"btn-group",2,"height","30px","max-width","150px"],["type","text",1,"form-control","form-control-sm",2,"padding-right","24px",3,"keyup.escape","placeholder","formControl"],[1,"cursor-pointer",2,"position","absolute","right","5px","top","3px","z-index","1001","font-size","1rem"],["role","button",3,"click","icon"]],template:function(e,s){if(e&1){let o=D();O(0,"div",1)(1,"input",2,0),ee(3,"translate"),H("keyup.escape",function(){return M(o),x(s.clear())}),P(),q(4,Ce,2,1,"span",3),P()}e&2&&(T(),R("placeholder",te(3,3,"Filter",s.locale.language))("formControl",s.searchControl),T(3),K(s.search()?4:-1))},dependencies:[le,se,oe,ne,ie,ae],encapsulation:2});let r=i;return r})();var ye=["content"],Se=["shim"],be=["*"],Qe=(()=>{let i=class i{constructor(){this.isScrollBottom=new _,this.isScrollTop=new _,this.resizeOffset=130,this.galleryMode=!1,this.selectedChat=null,this.items=[],this.childHeight=35,this.bufferAmount=0,this.viewPortItems=[],this.element=c(E),this.renderer=c(Z),this.ngZone=c(j),this.layout=c(fe),this.subscriptions=[],this.scrollbarWidth=0,this._scrollChat=new W,this.scrollChat=this._scrollChat.asObservable().pipe(b(50)),this.startupLoop=!0,this.scrollTimer=null,this.lastScrollHeight=-1,this.lastTopPadding=-1,this.toggleLeftSidebar=this.layout.toggleLeftSideBar.pipe(V(1),z(t=>k(t).pipe(L({count:30,delay:10})))),this.tableScrollHovering=()=>{clearTimeout(this.scrollTimer),this.contentElementRef.nativeElement.classList.contains("table-disable-hover")||this.renderer.addClass(this.contentElementRef.nativeElement,"table-disable-hover"),this.scrollTimer=setTimeout(()=>{this.renderer.removeClass(this.contentElementRef.nativeElement,"table-disable-hover")},200),this.refresh()},this.refreshWithDimensions=()=>{this.resizeOffsetHeight(),this.refresh(!0)},this.refreshWithoutDimensions=()=>{this.refresh()},this.refreshChatWithoutDimensions=()=>{this.chatIsScrolledToTop()&&!this.selectedChat.allHistoryLoaded?this.element.nativeElement.scrollTo({left:0,top:this.element.nativeElement.scrollTop,behavior:"auto"}):(this.refreshWithoutDimensions(),this._scrollChat.next())},this.refreshChatWithDimensions=()=>{this.resizeOffsetHeight(),this.refresh(!0),this.selectedChat.isScrolledToBottom?this.scrollInto(-2):this._scrollChat.next()}}ngOnInit(){this.resizeOffsetHeight(!0),this.addParentEventHandlers(),this.selectedChat?(this.childHeight=1,this.subscriptions.push(this.scrollChat.subscribe(()=>this.checkScrollChat()))):this.galleryMode||this.subscriptions.push(this.toggleLeftSidebar.subscribe(()=>this.resizeTableHeader()))}ngOnDestroy(){this.eventScrollHandler&&(this.eventScrollHandler(),this.eventScrollHandler=void 0),this.subscriptions.forEach(t=>t.unsubscribe())}ngOnChanges(t){if(this.previousStart=void 0,this.previousEnd=void 0,this.galleryMode)this.startupLoop=!0;else{let e=t.items||void 0;(t.items!==void 0&&e.previousValue===void 0||e.previousValue!==void 0&&e.previousValue.length===0)&&(this.startupLoop=!0)}this.refresh(!0),this.checkChangesOnChat(t)}refresh(t=!1){this.ngZone.runOutsideAngular(()=>{(t||!this.dimensionsView)&&this.calculateDimensions(),requestAnimationFrame(()=>this.calculateItems())}),this.resizeTableHeader()}scrollInto(t){if(t===-1){this.element.nativeElement.scrollTo({left:0,top:0,behavior:"auto"});return}else if(t===-2){this.element.nativeElement.scrollTo({left:0,top:this.element.nativeElement.scrollHeight,behavior:"smooth"});return}else if(t===0){this.refresh();return}let e=(this.items||[]).indexOf(t);if(e<0||e>=(this.items||[]).length)return;let s=this.dimensionsView,o=Math.floor(e/s.itemsPerRow)*s.childHeight-s.childHeight*Math.min(e,this.bufferAmount);this.element.nativeElement.scrollTo({left:0,top:o,behavior:"smooth"}),this.refresh()}checkChangesOnChat(t){this.selectedChat&&(t.selectedChat?(this.renderer.setStyle(this.element.nativeElement,"visibility","hidden"),setTimeout(()=>{this.selectedChat.lastScrollPosition===null&&this.saveChatScrollPosition(this.element.nativeElement.scrollHeight),this.element.nativeElement.scrollTo({left:0,top:this.selectedChat.lastScrollPosition,behavior:"auto"}),this.checkScrollChat(),this.renderer.setStyle(this.element.nativeElement,"visibility","visible")},50)):this.chatIsScrolledToBottom()?this.restoreBottomScrollChat():this.chatIsScrolledToTop()&&this.restoreTopScrollChat())}checkScrollChat(){let t=this.chatIsScrolledToBottom(),e=this.chatIsScrolledToTop();e?this.saveChatScrollPosition(this.element.nativeElement.scrollHeight-this.element.nativeElement.scrollTop):t?this.saveChatScrollPosition(this.element.nativeElement.scrollHeight):this.saveChatScrollPosition(),this.ngZone.run(()=>{this.isScrollBottom.next(t),this.isScrollTop.next(e)})}saveChatScrollPosition(t=null){this.selectedChat.lastScrollPosition=t||this.element.nativeElement.scrollTop}chatIsScrolledToBottom(){return Math.ceil(this.element.nativeElement.clientHeight/10)*10===Math.ceil((this.element.nativeElement.scrollHeight-this.element.nativeElement.scrollTop)/10)*10}chatIsScrolledToTop(){return this.element.nativeElement.scrollTop<=300}restoreBottomScrollChat(){setTimeout(()=>{this.element.nativeElement.scrollTo({left:0,top:this.element.nativeElement.scrollHeight,behavior:"smooth"})},50)}restoreTopScrollChat(){setTimeout(()=>{this.element.nativeElement.scrollTop=this.element.nativeElement.scrollHeight-this.selectedChat.lastScrollPosition},50)}resizeOffsetHeight(t=!1){let e=window.innerHeight-this.resizeOffset;(t||this.element.nativeElement.offsetHeight!==e)&&this.renderer.setStyle(this.element.nativeElement,"height",`${e-1}px`)}resizeTableHeader(){!this.selectedChat&&!this.galleryMode&&this.element.nativeElement.previousElementSibling&&this.element.nativeElement.previousElementSibling.classList.contains("app-table")&&setTimeout(()=>this.renderer.setStyle(this.element.nativeElement.previousElementSibling,"width",`${this.element.nativeElement.clientWidth}px`),50)}addParentEventHandlers(){this.ngZone.runOutsideAngular(()=>{this.galleryMode?this.eventScrollHandler=this.renderer.listen(this.element.nativeElement,"scroll",this.refreshWithoutDimensions):this.selectedChat?this.eventScrollHandler=this.renderer.listen(this.element.nativeElement,"scroll",this.refreshChatWithoutDimensions):this.eventScrollHandler=this.renderer.listen(this.element.nativeElement,"scroll",this.tableScrollHovering),this.selectedChat?this.subscriptions.push(this.layout.resizeEvent.subscribe(()=>this.refreshChatWithDimensions())):this.subscriptions.push(this.layout.resizeEvent.subscribe(()=>this.refreshWithDimensions()))})}countItemsPerRow(){if(this.galleryMode){let t,e,s=this.contentElementRef.nativeElement.children;for(s[0]&&(s=s[0].children),e=0;e<s.length&&!(t!==void 0&&t!==s[e].offsetTop);e++)t=s[e].offsetTop;return e}else return 1}calculateDimensions(){let t=this.element.nativeElement,e=t.offsetWidth-t.clientWidth;this.scrollbarWidth!=e&&(this.resizeTableHeader(),this.scrollbarWidth=e);let o=(this.items||[]).length,h=t.clientWidth-this.scrollbarWidth,S=t.clientHeight,f;if(this.childWidth===void 0||this.childHeight===void 0){let B=this.contentElementRef.nativeElement;f=B.children[0]?B.children[0].getBoundingClientRect():{width:h,height:S}}let n=this.childWidth||f.width,d=this.childHeight||f.height,a=this.countItemsPerRow(),u=Math.max(1,Math.floor(h/n));this.galleryMode&&a===0?a=u:a=Math.max(1,a);let l=Math.max(1,Math.floor(S/d)),p=t.scrollTop,ge=Math.max(0,p),g=d*Math.ceil(o/a);l===1&&Math.floor(ge/g*o)+u>=o&&(a=u),g!==this.lastScrollHeight&&(this.renderer.setStyle(this.shimElementRef.nativeElement,"height",`${g}px`),this.lastScrollHeight=g),this.dimensionsView={itemCount:o,viewWidth:h,viewHeight:S,childWidth:n,childHeight:d,itemsPerRow:a,itemsPerCol:l,itemsPerRowByCalc:u,scrollHeight:g}}calculateItems(){let t=this.element.nativeElement,e=this.dimensionsView,s=this.items||[],o=this.galleryMode?this.bufferAmount*e.itemsPerRowByCalc:this.bufferAmount,h=t.scrollTop;h>e.scrollHeight&&(h=e.scrollHeight);let f=Math.max(0,h)/e.scrollHeight*e.itemCount/e.itemsPerRow,n=Math.min(e.itemCount,Math.ceil(f)*e.itemsPerRow+e.itemsPerRow*(e.itemsPerCol+1)),d=n,a=n%e.itemsPerRow;a&&(d=n+e.itemsPerRow-a);let u=Math.max(0,d-e.itemsPerCol*e.itemsPerRow-e.itemsPerRow),l=Math.min(u,Math.floor(f)*e.itemsPerRow),p=s==null||s.length===0?0:e.childHeight*Math.ceil(l/e.itemsPerRow)-e.childHeight*Math.min(l,this.bufferAmount);p!==this.lastTopPadding&&(this.renderer.setStyle(this.contentElementRef.nativeElement,"transform",`translateY(${p}px)`),this.renderer.setStyle(this.contentElementRef.nativeElement,"webkitTransform",`translateY(${p}px)`),this.lastTopPadding=p),l=isNaN(l)?-1:l,n=isNaN(n)?-1:n,l-=o,l=Math.max(0,l),n+=o,n=Math.min(s.length,n),l!==this.previousStart||n!==this.previousEnd?(this.ngZone.run(()=>{this.viewPortItems=s.slice(l,n>=0?n:0)}),this.previousStart=l,this.previousEnd=n,this.startupLoop===!0&&this.refresh()):this.startupLoop===!0&&(this.startupLoop=!1,this.refresh(!0))}};i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=w({type:i,selectors:[["app-virtual-scroll"]],viewQuery:function(e,s){if(e&1&&(v(ye,7,E),v(Se,7,E)),e&2){let o;C(o=y())&&(s.contentElementRef=o.first),C(o=y())&&(s.shimElementRef=o.first)}},inputs:{resizeOffset:"resizeOffset",galleryMode:"galleryMode",selectedChat:"selectedChat",items:"items",childHeight:"childHeight",childWidth:"childWidth",bufferAmount:"bufferAmount"},outputs:{isScrollBottom:"isScrollBottom",isScrollTop:"isScrollTop"},features:[N],ngContentSelectors:be,decls:5,vars:0,consts:[["shim",""],["content",""],[1,"total-padding"],[1,"scrollable-content"]],template:function(e,s){e&1&&(G(),U(0,"div",2,0),J(2,"div",3,1),X(4),Y())},styles:["[_nghost-%COMP%]{display:block;overflow-x:hidden;overflow-y:auto;position:relative;scrollbar-width:thin}.scrollable-content[_ngcontent-%COMP%]{top:0;left:0;width:100%;position:absolute;will-change:transform}.total-padding[_ngcontent-%COMP%]{width:1px;opacity:0}"],changeDetection:0});let r=i;return r})();var je=(()=>{let i=class i{transform(t,e,s){return!t?.length||!e?t:me(e,t,s)}};i.\u0275fac=function(e){return new(e||i)},i.\u0275pipe=$({name:"searchFilter",type:i,pure:!0});let r=i;return r})();var pe=class{constructor(i,m){this.defaultId="default",this.keyStore=`sortBy${i}`,this.sortSettings=m,this._sortParam=this.sort}get sortParam(){return this._sortParam||this.sort}get sort(){let i=localStorage.getItem(this.keyStore);return i?JSON.parse(i):{column:this.defaultId,asc:!1}}set sort(i){this._sortParam=i,localStorage.setItem(this.keyStore,JSON.stringify(i))}sortBy(i,m=!0,t){if(!(i in this.sortSettings))return t;m&&(this.sortParam.asc?(this.sortParam.column=this.defaultId,this.sortParam.asc=!1,i=this.defaultId):this.sortParam.column===i?this.sortParam.asc=!this.sortParam.asc:(this.sortParam.column=i,this.sortParam.asc=!1),this.sort=this.sortParam);for(let e of this.sortSettings[i])de(e.type,t,e.prop,i===this.defaultId?!1:this.sortParam.asc);return[...t]}};export{De as a,Qe as b,je as c,pe as d};
1
+ import{Sb as de,Ya as me,wb as fe}from"./chunk-4U5A2DEP.js";import{Cb as H,Eb as I,Ed as ae,Fb as G,Gb as X,Ib as v,J as b,Jb as C,Ka as Q,Kb as y,Ma as T,N as F,Qa as Z,T as L,X as V,Xa as w,Z as z,Zc as ie,_a as $,ad as se,bb as _,cb as j,dc as ee,ed as oe,f as W,fc as te,ha as c,jb as q,kb as K,kf as ce,ma as M,md as ne,na as x,p as k,pb as R,qb as O,rb as P,ta as A,tb as J,ub as Y,ud as re,va as N,vb as U,xd as le,ya as E,yd as he,zb as D}from"./chunk-HW2H3ISM.js";var ve=["iFilter"];function Ce(r,i){if(r&1){let m=D();O(0,"span",3)(1,"fa-icon",4),H("click",function(){M(m);let e=I();return x(e.clear())}),P()()}if(r&2){let m=I();T(),R("icon",m.faTimes)}}var De=(()=>{let i=class i{constructor(){this.search=A(""),this.locale=c(he),this.faTimes=ce,this.fb=c(re),this.searchControl=this.fb.control(""),this.subscription=this.searchControl.valueChanges.pipe(b(300),F()).subscribe(t=>this.onType(t))}ngOnDestroy(){this.subscription.unsubscribe()}onKeyPress(t){(t.ctrlKey||t.metaKey)&&t.keyCode===70?(t.preventDefault(),t.stopPropagation(),this.iFilter.nativeElement.focus()):t.keyCode===27&&(t.preventDefault(),t.stopPropagation())}clear(){this.searchControl&&(this.searchControl.reset(),this.iFilter.nativeElement.value="")}onType(t){this.search.set(t)}};i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=w({type:i,selectors:[["app-input-filter"]],viewQuery:function(e,s){if(e&1&&v(ve,7),e&2){let o;C(o=y())&&(s.iFilter=o.first)}},hostBindings:function(e,s){e&1&&H("keydown",function(h){return s.onKeyPress(h)},Q)},decls:5,vars:6,consts:[["iFilter",""],[1,"btn-group",2,"height","30px","max-width","150px"],["type","text",1,"form-control","form-control-sm",2,"padding-right","24px",3,"keyup.escape","placeholder","formControl"],[1,"cursor-pointer",2,"position","absolute","right","5px","top","3px","z-index","1001","font-size","1rem"],["role","button",3,"click","icon"]],template:function(e,s){if(e&1){let o=D();O(0,"div",1)(1,"input",2,0),ee(3,"translate"),H("keyup.escape",function(){return M(o),x(s.clear())}),P(),q(4,Ce,2,1,"span",3),P()}e&2&&(T(),R("placeholder",te(3,3,"Filter",s.locale.language))("formControl",s.searchControl),T(3),K(s.search()?4:-1))},dependencies:[le,se,oe,ne,ie,ae],encapsulation:2});let r=i;return r})();var ye=["content"],Se=["shim"],be=["*"],Qe=(()=>{let i=class i{constructor(){this.isScrollBottom=new _,this.isScrollTop=new _,this.resizeOffset=130,this.galleryMode=!1,this.selectedChat=null,this.items=[],this.childHeight=35,this.bufferAmount=0,this.viewPortItems=[],this.element=c(E),this.renderer=c(Z),this.ngZone=c(j),this.layout=c(fe),this.subscriptions=[],this.scrollbarWidth=0,this._scrollChat=new W,this.scrollChat=this._scrollChat.asObservable().pipe(b(50)),this.startupLoop=!0,this.scrollTimer=null,this.lastScrollHeight=-1,this.lastTopPadding=-1,this.toggleLeftSidebar=this.layout.toggleLeftSideBar.pipe(V(1),z(t=>k(t).pipe(L({count:30,delay:10})))),this.tableScrollHovering=()=>{clearTimeout(this.scrollTimer),this.contentElementRef.nativeElement.classList.contains("table-disable-hover")||this.renderer.addClass(this.contentElementRef.nativeElement,"table-disable-hover"),this.scrollTimer=setTimeout(()=>{this.renderer.removeClass(this.contentElementRef.nativeElement,"table-disable-hover")},200),this.refresh()},this.refreshWithDimensions=()=>{this.resizeOffsetHeight(),this.refresh(!0)},this.refreshWithoutDimensions=()=>{this.refresh()},this.refreshChatWithoutDimensions=()=>{this.chatIsScrolledToTop()&&!this.selectedChat.allHistoryLoaded?this.element.nativeElement.scrollTo({left:0,top:this.element.nativeElement.scrollTop,behavior:"auto"}):(this.refreshWithoutDimensions(),this._scrollChat.next())},this.refreshChatWithDimensions=()=>{this.resizeOffsetHeight(),this.refresh(!0),this.selectedChat.isScrolledToBottom?this.scrollInto(-2):this._scrollChat.next()}}ngOnInit(){this.resizeOffsetHeight(!0),this.addParentEventHandlers(),this.selectedChat?(this.childHeight=1,this.subscriptions.push(this.scrollChat.subscribe(()=>this.checkScrollChat()))):this.galleryMode||this.subscriptions.push(this.toggleLeftSidebar.subscribe(()=>this.resizeTableHeader()))}ngOnDestroy(){this.eventScrollHandler&&(this.eventScrollHandler(),this.eventScrollHandler=void 0),this.subscriptions.forEach(t=>t.unsubscribe())}ngOnChanges(t){if(this.previousStart=void 0,this.previousEnd=void 0,this.galleryMode)this.startupLoop=!0;else{let e=t.items||void 0;(t.items!==void 0&&e.previousValue===void 0||e.previousValue!==void 0&&e.previousValue.length===0)&&(this.startupLoop=!0)}this.refresh(!0),this.checkChangesOnChat(t)}refresh(t=!1){this.ngZone.runOutsideAngular(()=>{(t||!this.dimensionsView)&&this.calculateDimensions(),requestAnimationFrame(()=>this.calculateItems())}),this.resizeTableHeader()}scrollInto(t){if(t===-1){this.element.nativeElement.scrollTo({left:0,top:0,behavior:"auto"});return}else if(t===-2){this.element.nativeElement.scrollTo({left:0,top:this.element.nativeElement.scrollHeight,behavior:"smooth"});return}else if(t===0){this.refresh();return}let e=(this.items||[]).indexOf(t);if(e<0||e>=(this.items||[]).length)return;let s=this.dimensionsView,o=Math.floor(e/s.itemsPerRow)*s.childHeight-s.childHeight*Math.min(e,this.bufferAmount);this.element.nativeElement.scrollTo({left:0,top:o,behavior:"smooth"}),this.refresh()}checkChangesOnChat(t){this.selectedChat&&(t.selectedChat?(this.renderer.setStyle(this.element.nativeElement,"visibility","hidden"),setTimeout(()=>{this.selectedChat.lastScrollPosition===null&&this.saveChatScrollPosition(this.element.nativeElement.scrollHeight),this.element.nativeElement.scrollTo({left:0,top:this.selectedChat.lastScrollPosition,behavior:"auto"}),this.checkScrollChat(),this.renderer.setStyle(this.element.nativeElement,"visibility","visible")},50)):this.chatIsScrolledToBottom()?this.restoreBottomScrollChat():this.chatIsScrolledToTop()&&this.restoreTopScrollChat())}checkScrollChat(){let t=this.chatIsScrolledToBottom(),e=this.chatIsScrolledToTop();e?this.saveChatScrollPosition(this.element.nativeElement.scrollHeight-this.element.nativeElement.scrollTop):t?this.saveChatScrollPosition(this.element.nativeElement.scrollHeight):this.saveChatScrollPosition(),this.ngZone.run(()=>{this.isScrollBottom.next(t),this.isScrollTop.next(e)})}saveChatScrollPosition(t=null){this.selectedChat.lastScrollPosition=t||this.element.nativeElement.scrollTop}chatIsScrolledToBottom(){return Math.ceil(this.element.nativeElement.clientHeight/10)*10===Math.ceil((this.element.nativeElement.scrollHeight-this.element.nativeElement.scrollTop)/10)*10}chatIsScrolledToTop(){return this.element.nativeElement.scrollTop<=300}restoreBottomScrollChat(){setTimeout(()=>{this.element.nativeElement.scrollTo({left:0,top:this.element.nativeElement.scrollHeight,behavior:"smooth"})},50)}restoreTopScrollChat(){setTimeout(()=>{this.element.nativeElement.scrollTop=this.element.nativeElement.scrollHeight-this.selectedChat.lastScrollPosition},50)}resizeOffsetHeight(t=!1){let e=window.innerHeight-this.resizeOffset;(t||this.element.nativeElement.offsetHeight!==e)&&this.renderer.setStyle(this.element.nativeElement,"height",`${e-1}px`)}resizeTableHeader(){!this.selectedChat&&!this.galleryMode&&this.element.nativeElement.previousElementSibling&&this.element.nativeElement.previousElementSibling.classList.contains("app-table")&&setTimeout(()=>this.renderer.setStyle(this.element.nativeElement.previousElementSibling,"width",`${this.element.nativeElement.clientWidth}px`),50)}addParentEventHandlers(){this.ngZone.runOutsideAngular(()=>{this.galleryMode?this.eventScrollHandler=this.renderer.listen(this.element.nativeElement,"scroll",this.refreshWithoutDimensions):this.selectedChat?this.eventScrollHandler=this.renderer.listen(this.element.nativeElement,"scroll",this.refreshChatWithoutDimensions):this.eventScrollHandler=this.renderer.listen(this.element.nativeElement,"scroll",this.tableScrollHovering),this.selectedChat?this.subscriptions.push(this.layout.resizeEvent.subscribe(()=>this.refreshChatWithDimensions())):this.subscriptions.push(this.layout.resizeEvent.subscribe(()=>this.refreshWithDimensions()))})}countItemsPerRow(){if(this.galleryMode){let t,e,s=this.contentElementRef.nativeElement.children;for(s[0]&&(s=s[0].children),e=0;e<s.length&&!(t!==void 0&&t!==s[e].offsetTop);e++)t=s[e].offsetTop;return e}else return 1}calculateDimensions(){let t=this.element.nativeElement,e=t.offsetWidth-t.clientWidth;this.scrollbarWidth!=e&&(this.resizeTableHeader(),this.scrollbarWidth=e);let o=(this.items||[]).length,h=t.clientWidth-this.scrollbarWidth,S=t.clientHeight,f;if(this.childWidth===void 0||this.childHeight===void 0){let B=this.contentElementRef.nativeElement;f=B.children[0]?B.children[0].getBoundingClientRect():{width:h,height:S}}let n=this.childWidth||f.width,d=this.childHeight||f.height,a=this.countItemsPerRow(),u=Math.max(1,Math.floor(h/n));this.galleryMode&&a===0?a=u:a=Math.max(1,a);let l=Math.max(1,Math.floor(S/d)),p=t.scrollTop,ge=Math.max(0,p),g=d*Math.ceil(o/a);l===1&&Math.floor(ge/g*o)+u>=o&&(a=u),g!==this.lastScrollHeight&&(this.renderer.setStyle(this.shimElementRef.nativeElement,"height",`${g}px`),this.lastScrollHeight=g),this.dimensionsView={itemCount:o,viewWidth:h,viewHeight:S,childWidth:n,childHeight:d,itemsPerRow:a,itemsPerCol:l,itemsPerRowByCalc:u,scrollHeight:g}}calculateItems(){let t=this.element.nativeElement,e=this.dimensionsView,s=this.items||[],o=this.galleryMode?this.bufferAmount*e.itemsPerRowByCalc:this.bufferAmount,h=t.scrollTop;h>e.scrollHeight&&(h=e.scrollHeight);let f=Math.max(0,h)/e.scrollHeight*e.itemCount/e.itemsPerRow,n=Math.min(e.itemCount,Math.ceil(f)*e.itemsPerRow+e.itemsPerRow*(e.itemsPerCol+1)),d=n,a=n%e.itemsPerRow;a&&(d=n+e.itemsPerRow-a);let u=Math.max(0,d-e.itemsPerCol*e.itemsPerRow-e.itemsPerRow),l=Math.min(u,Math.floor(f)*e.itemsPerRow),p=s==null||s.length===0?0:e.childHeight*Math.ceil(l/e.itemsPerRow)-e.childHeight*Math.min(l,this.bufferAmount);p!==this.lastTopPadding&&(this.renderer.setStyle(this.contentElementRef.nativeElement,"transform",`translateY(${p}px)`),this.renderer.setStyle(this.contentElementRef.nativeElement,"webkitTransform",`translateY(${p}px)`),this.lastTopPadding=p),l=isNaN(l)?-1:l,n=isNaN(n)?-1:n,l-=o,l=Math.max(0,l),n+=o,n=Math.min(s.length,n),l!==this.previousStart||n!==this.previousEnd?(this.ngZone.run(()=>{this.viewPortItems=s.slice(l,n>=0?n:0)}),this.previousStart=l,this.previousEnd=n,this.startupLoop===!0&&this.refresh()):this.startupLoop===!0&&(this.startupLoop=!1,this.refresh(!0))}};i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=w({type:i,selectors:[["app-virtual-scroll"]],viewQuery:function(e,s){if(e&1&&(v(ye,7,E),v(Se,7,E)),e&2){let o;C(o=y())&&(s.contentElementRef=o.first),C(o=y())&&(s.shimElementRef=o.first)}},inputs:{resizeOffset:"resizeOffset",galleryMode:"galleryMode",selectedChat:"selectedChat",items:"items",childHeight:"childHeight",childWidth:"childWidth",bufferAmount:"bufferAmount"},outputs:{isScrollBottom:"isScrollBottom",isScrollTop:"isScrollTop"},features:[N],ngContentSelectors:be,decls:5,vars:0,consts:[["shim",""],["content",""],[1,"total-padding"],[1,"scrollable-content"]],template:function(e,s){e&1&&(G(),U(0,"div",2,0),J(2,"div",3,1),X(4),Y())},styles:["[_nghost-%COMP%]{display:block;overflow-x:hidden;overflow-y:auto;position:relative;scrollbar-width:thin}.scrollable-content[_ngcontent-%COMP%]{top:0;left:0;width:100%;position:absolute;will-change:transform}.total-padding[_ngcontent-%COMP%]{width:1px;opacity:0}"],changeDetection:0});let r=i;return r})();var je=(()=>{let i=class i{transform(t,e,s){return!t?.length||!e?t:me(e,t,s)}};i.\u0275fac=function(e){return new(e||i)},i.\u0275pipe=$({name:"searchFilter",type:i,pure:!0});let r=i;return r})();var pe=class{constructor(i,m){this.defaultId="default",this.keyStore=`sortBy${i}`,this.sortSettings=m,this._sortParam=this.sort}get sortParam(){return this._sortParam||this.sort}get sort(){let i=localStorage.getItem(this.keyStore);return i?JSON.parse(i):{column:this.defaultId,asc:!1}}set sort(i){this._sortParam=i,localStorage.setItem(this.keyStore,JSON.stringify(i))}sortBy(i,m=!0,t){if(!(i in this.sortSettings))return t;m&&(this.sortParam.asc?(this.sortParam.column=this.defaultId,this.sortParam.asc=!1,i=this.defaultId):this.sortParam.column===i?this.sortParam.asc=!this.sortParam.asc:(this.sortParam.column=i,this.sortParam.asc=!1),this.sort=this.sortParam);for(let e of this.sortSettings[i])de(e.type,t,e.prop,i===this.defaultId?!1:this.sortParam.asc);return[...t]}};export{De as a,Qe as b,je as c,pe as d};
@@ -1 +1 @@
1
- import{Pa as $}from"./chunk-FR4AOLYL.js";import{Ac as R,Eb as o,Fb as y,Gb as x,Lb as C,Ma as c,Mb as w,Nb as b,Pb as d,Qa as E,Qb as f,Ra as u,Sb as N,Xa as m,Ya as M,_a as j,ab as h,ca as I,da as S,dc as g,ec as U,gc as _,hc as T,ib as v,jb as F,kb as P,pb as s,qb as p,rb as l,va as D,ya as B,yb as k,zc as O}from"./chunk-HW2H3ISM.js";var V=["*"];function J(t,e){t&1&&k(0)}function K(t,e){if(t&1&&(p(0,"bar",3),x(1),l()),t&2){let a=o();s("type",a.type)("value",a._value)("max",a.max)("animate",a.animate)("striped",a.striped)}}function L(t,e){if(t&1&&(p(0,"bar",3),d(1),l()),t&2){let a=e.$implicit,i=o(2);s("type",a.type)("value",a.value)("max",a.max||i.max)("animate",i.animate)("striped",i.striped),c(),f(a.label)}}function W(t,e){if(t&1&&h(0,L,2,6,"bar",4),t&2){let a=o();s("ngForOf",a._values)}}var X=(()=>{let e=class e{constructor(i,n){this.el=i,this.renderer=n,this.max=100,this.value=0,this.animate=!1,this.striped=!1,this.type="info",this.percent=100}ngOnChanges(i){(i.value||i.max)&&(this.percent=100*(Number(i.value?.currentValue||this.value)/Number(i.max?.currentValue||this.max||100))),i.type&&this.applyTypeClasses()}applyTypeClasses(){if(this._prevType){let i=`progress-bar-${this._prevType}`,n=`bg-${this._prevType}`;this.renderer.removeClass(this.el.nativeElement,i),this.renderer.removeClass(this.el.nativeElement,n),this._prevType=void 0}if(this.type){let i=`progress-bar-${this.type}`,n=`bg-${this.type}`;this.renderer.addClass(this.el.nativeElement,i),this.renderer.addClass(this.el.nativeElement,n),this._prevType=this.type}}};e.\u0275fac=function(n){return new(n||e)(u(B),u(E))},e.\u0275cmp=m({type:e,selectors:[["bar"]],hostAttrs:["role","progressbar","aria-valuemin","0"],hostVars:13,hostBindings:function(n,r){n&2&&(v("aria-valuenow",r.value)("aria-valuetext",r.percent?r.percent.toFixed(0)+"%":"")("aria-valuemax",r.max),w("height","100","%")("width",r.percent,"%"),b("progress-bar",!0)("progress-bar-animated",r.animate)("progress-bar-striped",r.striped))},inputs:{max:"max",value:"value",animate:"animate",striped:"striped",type:"type"},features:[D],ngContentSelectors:V,decls:1,vars:0,template:function(n,r){n&1&&(y(),x(0))},encapsulation:2,changeDetection:0});let t=e;return t})(),Y=(()=>{let e=class e{constructor(){this.animate=!1,this.max=100}};e.\u0275fac=function(n){return new(n||e)},e.\u0275prov=I({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),A=(()=>{let e=class e{set value(i){this.isStacked=Array.isArray(i),typeof i=="number"?(this._value=i,this._values=void 0):(this._value=void 0,this._values=i)}constructor(i){this.max=100,this.animate=!1,this.striped=!1,this.isStacked=!1,this._value=0,Object.assign(this,i)}};e.\u0275fac=function(n){return new(n||e)(u(Y))},e.\u0275cmp=m({type:e,selectors:[["progressbar"]],hostVars:3,hostBindings:function(n,r){n&2&&(v("max",r.max),b("progress",!0))},inputs:{max:"max",animate:"animate",striped:"striped",type:"type",value:"value"},ngContentSelectors:V,decls:5,vars:3,consts:[["NotStacked",""],["Stacked",""],[4,"ngIf","ngIfThen","ngIfElse"],[3,"type","value","max","animate","striped"],[3,"type","value","max","animate","striped",4,"ngFor","ngForOf"]],template:function(n,r){if(n&1&&(y(),h(0,J,1,0,"ng-container",2)(1,K,2,5,"ng-template",null,0,T)(3,W,1,1,"ng-template",null,1,T)),n&2){let z=C(2),G=C(4);s("ngIf",!r.isStacked)("ngIfThen",z)("ngIfElse",G)}},dependencies:[R,X,O],styles:["[_nghost-%COMP%]{width:100%;display:flex}"],changeDetection:0});let t=e;return t})(),H=(()=>{let e=class e{static forRoot(){return{ngModule:e,providers:[]}}};e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=M({type:e}),e.\u0275inj=S({});let t=e;return t})();var q=(()=>{let e=class e{transform(i,n=0,r=!1){return $(i,n,r)}};e.\u0275fac=function(n){return new(n||e)},e.\u0275pipe=j({name:"toBytes",type:e,pure:!0});let t=e;return t})();function ee(t,e){if(t&1&&(p(0,"progressbar",0)(1,"span",1),d(2),g(3,"toBytes"),g(4,"toBytes"),l()()),t&2){let a=o();s("max",a.item.storageQuota)("value",a.item.storageUsage)("type",null),c(2),N("",_(3,5,a.item.storageUsage,2,!0)," / ",U(4,9,a.item.storageQuota))}}function te(t,e){if(t&1&&(p(0,"progressbar",0)(1,"span",1),d(2),g(3,"toBytes"),l()()),t&2){let a=o();s("max",a.item.storageUsage)("value",a.item.storageUsage)("type",null),c(2),f(_(3,4,a.item.storageUsage,2,!0))}}var oe=(()=>{let e=class e{constructor(){this.item={storageUsage:0,storageQuota:null}}};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=m({type:e,selectors:[["app-storage-usage"]],inputs:{item:"item"},decls:2,vars:1,consts:[[1,"bg-black",3,"max","value","type"],[1,"ms-1","me-1"]],template:function(n,r){n&1&&F(0,ee,5,11,"progressbar",0)(1,te,4,8,"progressbar",0),n&2&&P(r.item.storageQuota>0?0:1)},dependencies:[H,A,q],encapsulation:2});let t=e;return t})();export{A as a,H as b,q as c,oe as d};
1
+ import{Pa as $}from"./chunk-4U5A2DEP.js";import{Ac as R,Eb as o,Fb as y,Gb as x,Lb as C,Ma as c,Mb as w,Nb as b,Pb as d,Qa as E,Qb as f,Ra as u,Sb as N,Xa as m,Ya as M,_a as j,ab as h,ca as I,da as S,dc as g,ec as U,gc as _,hc as T,ib as v,jb as F,kb as P,pb as s,qb as p,rb as l,va as D,ya as B,yb as k,zc as O}from"./chunk-HW2H3ISM.js";var V=["*"];function J(t,e){t&1&&k(0)}function K(t,e){if(t&1&&(p(0,"bar",3),x(1),l()),t&2){let a=o();s("type",a.type)("value",a._value)("max",a.max)("animate",a.animate)("striped",a.striped)}}function L(t,e){if(t&1&&(p(0,"bar",3),d(1),l()),t&2){let a=e.$implicit,i=o(2);s("type",a.type)("value",a.value)("max",a.max||i.max)("animate",i.animate)("striped",i.striped),c(),f(a.label)}}function W(t,e){if(t&1&&h(0,L,2,6,"bar",4),t&2){let a=o();s("ngForOf",a._values)}}var X=(()=>{let e=class e{constructor(i,n){this.el=i,this.renderer=n,this.max=100,this.value=0,this.animate=!1,this.striped=!1,this.type="info",this.percent=100}ngOnChanges(i){(i.value||i.max)&&(this.percent=100*(Number(i.value?.currentValue||this.value)/Number(i.max?.currentValue||this.max||100))),i.type&&this.applyTypeClasses()}applyTypeClasses(){if(this._prevType){let i=`progress-bar-${this._prevType}`,n=`bg-${this._prevType}`;this.renderer.removeClass(this.el.nativeElement,i),this.renderer.removeClass(this.el.nativeElement,n),this._prevType=void 0}if(this.type){let i=`progress-bar-${this.type}`,n=`bg-${this.type}`;this.renderer.addClass(this.el.nativeElement,i),this.renderer.addClass(this.el.nativeElement,n),this._prevType=this.type}}};e.\u0275fac=function(n){return new(n||e)(u(B),u(E))},e.\u0275cmp=m({type:e,selectors:[["bar"]],hostAttrs:["role","progressbar","aria-valuemin","0"],hostVars:13,hostBindings:function(n,r){n&2&&(v("aria-valuenow",r.value)("aria-valuetext",r.percent?r.percent.toFixed(0)+"%":"")("aria-valuemax",r.max),w("height","100","%")("width",r.percent,"%"),b("progress-bar",!0)("progress-bar-animated",r.animate)("progress-bar-striped",r.striped))},inputs:{max:"max",value:"value",animate:"animate",striped:"striped",type:"type"},features:[D],ngContentSelectors:V,decls:1,vars:0,template:function(n,r){n&1&&(y(),x(0))},encapsulation:2,changeDetection:0});let t=e;return t})(),Y=(()=>{let e=class e{constructor(){this.animate=!1,this.max=100}};e.\u0275fac=function(n){return new(n||e)},e.\u0275prov=I({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),A=(()=>{let e=class e{set value(i){this.isStacked=Array.isArray(i),typeof i=="number"?(this._value=i,this._values=void 0):(this._value=void 0,this._values=i)}constructor(i){this.max=100,this.animate=!1,this.striped=!1,this.isStacked=!1,this._value=0,Object.assign(this,i)}};e.\u0275fac=function(n){return new(n||e)(u(Y))},e.\u0275cmp=m({type:e,selectors:[["progressbar"]],hostVars:3,hostBindings:function(n,r){n&2&&(v("max",r.max),b("progress",!0))},inputs:{max:"max",animate:"animate",striped:"striped",type:"type",value:"value"},ngContentSelectors:V,decls:5,vars:3,consts:[["NotStacked",""],["Stacked",""],[4,"ngIf","ngIfThen","ngIfElse"],[3,"type","value","max","animate","striped"],[3,"type","value","max","animate","striped",4,"ngFor","ngForOf"]],template:function(n,r){if(n&1&&(y(),h(0,J,1,0,"ng-container",2)(1,K,2,5,"ng-template",null,0,T)(3,W,1,1,"ng-template",null,1,T)),n&2){let z=C(2),G=C(4);s("ngIf",!r.isStacked)("ngIfThen",z)("ngIfElse",G)}},dependencies:[R,X,O],styles:["[_nghost-%COMP%]{width:100%;display:flex}"],changeDetection:0});let t=e;return t})(),H=(()=>{let e=class e{static forRoot(){return{ngModule:e,providers:[]}}};e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=M({type:e}),e.\u0275inj=S({});let t=e;return t})();var q=(()=>{let e=class e{transform(i,n=0,r=!1){return $(i,n,r)}};e.\u0275fac=function(n){return new(n||e)},e.\u0275pipe=j({name:"toBytes",type:e,pure:!0});let t=e;return t})();function ee(t,e){if(t&1&&(p(0,"progressbar",0)(1,"span",1),d(2),g(3,"toBytes"),g(4,"toBytes"),l()()),t&2){let a=o();s("max",a.item.storageQuota)("value",a.item.storageUsage)("type",null),c(2),N("",_(3,5,a.item.storageUsage,2,!0)," / ",U(4,9,a.item.storageQuota))}}function te(t,e){if(t&1&&(p(0,"progressbar",0)(1,"span",1),d(2),g(3,"toBytes"),l()()),t&2){let a=o();s("max",a.item.storageUsage)("value",a.item.storageUsage)("type",null),c(2),f(_(3,4,a.item.storageUsage,2,!0))}}var oe=(()=>{let e=class e{constructor(){this.item={storageUsage:0,storageQuota:null}}};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=m({type:e,selectors:[["app-storage-usage"]],inputs:{item:"item"},decls:2,vars:1,consts:[[1,"bg-black",3,"max","value","type"],[1,"ms-1","me-1"]],template:function(n,r){n&1&&F(0,ee,5,11,"progressbar",0)(1,te,4,8,"progressbar",0),n&2&&P(r.item.storageQuota>0?0:1)},dependencies:[H,A,q],encapsulation:2});let t=e;return t})();export{A as a,H as b,q as c,oe as d};
@@ -1,4 +1,4 @@
1
- import{a as kr}from"./chunk-YCWMV2YR.js";import{c as Tr}from"./chunk-JXZCNFW7.js";import{a as Mr}from"./chunk-YGD22MWQ.js";import{a as xr,b as wr,c as Ar,d as Dr,e as Nr,f as _i,i as Or}from"./chunk-HYMDGBZL.js";import{b as Lr,c as xi,d as Ir,e as Mi}from"./chunk-OEFBC4GG.js";import{a as Pr,d as Jt,g as Ot}from"./chunk-EILQG525.js";import{f as Si}from"./chunk-66FMKVJX.js";import{Aa as mr,Ba as gr,Ga as vr,Gb as Ci,Hb as ee,Ib as Dt,Ja as xt,La as Mt,Ma as br,O as rt,Za as on,f as tr,ib as yr,kb as wt,lb as At,mb as le,nb as Be,pb as Cr,wb as H,xb as Sr,za as hr,zb as _r}from"./chunk-FR4AOLYL.js";import{a as Ei,c as je,d as zr,h as st,m as Nt}from"./chunk-22EANI6R.js";import{d as Xn}from"./chunk-BIUNUYZ5.js";import{$ as Gn,$b as bt,$c as Jn,Ab as ke,Ac as Ve,B as T,C as Gt,Cb as b,Db as qn,Dc as nt,Eb as f,Ed as er,Fb as Wt,Fd as Ce,Ga as ze,Gb as Kt,Gf as dr,Ha as $n,Hb as et,Hc as be,Ib as Me,If as ur,Jb as J,Jd as ir,Je as or,Kb as Z,L as pt,La as Ji,Lb as Yt,Ma as l,Mb as j,Mc as Qt,Na as Zi,Nb as V,Ob as Fe,Oc as He,Pb as h,Qa as ht,Qb as R,Ra as me,Rb as se,Re as ar,Rf as fr,Sa as en,Tb as mt,Ub as gt,Vb as vt,Wf as pr,X as jn,Xa as y,Xb as Re,Xc as gi,Ya as ge,Za as xe,Zb as tt,Zc as ye,_a as tn,_b as it,_c as Qn,_e as lr,ab as P,ad as vi,ba as Un,bb as L,bc as Wn,bf as yi,c as Hn,ca as Q,cb as Ut,cc as hi,cg as Er,da as he,dc as ve,ec as mi,ed as Ct,f as Bt,fc as yt,ha as p,hc as Xt,jb as D,jd as St,kb as N,ke as nr,kf as cr,ma as S,na as _,nb as nn,ob as rn,pb as u,pe as rr,qb as c,qc as sn,rb as d,rc as Kn,sb as g,se as sr,tb as $t,td as bi,u as Qi,ub as qt,v as jt,va as Qe,vb as pi,w as Bn,wb as Je,wd as _t,xb as Ze,xd as Zn,ya as ae,yb as Ie,yd as Et,zb as F,zc as Yn}from"./chunk-HW2H3ISM.js";import{a as oe,b as Ye,j as Xe}from"./chunk-RTRJ3KFH.js";var ml={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 go={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"]},gl=go;var vl={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 wi={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 bl={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 yl={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 Cl={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 Sl={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 _l={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 El={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 Fr={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 Rr=(()=>{let e=class e{transform(t,n=0,s=void 0){return Mt(t,n,s)}};e.\u0275fac=function(n){return new(n||e)},e.\u0275pipe=tn({name:"pathSlice",type:e,pure:!0});let i=e;return i})();var dn=function(i,e){return dn=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,t){r.__proto__=t}||function(r,t){for(var n in t)t.hasOwnProperty(n)&&(r[n]=t[n])},dn(i,e)};function Yr(i,e){dn(i,e);function r(){this.constructor=i}i.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var te=function(){return te=Object.assign||function(e){for(var r,t=1,n=arguments.length;t<n;t++){r=arguments[t];for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(e[s]=r[s])}return e},te.apply(this,arguments)};function Xr(i,e){var r=typeof Symbol=="function"&&i[Symbol.iterator];if(!r)return i;var t=r.call(i),n,s=[],o;try{for(;(e===void 0||e-- >0)&&!(n=t.next()).done;)s.push(n.value)}catch(a){o={error:a}}finally{try{n&&!n.done&&(r=t.return)&&r.call(t)}finally{if(o)throw o.error}}return s}function un(){for(var i=[],e=0;e<arguments.length;e++)i=i.concat(Xr(arguments[e]));return i}var vo="An invariant failed, however the error is obfuscated because this is an production build.",Ni=[];Object.freeze(Ni);var vn={};Object.freeze(vn);var bo={};function fn(){return typeof window<"u"?window:typeof global<"u"?global:bo}function ie(){return++v.mobxGuid}function k(i){throw ei(!1,i),"X"}function ei(i,e){if(!i)throw new Error("[mobx] "+(e||vo))}var Vr=[];function De(i,e){return!1}function bn(i){var e=!1;return function(){if(!e)return e=!0,i.apply(this,arguments)}}var Hr=function(){};function yo(i){var e=[];return i.forEach(function(r){e.indexOf(r)===-1&&e.push(r)}),e}function yn(i){return i!==null&&typeof i=="object"}function zt(i){if(i===null||typeof i!="object")return!1;var e=Object.getPrototypeOf(i);return e===Object.prototype||e===null}function Co(i){return It(i)||ut(i)?i:Array.isArray(i)?new Map(i):zt(i)?new Map(Object.entries(i)):k("Cannot convert to map from '"+i+"'")}function So(i,e){for(var r=0;r<e.length;r++)ct(i,e[r],i[e[r]])}function ct(i,e,r){Object.defineProperty(i,e,{enumerable:!1,writable:!0,configurable:!0,value:r})}function ri(i,e,r){Object.defineProperty(i,e,{enumerable:!1,writable:!1,configurable:!0,value:r})}function qe(i,e){var r="isMobX"+i;return e.prototype[r]=!0,function(t){return yn(t)&&t[r]===!0}}function _o(i,e){return typeof i=="number"&&typeof e=="number"&&isNaN(i)&&isNaN(e)}function It(i){return fn().Map!==void 0&&i instanceof fn().Map}function si(i){return i instanceof Set}function Pt(i){for(var e=[];;){var r=i.next();if(r.done)break;e.push(r.value)}return e}function Qr(){return typeof Symbol=="function"&&Symbol.toPrimitive||"@@toPrimitive"}function Jr(i){return i===null?null:typeof i=="object"?""+i:i}function Cn(){return typeof Symbol=="function"&&Symbol.iterator||"@@iterator"}function Sn(i,e){ri(i,Cn(),e)}function ti(i){return i[Cn()]=Eo,i}function _n(){return typeof Symbol=="function"&&Symbol.toStringTag||"@@toStringTag"}function Eo(){return this}var Ii=(function(){function i(e){e===void 0&&(e="Atom@"+ie()),this.name=e,this.isPendingUnobservation=!1,this.isBeingObserved=!1,this.observers=[],this.observersIndexes={},this.diffValue=0,this.lastAccessedBy=0,this.lowestObserverState=O.NOT_TRACKING}return i.prototype.onBecomeUnobserved=function(){},i.prototype.onBecomeObserved=function(){},i.prototype.reportObserved=function(){return fs(this)},i.prototype.reportChanged=function(){Ne(),qo(this),Oe()},i.prototype.toString=function(){return this.name},i})(),En=qe("Atom",Ii);function xo(i,e,r){e===void 0&&(e=Hr),r===void 0&&(r=Hr);var t=new Ii(i);return ra(t,e),vs(t,r),t}function Zr(i,e){return i===e}function Mo(i,e){return An(i,e)}function wo(i,e){return An(i,e,1)}function Ao(i,e){return _o(i,e)||Zr(i,e)}var Lt={identity:Zr,structural:Mo,default:Ao,shallow:wo},Do={},No={};function Oo(i,e){var r=e?Do:No;return r[i]||(r[i]={configurable:!0,enumerable:e,get:function(){return at(this),this[i]},set:function(t){at(this),this[i]=t}})}function at(i){if(i.__mobxDidRunLazyInitializers!==!0){var e=i.__mobxDecorators;if(e){ct(i,"__mobxDidRunLazyInitializers",!0);for(var r in e){var t=e[r];t.propertyCreator(i,t.prop,t.descriptor,t.decoratorTarget,t.decoratorArguments)}}}}function es(i,e){return function(){var t,n=function(o,a,m,C){if(C===!0)return e(o,a,m,o,t),null;if(!Object.prototype.hasOwnProperty.call(o,"__mobxDecorators")){var I=o.__mobxDecorators;ct(o,"__mobxDecorators",te({},I))}return o.__mobxDecorators[a]={prop:a,propertyCreator:e,descriptor:m,decoratorTarget:o,decoratorArguments:t},Oo(a,i)};return To(arguments)?(t=Ni,n.apply(null,arguments)):(t=Array.prototype.slice.call(arguments),n)}}function To(i){return(i.length===2||i.length===3)&&typeof i[1]=="string"||i.length===4&&i[3]===!0}function oi(i,e,r){return Cs(i)?i:Array.isArray(i)?M.array(i,{name:r}):zt(i)?M.object(i,void 0,{name:r}):It(i)?M.map(i,{name:r}):si(i)?M.set(i,{name:r}):i}function Po(i,e,r){return i==null||ni(i)||Vi(i)||ut(i)||Ft(i)?i:Array.isArray(i)?M.array(i,{name:r,deep:!1}):zt(i)?M.object(i,void 0,{name:r,deep:!1}):It(i)?M.map(i,{name:r,deep:!1}):si(i)?M.set(i,{name:r,deep:!1}):k(!1)}function ii(i){return i}function Lo(i,e,r){return An(i,e)?e:i}function ki(i){var e=es(!0,function(t,n,s,o,a){var m=s?s.initializer?s.initializer.call(t):s.value:void 0;ba(t,n,m,i)}),r=(typeof process<"u"&&process.env,e);return r.enhancer=i,r}var ts={deep:!0,name:void 0,defaultDecorator:void 0},zo={deep:!1,name:void 0,defaultDecorator:void 0};Object.freeze(ts);Object.freeze(zo);function Tt(i){return i==null?ts:typeof i=="string"?{name:i,deep:!0}:i}function Ai(i){return i.defaultDecorator?i.defaultDecorator.enhancer:i.deep===!1?ii:oi}var xn=ki(oi),Io=ki(Po),is=ki(ii),ko=ki(Lo);function Fo(i,e,r){if(typeof arguments[1]=="string")return xn.apply(null,arguments);if(Cs(i))return i;var t=zt(i)?M.object(i,e,r):Array.isArray(i)?M.array(i,e):It(i)?M.map(i,e):si(i)?M.set(i,e):i;if(t!==i)return t;k(!1)}var Br={box:function(i,e){arguments.length>2&&we("box");var r=Tt(e);return new Ue(i,Ai(r),r.name,!0,r.equals)},shallowBox:function(i,e){return arguments.length>2&&we("shallowBox"),De("observable.shallowBox","observable.box(value, { deep: false })"),M.box(i,{name:e,deep:!1})},array:function(i,e){arguments.length>2&&we("array");var r=Tt(e);return new Pe(i,Ai(r),r.name)},shallowArray:function(i,e){return arguments.length>2&&we("shallowArray"),De("observable.shallowArray","observable.array(values, { deep: false })"),M.array(i,{name:e,deep:!1})},map:function(i,e){arguments.length>2&&we("map");var r=Tt(e);return new Hi(i,Ai(r),r.name)},shallowMap:function(i,e){return arguments.length>2&&we("shallowMap"),De("observable.shallowMap","observable.map(values, { deep: false })"),M.map(i,{name:e,deep:!1})},set:function(i,e){arguments.length>2&&we("set");var r=Tt(e);return new Bi(i,Ai(r),r.name)},object:function(i,e,r){typeof arguments[1]=="string"&&we("object");var t=Tt(r);return sa({},i,e,t)},shallowObject:function(i,e){return typeof arguments[1]=="string"&&we("shallowObject"),De("observable.shallowObject","observable.object(values, {}, { deep: false })"),M.object(i,{},{name:e,deep:!1})},ref:is,shallow:Io,deep:xn,struct:ko},M=Fo;Object.keys(Br).forEach(function(i){return M[i]=Br[i]});function we(i){k("Expected one or two arguments to observable."+i+". Did you accidentally try to use observable."+i+" as decorator?")}var Oi=es(!1,function(i,e,r,t,n){var s=r.get,o=r.set,a=n[0]||{};ya(i,e,te({get:s,set:o},a))}),Ro=Oi({equals:Lt.structural}),U=function(e,r,t){if(typeof r=="string"||e!==null&&typeof e=="object"&&arguments.length===1)return Oi.apply(null,arguments);var n=typeof r=="object"?r:{};return n.get=e,n.set=typeof r=="function"?r:n.set,n.name=n.name||e.name||"",new $e(n)};U.struct=Ro;var O=(function(i){return i[i.NOT_TRACKING=-1]="NOT_TRACKING",i[i.UP_TO_DATE=0]="UP_TO_DATE",i[i.POSSIBLY_STALE=1]="POSSIBLY_STALE",i[i.STALE=2]="STALE",i})(O||{}),Se=(function(i){return i[i.NONE=0]="NONE",i[i.LOG=1]="LOG",i[i.BREAK=2]="BREAK",i})(Se||{}),Ti=(function(){function i(e){this.cause=e}return i})();function Zt(i){return i instanceof Ti}function pn(i){switch(i.dependenciesState){case O.UP_TO_DATE:return!1;case O.NOT_TRACKING:case O.STALE:return!0;case O.POSSIBLY_STALE:{for(var e=kt(),r=i.observing,t=r.length,n=0;n<t;n++){var s=r[n];if(Ri(s)){if(v.disableErrorBoundaries)s.get();else try{s.get()}catch{return Ge(e),!0}if(i.dependenciesState===O.STALE)return Ge(e),!0}}return as(i),Ge(e),!1}}}function Fi(i){var e=i.observers.length>0;v.computationDepth>0&&e&&k(!1),!v.allowStateChanges&&(e||v.enforceActions==="strict")&&k(!1)}function ns(i,e,r){var t=ss(!0);as(i),i.newObserving=new Array(i.observing.length+100),i.unboundDepsCount=0,i.runId=++v.runId;var n=v.trackingDerivation;v.trackingDerivation=i;var s;if(v.disableErrorBoundaries===!0)s=e.call(r);else try{s=e.call(r)}catch(o){s=new Ti(o)}return v.trackingDerivation=n,Vo(i),i.observing.length===0&&void 0,os(t),s}function Vo(i){for(var e=i.observing,r=i.observing=i.newObserving,t=O.UP_TO_DATE,n=0,s=i.unboundDepsCount,o=0;o<s;o++){var a=r[o];a.diffValue===0&&(a.diffValue=1,n!==o&&(r[n]=a),n++),a.dependenciesState>t&&(t=a.dependenciesState)}for(r.length=n,i.newObserving=null,s=e.length;s--;){var a=e[s];a.diffValue===0&&ds(a,i),a.diffValue=0}for(;n--;){var a=r[n];a.diffValue===1&&(a.diffValue=0,$o(a,i))}t!==O.UP_TO_DATE&&(i.dependenciesState=t,i.onBecomeStale())}function hn(i){var e=i.observing;i.observing=[];for(var r=e.length;r--;)ds(e[r],i);i.dependenciesState=O.NOT_TRACKING}function rs(i){var e=kt(),r=i();return Ge(e),r}function kt(){var i=v.trackingDerivation;return v.trackingDerivation=null,i}function Ge(i){v.trackingDerivation=i}function ss(i){var e=v.allowStateReads;return v.allowStateReads=i,e}function os(i){v.allowStateReads=i}function as(i){if(i.dependenciesState!==O.UP_TO_DATE){i.dependenciesState=O.UP_TO_DATE;for(var e=i.observing,r=e.length;r--;)e[r].lowestObserverState=O.UP_TO_DATE}}var Pi=0,Ho=1;function ot(i,e){var r=function(){return Bo(i,e,this,arguments)};return r.isMobxAction=!0,r}function Bo(i,e,r,t){var n=jo(i,r,t);try{return e.apply(r,t)}catch(s){throw n.error=s,s}finally{Go(n)}}function jo(i,e,r){var t=K()&&!!i,n=0;if(t){n=Date.now();var s=r&&r.length||0,o=new Array(s);if(s>0)for(var a=0;a<s;a++)o[a]=r[a];ce({type:"action",name:i,object:e,arguments:o})}var m=kt();Ne();var C=ls(!0),I=ss(!0),ne={prevDerivation:m,prevAllowStateChanges:C,prevAllowStateReads:I,notifySpy:t,startTime:n,actionId:Ho++,parentActionId:Pi};return Pi=ne.actionId,ne}function Go(i){Pi!==i.actionId&&k("invalid action stack. did you forget to finish an action?"),Pi=i.parentActionId,i.error!==void 0&&(v.suppressReactionErrors=!0),cs(i.prevAllowStateChanges),os(i.prevAllowStateReads),Oe(),Ge(i.prevDerivation),i.notifySpy&&de({time:Date.now()-i.startTime}),v.suppressReactionErrors=!1}function ls(i){var e=v.allowStateChanges;return v.allowStateChanges=i,e}function cs(i){v.allowStateChanges=i}var Ue=(function(i){Yr(e,i);function e(r,t,n,s,o){n===void 0&&(n="ObservableValue@"+ie()),s===void 0&&(s=!0),o===void 0&&(o=Lt.default);var a=i.call(this,n)||this;return a.enhancer=t,a.name=n,a.equals=o,a.hasUnreportedChange=!1,a.value=t(r,void 0,n),s&&K()&&lt({type:"create",name:a.name,newValue:""+a.value}),a}return e.prototype.dehanceValue=function(r){return this.dehancer!==void 0?this.dehancer(r):r},e.prototype.set=function(r){var t=this.value;if(r=this.prepareNewValue(r),r!==v.UNCHANGED){var n=K();n&&ce({type:"update",name:this.name,newValue:r,oldValue:t}),this.setNewValue(r),n&&de()}},e.prototype.prepareNewValue=function(r){if(Fi(this),_e(this)){var t=Ee(this,{object:this,type:"update",newValue:r});if(!t)return v.UNCHANGED;r=t.newValue}return r=this.enhancer(r,this.value,this.name),this.equals(this.value,r)?v.UNCHANGED:r},e.prototype.setNewValue=function(r){var t=this.value;this.value=r,this.reportChanged(),ue(this)&&fe(this,{type:"update",object:this,newValue:r,oldValue:t})},e.prototype.get=function(){return this.reportObserved(),this.dehanceValue(this.value)},e.prototype.intercept=function(r){return li(this,r)},e.prototype.observe=function(r,t){return t&&r({object:this,type:"update",newValue:this.value,oldValue:void 0}),ci(this,r)},e.prototype.toJSON=function(){return this.get()},e.prototype.toString=function(){return this.name+"["+this.value+"]"},e.prototype.valueOf=function(){return Jr(this.get())},e})(Ii);Ue.prototype[Qr()]=Ue.prototype.valueOf;var Al=qe("ObservableValue",Ue),$e=(function(){function i(e){this.dependenciesState=O.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=O.UP_TO_DATE,this.unboundDepsCount=0,this.__mapid="#"+ie(),this.value=new Ti(null),this.isComputing=!1,this.isRunningSetter=!1,this.isTracing=Se.NONE,this.derivation=e.get,this.name=e.name||"ComputedValue@"+ie(),e.set&&(this.setter=ot(this.name+"-setter",e.set)),this.equals=e.equals||(e.compareStructural||e.struct?Lt.structural:Lt.default),this.scope=e.context,this.requiresReaction=!!e.requiresReaction,this.keepAlive=!!e.keepAlive}return i.prototype.onBecomeStale=function(){Ko(this)},i.prototype.onBecomeUnobserved=function(){},i.prototype.onBecomeObserved=function(){},i.prototype.get=function(){this.isComputing&&k("Cycle detected in computation "+this.name+": "+this.derivation),v.inBatch===0&&this.observers.length===0&&!this.keepAlive?pn(this)&&(this.warnAboutUntrackedRead(),Ne(),this.value=this.computeValue(!1),Oe()):(fs(this),pn(this)&&this.trackAndCompute()&&Wo(this));var e=this.value;if(Zt(e))throw e.cause;return e},i.prototype.peek=function(){var e=this.computeValue(!1);if(Zt(e))throw e.cause;return e},i.prototype.set=function(e){if(this.setter){ei(!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 ei(!1,!1)},i.prototype.trackAndCompute=function(){K()&&lt({object:this.scope,type:"compute",name:this.name});var e=this.value,r=this.dependenciesState===O.NOT_TRACKING,t=this.computeValue(!0),n=r||Zt(e)||Zt(t)||!this.equals(e,t);return n&&(this.value=t),n},i.prototype.computeValue=function(e){this.isComputing=!0,v.computationDepth++;var r;if(e)r=ns(this,this.derivation,this.scope);else if(v.disableErrorBoundaries===!0)r=this.derivation.call(this.scope);else try{r=this.derivation.call(this.scope)}catch(t){r=new Ti(t)}return v.computationDepth--,this.isComputing=!1,r},i.prototype.suspend=function(){this.keepAlive||(hn(this),this.value=void 0)},i.prototype.observe=function(e,r){var t=this,n=!0,s=void 0;return ai(function(){var o=t.get();if(!n||r){var a=kt();e({type:"update",object:t,newValue:o,oldValue:s}),Ge(a)}n=!1,s=o})},i.prototype.warnAboutUntrackedRead=function(){},i.prototype.toJSON=function(){return this.get()},i.prototype.toString=function(){return this.name+"["+this.derivation.toString()+"]"},i.prototype.valueOf=function(){return Jr(this.get())},i})();$e.prototype[Qr()]=$e.prototype.valueOf;var Ri=qe("ComputedValue",$e);var an=(function(){function i(){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 i})(),ln=!0,Uo=!1,v=(function(){var i=fn();return i.__mobxInstanceCount>0&&!i.__mobxGlobals&&(ln=!1),i.__mobxGlobals&&i.__mobxGlobals.version!==new an().version&&(ln=!1),ln?i.__mobxGlobals?(i.__mobxInstanceCount+=1,i.__mobxGlobals.UNCHANGED||(i.__mobxGlobals.UNCHANGED={}),i.__mobxGlobals):(i.__mobxInstanceCount=1,i.__mobxGlobals=new an):(setTimeout(function(){Uo||k("There are multiple, different versions of MobX active. Make sure MobX is loaded only once or use `configure({ isolateGlobalState: true })`")},1),new an)})();function $o(i,e){var r=i.observers.length;r&&(i.observersIndexes[e.__mapid]=r),i.observers[r]=e,i.lowestObserverState>e.dependenciesState&&(i.lowestObserverState=e.dependenciesState)}function ds(i,e){if(i.observers.length===1)i.observers.length=0,us(i);else{var r=i.observers,t=i.observersIndexes,n=r.pop();if(n!==e){var s=t[e.__mapid]||0;s?t[n.__mapid]=s:delete t[n.__mapid],r[s]=n}delete t[e.__mapid]}}function us(i){i.isPendingUnobservation===!1&&(i.isPendingUnobservation=!0,v.pendingUnobservations.push(i))}function Ne(){v.inBatch++}function Oe(){if(--v.inBatch===0){ms();for(var i=v.pendingUnobservations,e=0;e<i.length;e++){var r=i[e];r.isPendingUnobservation=!1,r.observers.length===0&&(r.isBeingObserved&&(r.isBeingObserved=!1,r.onBecomeUnobserved()),r instanceof $e&&r.suspend())}v.pendingUnobservations=[]}}function fs(i){var e=v.trackingDerivation;return e!==null?(e.runId!==i.lastAccessedBy&&(i.lastAccessedBy=e.runId,e.newObserving[e.unboundDepsCount++]=i,i.isBeingObserved||(i.isBeingObserved=!0,i.onBecomeObserved())),!0):(i.observers.length===0&&v.inBatch>0&&us(i),!1)}function qo(i){if(i.lowestObserverState!==O.STALE){i.lowestObserverState=O.STALE;for(var e=i.observers,r=e.length;r--;){var t=e[r];t.dependenciesState===O.UP_TO_DATE&&(t.isTracing!==Se.NONE&&ps(t,i),t.onBecomeStale()),t.dependenciesState=O.STALE}}}function Wo(i){if(i.lowestObserverState!==O.STALE){i.lowestObserverState=O.STALE;for(var e=i.observers,r=e.length;r--;){var t=e[r];t.dependenciesState===O.POSSIBLY_STALE?t.dependenciesState=O.STALE:t.dependenciesState===O.UP_TO_DATE&&(i.lowestObserverState=O.UP_TO_DATE)}}}function Ko(i){if(i.lowestObserverState===O.UP_TO_DATE){i.lowestObserverState=O.POSSIBLY_STALE;for(var e=i.observers,r=e.length;r--;){var t=e[r];t.dependenciesState===O.UP_TO_DATE&&(t.dependenciesState=O.POSSIBLY_STALE,t.isTracing!==Se.NONE&&ps(t,i),t.onBecomeStale())}}}function ps(i,e){if(console.log("[mobx.trace] '"+i.name+"' is invalidated due to a change in: '"+e.name+"'"),i.isTracing===Se.BREAK){var r=[];hs(oa(i),r,1),new Function(`debugger;
1
+ import{a as kr}from"./chunk-MGGT6MIJ.js";import{c as Tr}from"./chunk-JXZCNFW7.js";import{a as Mr}from"./chunk-MCLQFZ3S.js";import{a as xr,b as wr,c as Ar,d as Dr,e as Nr,f as _i,i as Or}from"./chunk-FNFGUIQH.js";import{b as Lr,c as xi,d as Ir,e as Mi}from"./chunk-F2J2IIJE.js";import{a as Pr,d as Jt,g as Ot}from"./chunk-MVO4WZLK.js";import{f as Si}from"./chunk-VPJ2V27B.js";import{Aa as mr,Ba as gr,Ga as vr,Gb as Ci,Hb as ee,Ib as Dt,Ja as xt,La as Mt,Ma as br,O as rt,Za as on,f as tr,ib as yr,kb as wt,lb as At,mb as le,nb as Be,pb as Cr,wb as H,xb as Sr,za as hr,zb as _r}from"./chunk-4U5A2DEP.js";import{a as Ei,c as je,d as zr,h as st,m as Nt}from"./chunk-22EANI6R.js";import{d as Xn}from"./chunk-BIUNUYZ5.js";import{$ as Gn,$b as bt,$c as Jn,Ab as ke,Ac as Ve,B as T,C as Gt,Cb as b,Db as qn,Dc as nt,Eb as f,Ed as er,Fb as Wt,Fd as Ce,Ga as ze,Gb as Kt,Gf as dr,Ha as $n,Hb as et,Hc as be,Ib as Me,If as ur,Jb as J,Jd as ir,Je as or,Kb as Z,L as pt,La as Ji,Lb as Yt,Ma as l,Mb as j,Mc as Qt,Na as Zi,Nb as V,Ob as Fe,Oc as He,Pb as h,Qa as ht,Qb as R,Ra as me,Rb as se,Re as ar,Rf as fr,Sa as en,Tb as mt,Ub as gt,Vb as vt,Wf as pr,X as jn,Xa as y,Xb as Re,Xc as gi,Ya as ge,Za as xe,Zb as tt,Zc as ye,_a as tn,_b as it,_c as Qn,_e as lr,ab as P,ad as vi,ba as Un,bb as L,bc as Wn,bf as yi,c as Hn,ca as Q,cb as Ut,cc as hi,cg as Er,da as he,dc as ve,ec as mi,ed as Ct,f as Bt,fc as yt,ha as p,hc as Xt,jb as D,jd as St,kb as N,ke as nr,kf as cr,ma as S,na as _,nb as nn,ob as rn,pb as u,pe as rr,qb as c,qc as sn,rb as d,rc as Kn,sb as g,se as sr,tb as $t,td as bi,u as Qi,ub as qt,v as jt,va as Qe,vb as pi,w as Bn,wb as Je,wd as _t,xb as Ze,xd as Zn,ya as ae,yb as Ie,yd as Et,zb as F,zc as Yn}from"./chunk-HW2H3ISM.js";import{a as oe,b as Ye,j as Xe}from"./chunk-RTRJ3KFH.js";var ml={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 go={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"]},gl=go;var vl={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 wi={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 bl={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 yl={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 Cl={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 Sl={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 _l={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 El={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 Fr={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 Rr=(()=>{let e=class e{transform(t,n=0,s=void 0){return Mt(t,n,s)}};e.\u0275fac=function(n){return new(n||e)},e.\u0275pipe=tn({name:"pathSlice",type:e,pure:!0});let i=e;return i})();var dn=function(i,e){return dn=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,t){r.__proto__=t}||function(r,t){for(var n in t)t.hasOwnProperty(n)&&(r[n]=t[n])},dn(i,e)};function Yr(i,e){dn(i,e);function r(){this.constructor=i}i.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var te=function(){return te=Object.assign||function(e){for(var r,t=1,n=arguments.length;t<n;t++){r=arguments[t];for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(e[s]=r[s])}return e},te.apply(this,arguments)};function Xr(i,e){var r=typeof Symbol=="function"&&i[Symbol.iterator];if(!r)return i;var t=r.call(i),n,s=[],o;try{for(;(e===void 0||e-- >0)&&!(n=t.next()).done;)s.push(n.value)}catch(a){o={error:a}}finally{try{n&&!n.done&&(r=t.return)&&r.call(t)}finally{if(o)throw o.error}}return s}function un(){for(var i=[],e=0;e<arguments.length;e++)i=i.concat(Xr(arguments[e]));return i}var vo="An invariant failed, however the error is obfuscated because this is an production build.",Ni=[];Object.freeze(Ni);var vn={};Object.freeze(vn);var bo={};function fn(){return typeof window<"u"?window:typeof global<"u"?global:bo}function ie(){return++v.mobxGuid}function k(i){throw ei(!1,i),"X"}function ei(i,e){if(!i)throw new Error("[mobx] "+(e||vo))}var Vr=[];function De(i,e){return!1}function bn(i){var e=!1;return function(){if(!e)return e=!0,i.apply(this,arguments)}}var Hr=function(){};function yo(i){var e=[];return i.forEach(function(r){e.indexOf(r)===-1&&e.push(r)}),e}function yn(i){return i!==null&&typeof i=="object"}function zt(i){if(i===null||typeof i!="object")return!1;var e=Object.getPrototypeOf(i);return e===Object.prototype||e===null}function Co(i){return It(i)||ut(i)?i:Array.isArray(i)?new Map(i):zt(i)?new Map(Object.entries(i)):k("Cannot convert to map from '"+i+"'")}function So(i,e){for(var r=0;r<e.length;r++)ct(i,e[r],i[e[r]])}function ct(i,e,r){Object.defineProperty(i,e,{enumerable:!1,writable:!0,configurable:!0,value:r})}function ri(i,e,r){Object.defineProperty(i,e,{enumerable:!1,writable:!1,configurable:!0,value:r})}function qe(i,e){var r="isMobX"+i;return e.prototype[r]=!0,function(t){return yn(t)&&t[r]===!0}}function _o(i,e){return typeof i=="number"&&typeof e=="number"&&isNaN(i)&&isNaN(e)}function It(i){return fn().Map!==void 0&&i instanceof fn().Map}function si(i){return i instanceof Set}function Pt(i){for(var e=[];;){var r=i.next();if(r.done)break;e.push(r.value)}return e}function Qr(){return typeof Symbol=="function"&&Symbol.toPrimitive||"@@toPrimitive"}function Jr(i){return i===null?null:typeof i=="object"?""+i:i}function Cn(){return typeof Symbol=="function"&&Symbol.iterator||"@@iterator"}function Sn(i,e){ri(i,Cn(),e)}function ti(i){return i[Cn()]=Eo,i}function _n(){return typeof Symbol=="function"&&Symbol.toStringTag||"@@toStringTag"}function Eo(){return this}var Ii=(function(){function i(e){e===void 0&&(e="Atom@"+ie()),this.name=e,this.isPendingUnobservation=!1,this.isBeingObserved=!1,this.observers=[],this.observersIndexes={},this.diffValue=0,this.lastAccessedBy=0,this.lowestObserverState=O.NOT_TRACKING}return i.prototype.onBecomeUnobserved=function(){},i.prototype.onBecomeObserved=function(){},i.prototype.reportObserved=function(){return fs(this)},i.prototype.reportChanged=function(){Ne(),qo(this),Oe()},i.prototype.toString=function(){return this.name},i})(),En=qe("Atom",Ii);function xo(i,e,r){e===void 0&&(e=Hr),r===void 0&&(r=Hr);var t=new Ii(i);return ra(t,e),vs(t,r),t}function Zr(i,e){return i===e}function Mo(i,e){return An(i,e)}function wo(i,e){return An(i,e,1)}function Ao(i,e){return _o(i,e)||Zr(i,e)}var Lt={identity:Zr,structural:Mo,default:Ao,shallow:wo},Do={},No={};function Oo(i,e){var r=e?Do:No;return r[i]||(r[i]={configurable:!0,enumerable:e,get:function(){return at(this),this[i]},set:function(t){at(this),this[i]=t}})}function at(i){if(i.__mobxDidRunLazyInitializers!==!0){var e=i.__mobxDecorators;if(e){ct(i,"__mobxDidRunLazyInitializers",!0);for(var r in e){var t=e[r];t.propertyCreator(i,t.prop,t.descriptor,t.decoratorTarget,t.decoratorArguments)}}}}function es(i,e){return function(){var t,n=function(o,a,m,C){if(C===!0)return e(o,a,m,o,t),null;if(!Object.prototype.hasOwnProperty.call(o,"__mobxDecorators")){var I=o.__mobxDecorators;ct(o,"__mobxDecorators",te({},I))}return o.__mobxDecorators[a]={prop:a,propertyCreator:e,descriptor:m,decoratorTarget:o,decoratorArguments:t},Oo(a,i)};return To(arguments)?(t=Ni,n.apply(null,arguments)):(t=Array.prototype.slice.call(arguments),n)}}function To(i){return(i.length===2||i.length===3)&&typeof i[1]=="string"||i.length===4&&i[3]===!0}function oi(i,e,r){return Cs(i)?i:Array.isArray(i)?M.array(i,{name:r}):zt(i)?M.object(i,void 0,{name:r}):It(i)?M.map(i,{name:r}):si(i)?M.set(i,{name:r}):i}function Po(i,e,r){return i==null||ni(i)||Vi(i)||ut(i)||Ft(i)?i:Array.isArray(i)?M.array(i,{name:r,deep:!1}):zt(i)?M.object(i,void 0,{name:r,deep:!1}):It(i)?M.map(i,{name:r,deep:!1}):si(i)?M.set(i,{name:r,deep:!1}):k(!1)}function ii(i){return i}function Lo(i,e,r){return An(i,e)?e:i}function ki(i){var e=es(!0,function(t,n,s,o,a){var m=s?s.initializer?s.initializer.call(t):s.value:void 0;ba(t,n,m,i)}),r=(typeof process<"u"&&process.env,e);return r.enhancer=i,r}var ts={deep:!0,name:void 0,defaultDecorator:void 0},zo={deep:!1,name:void 0,defaultDecorator:void 0};Object.freeze(ts);Object.freeze(zo);function Tt(i){return i==null?ts:typeof i=="string"?{name:i,deep:!0}:i}function Ai(i){return i.defaultDecorator?i.defaultDecorator.enhancer:i.deep===!1?ii:oi}var xn=ki(oi),Io=ki(Po),is=ki(ii),ko=ki(Lo);function Fo(i,e,r){if(typeof arguments[1]=="string")return xn.apply(null,arguments);if(Cs(i))return i;var t=zt(i)?M.object(i,e,r):Array.isArray(i)?M.array(i,e):It(i)?M.map(i,e):si(i)?M.set(i,e):i;if(t!==i)return t;k(!1)}var Br={box:function(i,e){arguments.length>2&&we("box");var r=Tt(e);return new Ue(i,Ai(r),r.name,!0,r.equals)},shallowBox:function(i,e){return arguments.length>2&&we("shallowBox"),De("observable.shallowBox","observable.box(value, { deep: false })"),M.box(i,{name:e,deep:!1})},array:function(i,e){arguments.length>2&&we("array");var r=Tt(e);return new Pe(i,Ai(r),r.name)},shallowArray:function(i,e){return arguments.length>2&&we("shallowArray"),De("observable.shallowArray","observable.array(values, { deep: false })"),M.array(i,{name:e,deep:!1})},map:function(i,e){arguments.length>2&&we("map");var r=Tt(e);return new Hi(i,Ai(r),r.name)},shallowMap:function(i,e){return arguments.length>2&&we("shallowMap"),De("observable.shallowMap","observable.map(values, { deep: false })"),M.map(i,{name:e,deep:!1})},set:function(i,e){arguments.length>2&&we("set");var r=Tt(e);return new Bi(i,Ai(r),r.name)},object:function(i,e,r){typeof arguments[1]=="string"&&we("object");var t=Tt(r);return sa({},i,e,t)},shallowObject:function(i,e){return typeof arguments[1]=="string"&&we("shallowObject"),De("observable.shallowObject","observable.object(values, {}, { deep: false })"),M.object(i,{},{name:e,deep:!1})},ref:is,shallow:Io,deep:xn,struct:ko},M=Fo;Object.keys(Br).forEach(function(i){return M[i]=Br[i]});function we(i){k("Expected one or two arguments to observable."+i+". Did you accidentally try to use observable."+i+" as decorator?")}var Oi=es(!1,function(i,e,r,t,n){var s=r.get,o=r.set,a=n[0]||{};ya(i,e,te({get:s,set:o},a))}),Ro=Oi({equals:Lt.structural}),U=function(e,r,t){if(typeof r=="string"||e!==null&&typeof e=="object"&&arguments.length===1)return Oi.apply(null,arguments);var n=typeof r=="object"?r:{};return n.get=e,n.set=typeof r=="function"?r:n.set,n.name=n.name||e.name||"",new $e(n)};U.struct=Ro;var O=(function(i){return i[i.NOT_TRACKING=-1]="NOT_TRACKING",i[i.UP_TO_DATE=0]="UP_TO_DATE",i[i.POSSIBLY_STALE=1]="POSSIBLY_STALE",i[i.STALE=2]="STALE",i})(O||{}),Se=(function(i){return i[i.NONE=0]="NONE",i[i.LOG=1]="LOG",i[i.BREAK=2]="BREAK",i})(Se||{}),Ti=(function(){function i(e){this.cause=e}return i})();function Zt(i){return i instanceof Ti}function pn(i){switch(i.dependenciesState){case O.UP_TO_DATE:return!1;case O.NOT_TRACKING:case O.STALE:return!0;case O.POSSIBLY_STALE:{for(var e=kt(),r=i.observing,t=r.length,n=0;n<t;n++){var s=r[n];if(Ri(s)){if(v.disableErrorBoundaries)s.get();else try{s.get()}catch{return Ge(e),!0}if(i.dependenciesState===O.STALE)return Ge(e),!0}}return as(i),Ge(e),!1}}}function Fi(i){var e=i.observers.length>0;v.computationDepth>0&&e&&k(!1),!v.allowStateChanges&&(e||v.enforceActions==="strict")&&k(!1)}function ns(i,e,r){var t=ss(!0);as(i),i.newObserving=new Array(i.observing.length+100),i.unboundDepsCount=0,i.runId=++v.runId;var n=v.trackingDerivation;v.trackingDerivation=i;var s;if(v.disableErrorBoundaries===!0)s=e.call(r);else try{s=e.call(r)}catch(o){s=new Ti(o)}return v.trackingDerivation=n,Vo(i),i.observing.length===0&&void 0,os(t),s}function Vo(i){for(var e=i.observing,r=i.observing=i.newObserving,t=O.UP_TO_DATE,n=0,s=i.unboundDepsCount,o=0;o<s;o++){var a=r[o];a.diffValue===0&&(a.diffValue=1,n!==o&&(r[n]=a),n++),a.dependenciesState>t&&(t=a.dependenciesState)}for(r.length=n,i.newObserving=null,s=e.length;s--;){var a=e[s];a.diffValue===0&&ds(a,i),a.diffValue=0}for(;n--;){var a=r[n];a.diffValue===1&&(a.diffValue=0,$o(a,i))}t!==O.UP_TO_DATE&&(i.dependenciesState=t,i.onBecomeStale())}function hn(i){var e=i.observing;i.observing=[];for(var r=e.length;r--;)ds(e[r],i);i.dependenciesState=O.NOT_TRACKING}function rs(i){var e=kt(),r=i();return Ge(e),r}function kt(){var i=v.trackingDerivation;return v.trackingDerivation=null,i}function Ge(i){v.trackingDerivation=i}function ss(i){var e=v.allowStateReads;return v.allowStateReads=i,e}function os(i){v.allowStateReads=i}function as(i){if(i.dependenciesState!==O.UP_TO_DATE){i.dependenciesState=O.UP_TO_DATE;for(var e=i.observing,r=e.length;r--;)e[r].lowestObserverState=O.UP_TO_DATE}}var Pi=0,Ho=1;function ot(i,e){var r=function(){return Bo(i,e,this,arguments)};return r.isMobxAction=!0,r}function Bo(i,e,r,t){var n=jo(i,r,t);try{return e.apply(r,t)}catch(s){throw n.error=s,s}finally{Go(n)}}function jo(i,e,r){var t=K()&&!!i,n=0;if(t){n=Date.now();var s=r&&r.length||0,o=new Array(s);if(s>0)for(var a=0;a<s;a++)o[a]=r[a];ce({type:"action",name:i,object:e,arguments:o})}var m=kt();Ne();var C=ls(!0),I=ss(!0),ne={prevDerivation:m,prevAllowStateChanges:C,prevAllowStateReads:I,notifySpy:t,startTime:n,actionId:Ho++,parentActionId:Pi};return Pi=ne.actionId,ne}function Go(i){Pi!==i.actionId&&k("invalid action stack. did you forget to finish an action?"),Pi=i.parentActionId,i.error!==void 0&&(v.suppressReactionErrors=!0),cs(i.prevAllowStateChanges),os(i.prevAllowStateReads),Oe(),Ge(i.prevDerivation),i.notifySpy&&de({time:Date.now()-i.startTime}),v.suppressReactionErrors=!1}function ls(i){var e=v.allowStateChanges;return v.allowStateChanges=i,e}function cs(i){v.allowStateChanges=i}var Ue=(function(i){Yr(e,i);function e(r,t,n,s,o){n===void 0&&(n="ObservableValue@"+ie()),s===void 0&&(s=!0),o===void 0&&(o=Lt.default);var a=i.call(this,n)||this;return a.enhancer=t,a.name=n,a.equals=o,a.hasUnreportedChange=!1,a.value=t(r,void 0,n),s&&K()&&lt({type:"create",name:a.name,newValue:""+a.value}),a}return e.prototype.dehanceValue=function(r){return this.dehancer!==void 0?this.dehancer(r):r},e.prototype.set=function(r){var t=this.value;if(r=this.prepareNewValue(r),r!==v.UNCHANGED){var n=K();n&&ce({type:"update",name:this.name,newValue:r,oldValue:t}),this.setNewValue(r),n&&de()}},e.prototype.prepareNewValue=function(r){if(Fi(this),_e(this)){var t=Ee(this,{object:this,type:"update",newValue:r});if(!t)return v.UNCHANGED;r=t.newValue}return r=this.enhancer(r,this.value,this.name),this.equals(this.value,r)?v.UNCHANGED:r},e.prototype.setNewValue=function(r){var t=this.value;this.value=r,this.reportChanged(),ue(this)&&fe(this,{type:"update",object:this,newValue:r,oldValue:t})},e.prototype.get=function(){return this.reportObserved(),this.dehanceValue(this.value)},e.prototype.intercept=function(r){return li(this,r)},e.prototype.observe=function(r,t){return t&&r({object:this,type:"update",newValue:this.value,oldValue:void 0}),ci(this,r)},e.prototype.toJSON=function(){return this.get()},e.prototype.toString=function(){return this.name+"["+this.value+"]"},e.prototype.valueOf=function(){return Jr(this.get())},e})(Ii);Ue.prototype[Qr()]=Ue.prototype.valueOf;var Al=qe("ObservableValue",Ue),$e=(function(){function i(e){this.dependenciesState=O.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=O.UP_TO_DATE,this.unboundDepsCount=0,this.__mapid="#"+ie(),this.value=new Ti(null),this.isComputing=!1,this.isRunningSetter=!1,this.isTracing=Se.NONE,this.derivation=e.get,this.name=e.name||"ComputedValue@"+ie(),e.set&&(this.setter=ot(this.name+"-setter",e.set)),this.equals=e.equals||(e.compareStructural||e.struct?Lt.structural:Lt.default),this.scope=e.context,this.requiresReaction=!!e.requiresReaction,this.keepAlive=!!e.keepAlive}return i.prototype.onBecomeStale=function(){Ko(this)},i.prototype.onBecomeUnobserved=function(){},i.prototype.onBecomeObserved=function(){},i.prototype.get=function(){this.isComputing&&k("Cycle detected in computation "+this.name+": "+this.derivation),v.inBatch===0&&this.observers.length===0&&!this.keepAlive?pn(this)&&(this.warnAboutUntrackedRead(),Ne(),this.value=this.computeValue(!1),Oe()):(fs(this),pn(this)&&this.trackAndCompute()&&Wo(this));var e=this.value;if(Zt(e))throw e.cause;return e},i.prototype.peek=function(){var e=this.computeValue(!1);if(Zt(e))throw e.cause;return e},i.prototype.set=function(e){if(this.setter){ei(!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 ei(!1,!1)},i.prototype.trackAndCompute=function(){K()&&lt({object:this.scope,type:"compute",name:this.name});var e=this.value,r=this.dependenciesState===O.NOT_TRACKING,t=this.computeValue(!0),n=r||Zt(e)||Zt(t)||!this.equals(e,t);return n&&(this.value=t),n},i.prototype.computeValue=function(e){this.isComputing=!0,v.computationDepth++;var r;if(e)r=ns(this,this.derivation,this.scope);else if(v.disableErrorBoundaries===!0)r=this.derivation.call(this.scope);else try{r=this.derivation.call(this.scope)}catch(t){r=new Ti(t)}return v.computationDepth--,this.isComputing=!1,r},i.prototype.suspend=function(){this.keepAlive||(hn(this),this.value=void 0)},i.prototype.observe=function(e,r){var t=this,n=!0,s=void 0;return ai(function(){var o=t.get();if(!n||r){var a=kt();e({type:"update",object:t,newValue:o,oldValue:s}),Ge(a)}n=!1,s=o})},i.prototype.warnAboutUntrackedRead=function(){},i.prototype.toJSON=function(){return this.get()},i.prototype.toString=function(){return this.name+"["+this.derivation.toString()+"]"},i.prototype.valueOf=function(){return Jr(this.get())},i})();$e.prototype[Qr()]=$e.prototype.valueOf;var Ri=qe("ComputedValue",$e);var an=(function(){function i(){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 i})(),ln=!0,Uo=!1,v=(function(){var i=fn();return i.__mobxInstanceCount>0&&!i.__mobxGlobals&&(ln=!1),i.__mobxGlobals&&i.__mobxGlobals.version!==new an().version&&(ln=!1),ln?i.__mobxGlobals?(i.__mobxInstanceCount+=1,i.__mobxGlobals.UNCHANGED||(i.__mobxGlobals.UNCHANGED={}),i.__mobxGlobals):(i.__mobxInstanceCount=1,i.__mobxGlobals=new an):(setTimeout(function(){Uo||k("There are multiple, different versions of MobX active. Make sure MobX is loaded only once or use `configure({ isolateGlobalState: true })`")},1),new an)})();function $o(i,e){var r=i.observers.length;r&&(i.observersIndexes[e.__mapid]=r),i.observers[r]=e,i.lowestObserverState>e.dependenciesState&&(i.lowestObserverState=e.dependenciesState)}function ds(i,e){if(i.observers.length===1)i.observers.length=0,us(i);else{var r=i.observers,t=i.observersIndexes,n=r.pop();if(n!==e){var s=t[e.__mapid]||0;s?t[n.__mapid]=s:delete t[n.__mapid],r[s]=n}delete t[e.__mapid]}}function us(i){i.isPendingUnobservation===!1&&(i.isPendingUnobservation=!0,v.pendingUnobservations.push(i))}function Ne(){v.inBatch++}function Oe(){if(--v.inBatch===0){ms();for(var i=v.pendingUnobservations,e=0;e<i.length;e++){var r=i[e];r.isPendingUnobservation=!1,r.observers.length===0&&(r.isBeingObserved&&(r.isBeingObserved=!1,r.onBecomeUnobserved()),r instanceof $e&&r.suspend())}v.pendingUnobservations=[]}}function fs(i){var e=v.trackingDerivation;return e!==null?(e.runId!==i.lastAccessedBy&&(i.lastAccessedBy=e.runId,e.newObserving[e.unboundDepsCount++]=i,i.isBeingObserved||(i.isBeingObserved=!0,i.onBecomeObserved())),!0):(i.observers.length===0&&v.inBatch>0&&us(i),!1)}function qo(i){if(i.lowestObserverState!==O.STALE){i.lowestObserverState=O.STALE;for(var e=i.observers,r=e.length;r--;){var t=e[r];t.dependenciesState===O.UP_TO_DATE&&(t.isTracing!==Se.NONE&&ps(t,i),t.onBecomeStale()),t.dependenciesState=O.STALE}}}function Wo(i){if(i.lowestObserverState!==O.STALE){i.lowestObserverState=O.STALE;for(var e=i.observers,r=e.length;r--;){var t=e[r];t.dependenciesState===O.POSSIBLY_STALE?t.dependenciesState=O.STALE:t.dependenciesState===O.UP_TO_DATE&&(i.lowestObserverState=O.UP_TO_DATE)}}}function Ko(i){if(i.lowestObserverState===O.UP_TO_DATE){i.lowestObserverState=O.POSSIBLY_STALE;for(var e=i.observers,r=e.length;r--;){var t=e[r];t.dependenciesState===O.UP_TO_DATE&&(t.dependenciesState=O.POSSIBLY_STALE,t.isTracing!==Se.NONE&&ps(t,i),t.onBecomeStale())}}}function ps(i,e){if(console.log("[mobx.trace] '"+i.name+"' is invalidated due to a change in: '"+e.name+"'"),i.isTracing===Se.BREAK){var r=[];hs(oa(i),r,1),new Function(`debugger;
2
2
  /*
3
3
  Tracing '`+i.name+`'
4
4
 
@@ -1 +1 @@
1
- import{Na as ee,Ra as te}from"./chunk-FR4AOLYL.js";import{Cb as f,Eb as P,Ed as J,Fd as K,Ib as D,Jb as I,Kb as F,Lb as M,Lf as Y,Ma as s,Mb as d,Nb as R,Pb as q,Tb as O,Ub as B,Vb as N,Xa as g,Zc as x,ad as Q,ag as $,bb as L,be as X,dc as A,ed as W,fc as G,ha as E,jb as C,jd as j,kb as y,ma as c,na as u,pb as w,qb as l,rb as m,sb as b,tb as T,td as z,ub as S,va as k,vb as V,wd as H,xd as U,yd as Z,zb as v}from"./chunk-HW2H3ISM.js";var ae=["Password"];function le(n,i){n&1&&(l(0,"label",1),q(1,"Password"),m())}function de(n,i){if(n&1){let _=v();l(0,"div",5),f("click",function(){c(_);let e=P();return u(e.randomPassword())}),l(1,"span"),b(2,"fa-icon",6),m()()}if(n&2){let _=P();s(2),w("icon",_.icons.faDice)}}var ve=(()=>{let i=class i{constructor(){this.passwordChange=new L,this.passwordMinLength=8,this.showGenerator=!1,this.showLabel=!1,this.disabled=!1,this.isRequired=!1,this.focus=!1,this.locale=E(Z),this.toggleVisiblePassword=te,this.icons={faEye:X,faEyeSlash:Y,faDice:$}}ngOnInit(){this.focus&&setTimeout(()=>{this.passwordElement.nativeElement.focus(),this.passwordElement.nativeElement.select()},0)}randomPassword(){this.disabled||this.passwordChange.emit(ee(this.passwordMinLength+2))}};i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=g({type:i,selectors:[["app-input-password"]],viewQuery:function(e,t){if(e&1&&D(ae,7),e&2){let r;I(r=F())&&(t.passwordElement=r.first)}},inputs:{password:"password",passwordMinLength:"passwordMinLength",placeholder:"placeholder",showGenerator:"showGenerator",showLabel:"showLabel",disabled:"disabled",isRequired:"isRequired",focus:"focus"},outputs:{passwordChange:"passwordChange"},decls:9,vars:12,consts:[["Password",""],["for","password","l10nTranslate",""],["id","password",1,"input-group","input-group-sm",2,"min-width","150px"],["autocomplete","off","type","password",1,"form-control","form-control-sm",3,"ngModelChange","keyup","ngModel","disabled","placeholder","required"],[1,"input-group-text","cursor-pointer"],[1,"input-group-text","cursor-pointer",3,"click"],[3,"icon"]],template:function(e,t){if(e&1){let r=v();C(0,le,2,0,"label",1),l(1,"div",2)(2,"input",3,0),A(4,"translate"),N("ngModelChange",function(a){return c(r),B(t.password,a)||(t.password=a),u(a)}),f("keyup",function(){return c(r),u(t.passwordChange.emit(t.password))}),m(),C(5,de,3,1,"div",4),l(6,"div",5),f("click",function(){c(r);let a=M(3);return u(t.toggleVisiblePassword(a))}),l(7,"span"),b(8,"fa-icon",6),m()()()}if(e&2){let r=M(3);y(t.showLabel?0:-1),s(2),R("is-invalid",t.isRequired&&(t.password==null?null:t.password.length)<t.passwordMinLength),O("ngModel",t.password),w("disabled",t.disabled)("placeholder",G(4,9,t.placeholder,t.locale.language))("required",t.isRequired),s(3),y(t.showGenerator?5:-1),s(3),w("icon",r.type==="text"?t.icons.faEye:t.icons.faEyeSlash)}},dependencies:[H,Q,W,z,j,U,x,K,J],encapsulation:2});let n=i;return n})();var Me=(()=>{let i=class i{constructor(){this.passwordToCheck="",this.bar0="",this.bar1="",this.bar2="",this.bar3="",this.bar4="",this.colors=["#F00","#F90","#FF0","#7ACC00","#06854B"]}static measureStrength(o){let e=0,t=/[$-/:-?{-~!"^_`[\]]/g,r=/[a-z]+/.test(o),h=/[A-Z]+/.test(o),a=/[0-9]+/.test(o),oe=t.test(o),ie=[r,h,a,oe],p=0;for(let ne of ie)p+=ne===!0?1:0;return e+=2*o.length+(o.length>=10?1:0),e+=p*10,e=o.length<=6?Math.min(e,10):e,e=p===1?Math.min(e,10):e,e=p===2?Math.min(e,20):e,e=p===3?Math.min(e,40):e,e}ngOnChanges(o){let e=o.passwordToCheck.currentValue;if(this.setBarColors(5,"#DDD"),e){let t=this.getColor(i.measureStrength(e));this.setBarColors(t.idx,t.col)}}getColor(o){let e=Math.min(Math.floor((o-1)/10),4);return{idx:e+1,col:this.colors[e]}}setBarColors(o,e){for(let t=0;t<o;t++)this[`bar${t}`]=e}};i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=g({type:i,selectors:[["app-password-strength-bar"]],inputs:{passwordToCheck:"passwordToCheck"},features:[k],decls:8,vars:10,consts:[["strength",""],["id","strength"],["id","strengthBar"],[1,"point"]],template:function(e,t){e&1&&(T(0,"div",1,0)(2,"ul",2),V(3,"li",3)(4,"li",3)(5,"li",3)(6,"li",3)(7,"li",3),S()()),e&2&&(s(3),d("background-color",t.bar0),s(),d("background-color",t.bar1),s(),d("background-color",t.bar2),s(),d("background-color",t.bar3),s(),d("background-color",t.bar4))},styles:["ul#strengthBar[_ngcontent-%COMP%]{display:flex;list-style:none;padding:0;align-self:center;margin-bottom:-2px}.point[_ngcontent-%COMP%]:last-child{margin:0!important}.point[_ngcontent-%COMP%]{background:#ddd;border-radius:2px;height:6px;margin-right:1px;width:20px}"],changeDetection:0});let n=i;return n})();export{ve as a,Me as b};
1
+ import{Na as ee,Ra as te}from"./chunk-4U5A2DEP.js";import{Cb as f,Eb as P,Ed as J,Fd as K,Ib as D,Jb as I,Kb as F,Lb as M,Lf as Y,Ma as s,Mb as d,Nb as R,Pb as q,Tb as O,Ub as B,Vb as N,Xa as g,Zc as x,ad as Q,ag as $,bb as L,be as X,dc as A,ed as W,fc as G,ha as E,jb as C,jd as j,kb as y,ma as c,na as u,pb as w,qb as l,rb as m,sb as b,tb as T,td as z,ub as S,va as k,vb as V,wd as H,xd as U,yd as Z,zb as v}from"./chunk-HW2H3ISM.js";var ae=["Password"];function le(n,i){n&1&&(l(0,"label",1),q(1,"Password"),m())}function de(n,i){if(n&1){let _=v();l(0,"div",5),f("click",function(){c(_);let e=P();return u(e.randomPassword())}),l(1,"span"),b(2,"fa-icon",6),m()()}if(n&2){let _=P();s(2),w("icon",_.icons.faDice)}}var ve=(()=>{let i=class i{constructor(){this.passwordChange=new L,this.passwordMinLength=8,this.showGenerator=!1,this.showLabel=!1,this.disabled=!1,this.isRequired=!1,this.focus=!1,this.locale=E(Z),this.toggleVisiblePassword=te,this.icons={faEye:X,faEyeSlash:Y,faDice:$}}ngOnInit(){this.focus&&setTimeout(()=>{this.passwordElement.nativeElement.focus(),this.passwordElement.nativeElement.select()},0)}randomPassword(){this.disabled||this.passwordChange.emit(ee(this.passwordMinLength+2))}};i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=g({type:i,selectors:[["app-input-password"]],viewQuery:function(e,t){if(e&1&&D(ae,7),e&2){let r;I(r=F())&&(t.passwordElement=r.first)}},inputs:{password:"password",passwordMinLength:"passwordMinLength",placeholder:"placeholder",showGenerator:"showGenerator",showLabel:"showLabel",disabled:"disabled",isRequired:"isRequired",focus:"focus"},outputs:{passwordChange:"passwordChange"},decls:9,vars:12,consts:[["Password",""],["for","password","l10nTranslate",""],["id","password",1,"input-group","input-group-sm",2,"min-width","150px"],["autocomplete","off","type","password",1,"form-control","form-control-sm",3,"ngModelChange","keyup","ngModel","disabled","placeholder","required"],[1,"input-group-text","cursor-pointer"],[1,"input-group-text","cursor-pointer",3,"click"],[3,"icon"]],template:function(e,t){if(e&1){let r=v();C(0,le,2,0,"label",1),l(1,"div",2)(2,"input",3,0),A(4,"translate"),N("ngModelChange",function(a){return c(r),B(t.password,a)||(t.password=a),u(a)}),f("keyup",function(){return c(r),u(t.passwordChange.emit(t.password))}),m(),C(5,de,3,1,"div",4),l(6,"div",5),f("click",function(){c(r);let a=M(3);return u(t.toggleVisiblePassword(a))}),l(7,"span"),b(8,"fa-icon",6),m()()()}if(e&2){let r=M(3);y(t.showLabel?0:-1),s(2),R("is-invalid",t.isRequired&&(t.password==null?null:t.password.length)<t.passwordMinLength),O("ngModel",t.password),w("disabled",t.disabled)("placeholder",G(4,9,t.placeholder,t.locale.language))("required",t.isRequired),s(3),y(t.showGenerator?5:-1),s(3),w("icon",r.type==="text"?t.icons.faEye:t.icons.faEyeSlash)}},dependencies:[H,Q,W,z,j,U,x,K,J],encapsulation:2});let n=i;return n})();var Me=(()=>{let i=class i{constructor(){this.passwordToCheck="",this.bar0="",this.bar1="",this.bar2="",this.bar3="",this.bar4="",this.colors=["#F00","#F90","#FF0","#7ACC00","#06854B"]}static measureStrength(o){let e=0,t=/[$-/:-?{-~!"^_`[\]]/g,r=/[a-z]+/.test(o),h=/[A-Z]+/.test(o),a=/[0-9]+/.test(o),oe=t.test(o),ie=[r,h,a,oe],p=0;for(let ne of ie)p+=ne===!0?1:0;return e+=2*o.length+(o.length>=10?1:0),e+=p*10,e=o.length<=6?Math.min(e,10):e,e=p===1?Math.min(e,10):e,e=p===2?Math.min(e,20):e,e=p===3?Math.min(e,40):e,e}ngOnChanges(o){let e=o.passwordToCheck.currentValue;if(this.setBarColors(5,"#DDD"),e){let t=this.getColor(i.measureStrength(e));this.setBarColors(t.idx,t.col)}}getColor(o){let e=Math.min(Math.floor((o-1)/10),4);return{idx:e+1,col:this.colors[e]}}setBarColors(o,e){for(let t=0;t<o;t++)this[`bar${t}`]=e}};i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=g({type:i,selectors:[["app-password-strength-bar"]],inputs:{passwordToCheck:"passwordToCheck"},features:[k],decls:8,vars:10,consts:[["strength",""],["id","strength"],["id","strengthBar"],[1,"point"]],template:function(e,t){e&1&&(T(0,"div",1,0)(2,"ul",2),V(3,"li",3)(4,"li",3)(5,"li",3)(6,"li",3)(7,"li",3),S()()),e&2&&(s(3),d("background-color",t.bar0),s(),d("background-color",t.bar1),s(),d("background-color",t.bar2),s(),d("background-color",t.bar3),s(),d("background-color",t.bar4))},styles:["ul#strengthBar[_ngcontent-%COMP%]{display:flex;list-style:none;padding:0;align-self:center;margin-bottom:-2px}.point[_ngcontent-%COMP%]:last-child{margin:0!important}.point[_ngcontent-%COMP%]{background:#ddd;border-radius:2px;height:6px;margin-right:1px;width:20px}"],changeDetection:0});let n=i;return n})();export{ve as a,Me as b};
@@ -1 +1 @@
1
- import{a as z}from"./chunk-KQZJSEM3.js";import"./chunk-NPEMJJIU.js";import{a as L,b as Q,c as xe,d as Ce}from"./chunk-45UQJGGY.js";import{g as he}from"./chunk-EILQG525.js";import{B as ee,Gb as ue,Hb as $,Ib as O,Ja as se,Qa as ce,Xa as pe,kb as _e,nb as me,pa as re,qa as ae,ra as le,v as Y,w as Z,wb as de}from"./chunk-FR4AOLYL.js";import"./chunk-22EANI6R.js";import{d as W}from"./chunk-BIUNUYZ5.js";import{Cb as x,Eb as a,Ed as G,Fd as X,Gc as U,Ib as b,If as ie,Jb as V,Kb as M,Ma as l,Mb as g,Nb as E,Ob as N,Pb as d,Qb as B,Rb as v,Sb as q,Ue as te,Uf as ne,Xa as H,Yb as K,Zc as j,Zf as oe,ab as k,dc as f,fc as T,ha as S,ib as D,jb as C,kb as h,ma as _,na as m,nb as P,ob as F,pb as u,qb as s,rb as p,sb as w,yd as J,zb as y}from"./chunk-HW2H3ISM.js";import"./chunk-RTRJ3KFH.js";var I=class{constructor(r){this.newly=0,this.isPersonal=!1,Object.assign(this,r),this.isPersonal=this.alias===me.PERSONAL,this.hTimeAgo=(0,ee.default)(this.mtime).fromNow(!0),this.newly=ce(this.mtime)}};var we=["MainContextMenu"],ge=["TargetContextMenu"],fe=(t,r)=>r.id,Te=(t,r)=>r.key;function ye(t,r){if(t&1&&(s(0,"span",25),d(1),p()),t&2){let e=a().$implicit,i=a(2);g("font-size",i.galleryMode.textSize,"px"),l(),B(e.hTimeAgo)}}function ve(t,r){if(t&1&&(d(0),f(1,"translate")),t&2){let e=a().$implicit,i=a(2);v(" ",T(1,1,e.name,i.locale.language)," ")}}function Se(t,r){if(t&1&&d(0),t&2){let e=a().$implicit;v(" ",e.name," ")}}function be(t,r){if(t&1){let e=y();s(0,"div",16),x("click",function(){let n=_(e).$implicit,o=a(2);return m(o.onSelect(n))})("contextmenu",function(n){let o=_(e).$implicit,c=a(2);return m(c.onTargetContextMenu(n,o))})("pressup",function(n){let o=_(e).$implicit,c=a(2);return m(c.onTargetContextMenu(n,o))})("tap",function(){let n=_(e).$implicit,o=a(2);return m(o.browse(n))}),s(1,"div",17),w(2,"fa-icon",18),s(3,"span",19),C(4,ye,2,3,"span",20),p(),s(5,"span",21)(6,"span",22),d(7),p()()(),s(8,"div",23)(9,"span",24),C(10,ve,2,4)(11,Se,1,1),p()()()}if(t&2){let e=r.$implicit,i=r.$index,n=a(2);g("height",n.galleryMode.dimensions,"px")("width",n.galleryMode.dimensions,"px"),E("selected",e.id===(n.selected==null?null:n.selected.id)),l(),D("rowIndex",i),l(),g("min-width",n.galleryMode.image,"px")("min-height",n.galleryMode.image,"px")("font-size",n.galleryMode.faSize,"px"),u("icon",e.isPersonal?n.icons.PERSONAL:n.icons.SPACES),l(2),h(e.newly?4:-1),l(2),g("font-size",n.galleryMode.textSize,"px"),l(),B(e.nb),l(2),g("font-size",n.galleryMode.textSize,"px"),l(),h(e.isPersonal?10:11)}}function Ve(t,r){if(t&1){let e=y();s(0,"div",9)(1,"app-virtual-scroll",13),f(2,"searchFilter"),x("contextmenu",function(n){_(e);let o=a();return m(o.onContextMenu(n))}),s(3,"div",14),P(4,be,12,21,"div",15,fe),p()()()}if(t&2){let e=a();l(),u("childHeight",e.galleryMode.dimensions)("childWidth",e.galleryMode.dimensions)("items",T(2,5,e.trashBins,e.inputFilter.search()))("galleryMode",!0)("resizeOffset",110),l(3),F(e.scrollView==null?null:e.scrollView.viewPortItems)}}function Me(t,r){if(t&1&&w(0,"fa-icon",32),t&2){let e=a(4);u("icon",e.sortTable.sortParam.asc?e.icons.faArrowDown:e.icons.faArrowUp)("fixedWidth",!1)}}function Pe(t,r){if(t&1){let e=y();s(0,"th",31),x("click",function(){_(e);let n=a().$implicit,o=a(2);return m(o.sortBy(n.key))}),d(1),C(2,Me,1,2,"fa-icon",32),p()}if(t&2){let e=a().$implicit,i=a(2);N(e.value.class),g("width",e.value.width,"%"),E("text-align-center",e.value.textCenter)("cursor-pointer",e.value.sortable),l(),v(" ",e.value.label," "),l(),h(i.sortTable.sortParam.column===e.key?2:-1)}}function Fe(t,r){if(t&1&&C(0,Pe,3,10,"th",30),t&2){let e=r.$implicit;h(e.value.show?0:-1)}}function Ee(t,r){if(t&1&&(d(0),f(1,"translate")),t&2){let e=a(4).$implicit,i=a(2);v(" ",T(1,1,e.name,i.locale.language)," ")}}function Ae(t,r){if(t&1&&d(0),t&2){let e=a(4).$implicit;v(" ",e.name," ")}}function Be(t,r){if(t&1&&(s(0,"div",35),w(1,"fa-icon",18),s(2,"span",24),C(3,Ee,2,4)(4,Ae,1,1),p()()),t&2){let e=a(3).$implicit,i=a(2);l(),u("icon",e.isPersonal?i.icons.PERSONAL:i.icons.SPACES),l(2),h(e.isPersonal?3:4)}}function $e(t,r){if(t&1&&(s(0,"span",22),d(1),p()),t&2){let e=a(3).$implicit;l(),B(e.nb)}}function Ie(t,r){if(t&1&&d(0),t&2){let e=a(3).$implicit;v(" ",e.hTimeAgo," ")}}function Re(t,r){if(t&1&&(s(0,"td"),C(1,Be,5,2,"div",35)(2,$e,2,1,"span",22)(3,Ie,1,1),p()),t&2){let e,i=a().$implicit,n=a().$implicit;N(K("",i.value.class," ",i.value.newly?"prop-newly-"+n[i.value.newly]:"")),g("width",i.value.width,"%"),E("text-align-center",i.value.textCenter),l(),h((e=i.key)==="name"?1:e==="nb"?2:e==="modified"?3:-1)}}function ke(t,r){if(t&1&&C(0,Re,4,9,"td",34),t&2){let e=r.$implicit;h(e.value.show?0:-1)}}function Ne(t,r){if(t&1){let e=y();s(0,"tr",33),x("click",function(){let n=_(e).$implicit,o=a(2);return m(o.onSelect(n))})("contextmenu",function(n){let o=_(e).$implicit,c=a(2);return m(c.onTargetContextMenu(n,o))})("pressup",function(n){let o=_(e).$implicit,c=a(2);return m(c.onTargetContextMenu(n,o))})("tap",function(){let n=_(e).$implicit,o=a(2);return m(o.browse(n))}),P(1,ke,1,1,null,null,Te),f(3,"keyvalue"),p()}if(t&2){let e=r.$implicit,i=a(2);E("selected",e.id===(i.selected==null?null:i.selected.id)),l(),F(T(3,2,i.tableHeaders,i.originalOrderKeyValue))}}function Oe(t,r){if(t&1){let e=y();s(0,"table",26)(1,"thead")(2,"tr"),P(3,Fe,1,1,null,null,Te),f(5,"keyvalue"),p()()(),s(6,"app-virtual-scroll",27),f(7,"searchFilter"),x("contextmenu",function(n){_(e);let o=a();return m(o.onContextMenu(n))}),s(8,"table",26)(9,"tbody",28),P(10,Ne,4,5,"tr",29,fe),p()()()}if(t&2){let e=a();l(3),F(T(5,2,e.tableHeaders,e.originalOrderKeyValue)),l(3),u("bufferAmount",5)("items",T(7,5,e.trashBins,e.inputFilter.search())),l(4),F(e.scrollView==null?null:e.scrollView.viewPortItems)}}function Le(t,r){if(t&1&&(s(0,"span",36),w(1,"fa-icon",37),d(2,"Refresh"),p()),t&2){let e=a();l(),u("icon",e.icons.faArrowRotateRight)}}function Qe(t,r){if(t&1&&(s(0,"span",36),w(1,"fa-icon",37),d(2,"Informations"),p()),t&2){let e=a();l(),u("icon",e.icons.faCircleInfo)}}var Ct=(()=>{let r=class r{constructor(){this.locale=S(J),this.layout=S(de),this.originalOrderKeyValue=pe,this.icons={SPACES:$.SPACES,PERSONAL:$.PERSONAL,faArrowDown:ne,faArrowUp:te,faArrowRotateRight:ie,faCircleInfo:oe},this.TAB_MENU=se,this.loading=!1,this.selected=null,this.trashBins=[],this.tableHeaders={name:{label:"Space",width:50,textCenter:!1,class:"",show:!0,sortable:!0},nb:{label:"Elements",width:10,textCenter:!0,class:"",show:!0,sortable:!0},modified:{label:"Modified",width:10,textCenter:!0,class:"d-none d-lg-table-cell",newly:"newly",show:!0,sortable:!0}},this.btnSortFields={name:"Name",nb:"Elements",mtime:"Modified"},this.router=S(W),this.store=S(_e),this.spacesService=S(he),this.sortSettings={default:[{prop:"isPersonal",type:"number"},{prop:"name",type:"string"}],name:[{prop:"name",type:"string"}],nb:[{prop:"nb",type:"number"}],modified:[{prop:"mtime",type:"date"}]},this.sortTable=new Ce(this.constructor.name,this.sortSettings),this.loadTrashBins(),this.layout.setBreadcrumbIcon($.TRASH),this.layout.setBreadcrumbNav({url:`/${O.TRASH}/${ue.TRASH}`,translating:!0,sameLink:!0})}ngOnInit(){this.galleryMode=this.btnNavigationView.currentView()}loadTrashBins(){this.loading=!0,this.onSelect(),this.spacesService.listTrashBins().subscribe({next:i=>{this.sortBy(this.sortTable.sortParam.column,!1,i.map(n=>new I(n))),this.loading=!1}})}onSelect(i=null){this.selected=i,this.store.trashSelection.set(this.selected)}sortBy(i,n=!0,o){this.trashBins=this.sortTable.sortBy(i,n,o||this.trashBins)}onContextMenu(i){i.preventDefault(),i.stopPropagation(),this.layout.openContextMenu(i,this.mainContextMenu)}onTargetContextMenu(i,n){i.preventDefault(),i.type==="contextmenu"&&i.stopPropagation(),this.onSelect(n),this.layout.openContextMenu(i,this.targetContextMenu)}browse(i){this.router.navigate([O.SPACES_TRASH,i.alias]).catch(console.error)}};r.\u0275fac=function(n){return new(n||r)},r.\u0275cmp=H({type:r,selectors:[["app-spaces-trash"]],viewQuery:function(n,o){if(n&1&&(b(Q,5),b(L,7),b(z,7),b(we,7),b(ge,7)),n&2){let c;V(c=M())&&(o.scrollView=c.first),V(c=M())&&(o.inputFilter=c.first),V(c=M())&&(o.btnNavigationView=c.first),V(c=M())&&(o.mainContextMenu=c.first),V(c=M())&&(o.targetContextMenu=c.first)}},decls:20,vars:14,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"],[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"],["contextMenuItem","",3,"execute"],[1,"app-foot-menu"],[1,"mx-auto"],[3,"contextmenu","childHeight","childWidth","items","galleryMode","resizeOffset"],["tabindex","-1",1,"row","g-0"],[1,"card",3,"selected","height","width"],[1,"card",3,"click","contextmenu","pressup","tap"],[1,"card-body"],[1,"circle-primary-icon",3,"icon"],[1,"label-top-right"],["l10nTranslate","",1,"badge","rounded-pill","bg-warning",3,"font-size"],[1,"label-bottom-right"],[1,"badge","rounded-pill","bg-danger"],[1,"card-footer","text-center","text-truncate","p-1"],["draggable","false",1,"no-pointer-events"],["l10nTranslate","",1,"badge","rounded-pill","bg-warning"],[1,"app-table"],[3,"contextmenu","bufferAmount","items"],["tabindex","-1"],[3,"selected"],["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"],["l10nTranslate",""],[3,"icon"]],template:function(n,o){if(n&1){let c=y();s(0,"div",2)(1,"button",3),f(2,"translate"),x("click",function(){return _(c),m(o.loadTrashBins())}),w(3,"fa-icon",4),p(),s(4,"div",5)(5,"div",6),w(6,"app-input-filter",7),p(),s(7,"app-navigation-view",8),x("sortBy",function(R){return _(c),m(o.sortBy(R))})("switchView",function(R){return _(c),m(o.galleryMode=R)}),p()()(),C(8,Ve,6,8,"div",9)(9,Oe,12,8),s(10,"context-menu",null,0),k(12,Le,3,1,"ng-template",10),x("execute",function(){return _(c),m(o.loadTrashBins())}),p(),s(13,"context-menu",null,1),k(15,Qe,3,1,"ng-template",10),x("execute",function(){return _(c),m(o.layout.showRSideBarTab(o.TAB_MENU.SELECTION))}),p(),s(16,"div",11)(17,"span",12),d(18),f(19,"translate"),p()()}n&2&&(l(),u("tooltip",T(2,8,"Refresh",o.locale.language)),l(2),u("icon",o.icons.faArrowRotateRight)("animation",o.loading?"spin":null),l(4),u("sortParams",o.sortTable.sortParam)("sortFields",o.btnSortFields),l(),h(o.galleryMode!=null&&o.galleryMode.enabled?8:9),l(10),q("",o.trashBins.length," ",T(19,11,"trash bins",o.locale.language)))},dependencies:[j,z,L,Z,Y,Q,X,le,ae,re,G,U,xe],encapsulation:2});let t=r;return t})();export{Ct as TrashComponent};
1
+ import{a as z}from"./chunk-WI7FOANP.js";import"./chunk-NE4NDO45.js";import{a as L,b as Q,c as xe,d as Ce}from"./chunk-54EAZ2UD.js";import{g as he}from"./chunk-MVO4WZLK.js";import{B as ee,Gb as ue,Hb as $,Ib as O,Ja as se,Qa as ce,Xa as pe,kb as _e,nb as me,pa as re,qa as ae,ra as le,v as Y,w as Z,wb as de}from"./chunk-4U5A2DEP.js";import"./chunk-22EANI6R.js";import{d as W}from"./chunk-BIUNUYZ5.js";import{Cb as x,Eb as a,Ed as G,Fd as X,Gc as U,Ib as b,If as ie,Jb as V,Kb as M,Ma as l,Mb as g,Nb as E,Ob as N,Pb as d,Qb as B,Rb as v,Sb as q,Ue as te,Uf as ne,Xa as H,Yb as K,Zc as j,Zf as oe,ab as k,dc as f,fc as T,ha as S,ib as D,jb as C,kb as h,ma as _,na as m,nb as P,ob as F,pb as u,qb as s,rb as p,sb as w,yd as J,zb as y}from"./chunk-HW2H3ISM.js";import"./chunk-RTRJ3KFH.js";var I=class{constructor(r){this.newly=0,this.isPersonal=!1,Object.assign(this,r),this.isPersonal=this.alias===me.PERSONAL,this.hTimeAgo=(0,ee.default)(this.mtime).fromNow(!0),this.newly=ce(this.mtime)}};var we=["MainContextMenu"],ge=["TargetContextMenu"],fe=(t,r)=>r.id,Te=(t,r)=>r.key;function ye(t,r){if(t&1&&(s(0,"span",25),d(1),p()),t&2){let e=a().$implicit,i=a(2);g("font-size",i.galleryMode.textSize,"px"),l(),B(e.hTimeAgo)}}function ve(t,r){if(t&1&&(d(0),f(1,"translate")),t&2){let e=a().$implicit,i=a(2);v(" ",T(1,1,e.name,i.locale.language)," ")}}function Se(t,r){if(t&1&&d(0),t&2){let e=a().$implicit;v(" ",e.name," ")}}function be(t,r){if(t&1){let e=y();s(0,"div",16),x("click",function(){let n=_(e).$implicit,o=a(2);return m(o.onSelect(n))})("contextmenu",function(n){let o=_(e).$implicit,c=a(2);return m(c.onTargetContextMenu(n,o))})("pressup",function(n){let o=_(e).$implicit,c=a(2);return m(c.onTargetContextMenu(n,o))})("tap",function(){let n=_(e).$implicit,o=a(2);return m(o.browse(n))}),s(1,"div",17),w(2,"fa-icon",18),s(3,"span",19),C(4,ye,2,3,"span",20),p(),s(5,"span",21)(6,"span",22),d(7),p()()(),s(8,"div",23)(9,"span",24),C(10,ve,2,4)(11,Se,1,1),p()()()}if(t&2){let e=r.$implicit,i=r.$index,n=a(2);g("height",n.galleryMode.dimensions,"px")("width",n.galleryMode.dimensions,"px"),E("selected",e.id===(n.selected==null?null:n.selected.id)),l(),D("rowIndex",i),l(),g("min-width",n.galleryMode.image,"px")("min-height",n.galleryMode.image,"px")("font-size",n.galleryMode.faSize,"px"),u("icon",e.isPersonal?n.icons.PERSONAL:n.icons.SPACES),l(2),h(e.newly?4:-1),l(2),g("font-size",n.galleryMode.textSize,"px"),l(),B(e.nb),l(2),g("font-size",n.galleryMode.textSize,"px"),l(),h(e.isPersonal?10:11)}}function Ve(t,r){if(t&1){let e=y();s(0,"div",9)(1,"app-virtual-scroll",13),f(2,"searchFilter"),x("contextmenu",function(n){_(e);let o=a();return m(o.onContextMenu(n))}),s(3,"div",14),P(4,be,12,21,"div",15,fe),p()()()}if(t&2){let e=a();l(),u("childHeight",e.galleryMode.dimensions)("childWidth",e.galleryMode.dimensions)("items",T(2,5,e.trashBins,e.inputFilter.search()))("galleryMode",!0)("resizeOffset",110),l(3),F(e.scrollView==null?null:e.scrollView.viewPortItems)}}function Me(t,r){if(t&1&&w(0,"fa-icon",32),t&2){let e=a(4);u("icon",e.sortTable.sortParam.asc?e.icons.faArrowDown:e.icons.faArrowUp)("fixedWidth",!1)}}function Pe(t,r){if(t&1){let e=y();s(0,"th",31),x("click",function(){_(e);let n=a().$implicit,o=a(2);return m(o.sortBy(n.key))}),d(1),C(2,Me,1,2,"fa-icon",32),p()}if(t&2){let e=a().$implicit,i=a(2);N(e.value.class),g("width",e.value.width,"%"),E("text-align-center",e.value.textCenter)("cursor-pointer",e.value.sortable),l(),v(" ",e.value.label," "),l(),h(i.sortTable.sortParam.column===e.key?2:-1)}}function Fe(t,r){if(t&1&&C(0,Pe,3,10,"th",30),t&2){let e=r.$implicit;h(e.value.show?0:-1)}}function Ee(t,r){if(t&1&&(d(0),f(1,"translate")),t&2){let e=a(4).$implicit,i=a(2);v(" ",T(1,1,e.name,i.locale.language)," ")}}function Ae(t,r){if(t&1&&d(0),t&2){let e=a(4).$implicit;v(" ",e.name," ")}}function Be(t,r){if(t&1&&(s(0,"div",35),w(1,"fa-icon",18),s(2,"span",24),C(3,Ee,2,4)(4,Ae,1,1),p()()),t&2){let e=a(3).$implicit,i=a(2);l(),u("icon",e.isPersonal?i.icons.PERSONAL:i.icons.SPACES),l(2),h(e.isPersonal?3:4)}}function $e(t,r){if(t&1&&(s(0,"span",22),d(1),p()),t&2){let e=a(3).$implicit;l(),B(e.nb)}}function Ie(t,r){if(t&1&&d(0),t&2){let e=a(3).$implicit;v(" ",e.hTimeAgo," ")}}function Re(t,r){if(t&1&&(s(0,"td"),C(1,Be,5,2,"div",35)(2,$e,2,1,"span",22)(3,Ie,1,1),p()),t&2){let e,i=a().$implicit,n=a().$implicit;N(K("",i.value.class," ",i.value.newly?"prop-newly-"+n[i.value.newly]:"")),g("width",i.value.width,"%"),E("text-align-center",i.value.textCenter),l(),h((e=i.key)==="name"?1:e==="nb"?2:e==="modified"?3:-1)}}function ke(t,r){if(t&1&&C(0,Re,4,9,"td",34),t&2){let e=r.$implicit;h(e.value.show?0:-1)}}function Ne(t,r){if(t&1){let e=y();s(0,"tr",33),x("click",function(){let n=_(e).$implicit,o=a(2);return m(o.onSelect(n))})("contextmenu",function(n){let o=_(e).$implicit,c=a(2);return m(c.onTargetContextMenu(n,o))})("pressup",function(n){let o=_(e).$implicit,c=a(2);return m(c.onTargetContextMenu(n,o))})("tap",function(){let n=_(e).$implicit,o=a(2);return m(o.browse(n))}),P(1,ke,1,1,null,null,Te),f(3,"keyvalue"),p()}if(t&2){let e=r.$implicit,i=a(2);E("selected",e.id===(i.selected==null?null:i.selected.id)),l(),F(T(3,2,i.tableHeaders,i.originalOrderKeyValue))}}function Oe(t,r){if(t&1){let e=y();s(0,"table",26)(1,"thead")(2,"tr"),P(3,Fe,1,1,null,null,Te),f(5,"keyvalue"),p()()(),s(6,"app-virtual-scroll",27),f(7,"searchFilter"),x("contextmenu",function(n){_(e);let o=a();return m(o.onContextMenu(n))}),s(8,"table",26)(9,"tbody",28),P(10,Ne,4,5,"tr",29,fe),p()()()}if(t&2){let e=a();l(3),F(T(5,2,e.tableHeaders,e.originalOrderKeyValue)),l(3),u("bufferAmount",5)("items",T(7,5,e.trashBins,e.inputFilter.search())),l(4),F(e.scrollView==null?null:e.scrollView.viewPortItems)}}function Le(t,r){if(t&1&&(s(0,"span",36),w(1,"fa-icon",37),d(2,"Refresh"),p()),t&2){let e=a();l(),u("icon",e.icons.faArrowRotateRight)}}function Qe(t,r){if(t&1&&(s(0,"span",36),w(1,"fa-icon",37),d(2,"Informations"),p()),t&2){let e=a();l(),u("icon",e.icons.faCircleInfo)}}var Ct=(()=>{let r=class r{constructor(){this.locale=S(J),this.layout=S(de),this.originalOrderKeyValue=pe,this.icons={SPACES:$.SPACES,PERSONAL:$.PERSONAL,faArrowDown:ne,faArrowUp:te,faArrowRotateRight:ie,faCircleInfo:oe},this.TAB_MENU=se,this.loading=!1,this.selected=null,this.trashBins=[],this.tableHeaders={name:{label:"Space",width:50,textCenter:!1,class:"",show:!0,sortable:!0},nb:{label:"Elements",width:10,textCenter:!0,class:"",show:!0,sortable:!0},modified:{label:"Modified",width:10,textCenter:!0,class:"d-none d-lg-table-cell",newly:"newly",show:!0,sortable:!0}},this.btnSortFields={name:"Name",nb:"Elements",mtime:"Modified"},this.router=S(W),this.store=S(_e),this.spacesService=S(he),this.sortSettings={default:[{prop:"isPersonal",type:"number"},{prop:"name",type:"string"}],name:[{prop:"name",type:"string"}],nb:[{prop:"nb",type:"number"}],modified:[{prop:"mtime",type:"date"}]},this.sortTable=new Ce(this.constructor.name,this.sortSettings),this.loadTrashBins(),this.layout.setBreadcrumbIcon($.TRASH),this.layout.setBreadcrumbNav({url:`/${O.TRASH}/${ue.TRASH}`,translating:!0,sameLink:!0})}ngOnInit(){this.galleryMode=this.btnNavigationView.currentView()}loadTrashBins(){this.loading=!0,this.onSelect(),this.spacesService.listTrashBins().subscribe({next:i=>{this.sortBy(this.sortTable.sortParam.column,!1,i.map(n=>new I(n))),this.loading=!1}})}onSelect(i=null){this.selected=i,this.store.trashSelection.set(this.selected)}sortBy(i,n=!0,o){this.trashBins=this.sortTable.sortBy(i,n,o||this.trashBins)}onContextMenu(i){i.preventDefault(),i.stopPropagation(),this.layout.openContextMenu(i,this.mainContextMenu)}onTargetContextMenu(i,n){i.preventDefault(),i.type==="contextmenu"&&i.stopPropagation(),this.onSelect(n),this.layout.openContextMenu(i,this.targetContextMenu)}browse(i){this.router.navigate([O.SPACES_TRASH,i.alias]).catch(console.error)}};r.\u0275fac=function(n){return new(n||r)},r.\u0275cmp=H({type:r,selectors:[["app-spaces-trash"]],viewQuery:function(n,o){if(n&1&&(b(Q,5),b(L,7),b(z,7),b(we,7),b(ge,7)),n&2){let c;V(c=M())&&(o.scrollView=c.first),V(c=M())&&(o.inputFilter=c.first),V(c=M())&&(o.btnNavigationView=c.first),V(c=M())&&(o.mainContextMenu=c.first),V(c=M())&&(o.targetContextMenu=c.first)}},decls:20,vars:14,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"],[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"],["contextMenuItem","",3,"execute"],[1,"app-foot-menu"],[1,"mx-auto"],[3,"contextmenu","childHeight","childWidth","items","galleryMode","resizeOffset"],["tabindex","-1",1,"row","g-0"],[1,"card",3,"selected","height","width"],[1,"card",3,"click","contextmenu","pressup","tap"],[1,"card-body"],[1,"circle-primary-icon",3,"icon"],[1,"label-top-right"],["l10nTranslate","",1,"badge","rounded-pill","bg-warning",3,"font-size"],[1,"label-bottom-right"],[1,"badge","rounded-pill","bg-danger"],[1,"card-footer","text-center","text-truncate","p-1"],["draggable","false",1,"no-pointer-events"],["l10nTranslate","",1,"badge","rounded-pill","bg-warning"],[1,"app-table"],[3,"contextmenu","bufferAmount","items"],["tabindex","-1"],[3,"selected"],["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"],["l10nTranslate",""],[3,"icon"]],template:function(n,o){if(n&1){let c=y();s(0,"div",2)(1,"button",3),f(2,"translate"),x("click",function(){return _(c),m(o.loadTrashBins())}),w(3,"fa-icon",4),p(),s(4,"div",5)(5,"div",6),w(6,"app-input-filter",7),p(),s(7,"app-navigation-view",8),x("sortBy",function(R){return _(c),m(o.sortBy(R))})("switchView",function(R){return _(c),m(o.galleryMode=R)}),p()()(),C(8,Ve,6,8,"div",9)(9,Oe,12,8),s(10,"context-menu",null,0),k(12,Le,3,1,"ng-template",10),x("execute",function(){return _(c),m(o.loadTrashBins())}),p(),s(13,"context-menu",null,1),k(15,Qe,3,1,"ng-template",10),x("execute",function(){return _(c),m(o.layout.showRSideBarTab(o.TAB_MENU.SELECTION))}),p(),s(16,"div",11)(17,"span",12),d(18),f(19,"translate"),p()()}n&2&&(l(),u("tooltip",T(2,8,"Refresh",o.locale.language)),l(2),u("icon",o.icons.faArrowRotateRight)("animation",o.loading?"spin":null),l(4),u("sortParams",o.sortTable.sortParam)("sortFields",o.btnSortFields),l(),h(o.galleryMode!=null&&o.galleryMode.enabled?8:9),l(10),q("",o.trashBins.length," ",T(19,11,"trash bins",o.locale.language)))},dependencies:[j,z,L,Z,Y,Q,X,le,ae,re,G,U,xe],encapsulation:2});let t=r;return t})();export{Ct as TrashComponent};
@@ -1 +1 @@
1
- import{a as yt,c as bt,d as T,e as te,g as Et}from"./chunk-EILQG525.js";import{a as Ct,b as vt}from"./chunk-RASR4CK6.js";import{f as kt}from"./chunk-ENWABUR4.js";import{f as St,g as gt,h as _t}from"./chunk-66FMKVJX.js";import{A as ze,Ca as he,Ea as de,Gb as fe,Hb as R,Ib as H,Jb as mt,La as st,Lb as ht,Nb as dt,Pb as ut,Qb as ft,S as ee,Xa as at,Za as lt,lb as L,ob as ct,v as Ge,va as rt,w as Ze,wb as B,y as Ye,z as Xe}from"./chunk-FR4AOLYL.js";import{d as Y}from"./chunk-BIUNUYZ5.js";import{$b as Le,$c as De,Cb as w,Eb as u,Ed as J,Fd as We,G as oe,Gc as Te,Jd as Qe,L as ve,Lf as ot,Ma as l,Mb as we,Nb as K,Ob as x,Oc as Z,Pb as p,Qb as $,Rb as D,Sb as xe,Tb as le,Ub as ce,Vb as pe,Xa as W,Xb as O,Zc as X,ad as Ne,bb as re,be as Je,bg as ue,ca as P,cb as Ae,cd as z,ce as et,cg as pt,dc as C,dg as N,ed as Re,f as ke,fa as ye,fc as v,fd as Pe,ga as j,gd as me,ha as S,id as f,jb as _,jd as Fe,kb as k,kd as Me,lb as Ie,ld as $e,lf as it,ma as F,na as M,nb as se,nd as Oe,ob as ae,od as Be,p as V,pa as be,pb as m,pd as He,qb as s,qd as Ue,rb as a,rd as Ve,sb as d,sd as Ke,t as Ce,te as tt,tf as nt,v as b,va as Ee,wd as qe,xd as je,yd as Q,zb as G}from"./chunk-HW2H3ISM.js";import{a as y,b as I,c as _e}from"./chunk-RTRJ3KFH.js";function Ft(o,r){if(o&1&&d(0,"fa-icon",2),o&2){let i=u();x(i.repository.class),we("min-width",i.galleryMode.dimensions/3,"px")("min-height",i.galleryMode.dimensions/3,"px")("font-size",i.galleryMode.faSize/1.8,"px"),m("icon",i.repository.icon)}}function Mt(o,r){if(o&1&&d(0,"fa-icon",5),o&2){let i=u(2);x(i.repository.class),m("icon",i.repository.icon)}}function $t(o,r){if(o&1&&(p(0),C(1,"translate")),o&2){let i=u(2);D(" ",v(1,1,i.repository.label,i.locale.language)," ")}}function Ot(o,r){if(o&1&&p(0),o&2){let i=u(2);D(" ",i.repository.label," ")}}function Bt(o,r){if(o&1&&(s(0,"div",1),_(1,Mt,1,3,"fa-icon",3),s(2,"span",4),_(3,$t,2,4)(4,Ot,1,1),a()()),o&2){let i=u();l(),k(i.showIcon?1:-1),l(2),k(i.repository.translate?3:4)}}var At=(()=>{let r=class r{constructor(){this.showIcon=!0,this.showFullPath=!1,this.locale=S(Q),this.layout=S(B),this.unknownRepository={icon:Qe,label:"",class:"circle-primary-icon",translate:!1}}ngOnInit(){this.setRepository()}ngOnChanges(){this.setRepository()}setRepository(){this.share.parent?.id||this.share.parent?.id===0?this.repository={icon:R.SHARES,label:this.share.parent.name,class:"circle-purple-icon",translate:!1}:this.share.file?.ownerId?this.repository={icon:R.PERSONAL,label:fe.PERSONAL_FILES,class:"circle-primary-icon",translate:!0}:this.share.file?.space?.alias?this.repository={icon:R.SPACES,label:`${this.share.file.space.name}`,class:"circle-primary-icon",translate:!1}:this.share.externalPath?this.repository={icon:R.EXTERNAL,label:"External",class:"circle-primary-icon",translate:!0}:this.repository=y({},this.unknownRepository),this.showFullPath&&this.setFullPath()}setFullPath(){if(!this.repository.label)return;let e=this.share.file?.path?this.share.file.path.split("/").filter(n=>n&&n!=="."):[];this.share.parent?.id&&!this.share.file?.id&&this.share.file?.path.indexOf("/")===-1?e.shift():this.share.file?.space?.alias&&this.share.file.space?.root?.alias&&(e.length?e.unshift(this.share.file.space.root.name):e.push(this.share.file.space.root.name)),this.repository.label===fe.PERSONAL_FILES&&(this.repository.label=this.layout.translateString(this.repository.label)),e.length&&(this.repository.label=`${this.repository.label}/${e.join("/")}`)}};r.\u0275fac=function(n){return new(n||r)},r.\u0275cmp=W({type:r,selectors:[["app-share-repository"]],inputs:{share:"share",galleryMode:"galleryMode",showIcon:"showIcon",showFullPath:"showFullPath"},features:[Ee],decls:2,vars:1,consts:[[3,"icon","class","min-width","min-height","font-size"],[1,"d-flex","align-items-center"],[3,"icon"],[1,"me-2",3,"icon","class"],["draggable","false",1,"no-pointer-events"],[1,"me-2",3,"icon"]],template:function(n,t){n&1&&_(0,Ft,1,9,"fa-icon",0)(1,Bt,5,2,"div",1),n&2&&k(t.galleryMode?0:1)},dependencies:[X,J],encapsulation:2});let o=r;return o})();var h={BASE:`${ee}/shares`,LIST:"list",CHILDREN:"children",LINKS:"links",LINKS_LIST:"links/list",LINKS_UUID:"links/uuid"},It=`${h.BASE}/${h.LIST}`,q=`${h.BASE}/${h.LINKS}`,wt=`${h.BASE}/${h.LINKS_LIST}`,xt=`${h.BASE}/${h.LINKS_UUID}`;var Lt=(()=>{let r=class r{constructor(){this.http=S(Z),this.router=S(Y)}getShare(e){return this.http.get(`${h.BASE}/${e}`).pipe(b(n=>new T(n)))}createShare(e){return this.http.post(h.BASE,e).pipe(b(n=>new T(n)))}updateShare(e){return this.http.put(`${h.BASE}/${e.id}`,e).pipe(b(n=>new T(n)))}deleteShare(e){return this.http.delete(`${h.BASE}/${e}`)}listShares(){return this.http.get(It)}getShareChild(e,n){return this.http.get(`${h.BASE}/${e}/${h.CHILDREN}/${n}`).pipe(b(t=>new T(t)))}updateShareChild(e,n,t){return this.http.put(`${h.BASE}/${e}/${h.CHILDREN}/${n}`,t).pipe(b(c=>new T(c)))}deleteShareChild(e,n){return this.http.delete(`${h.BASE}/${e}/${h.CHILDREN}/${n}`)}listChildShares(e){return this.http.get(`${h.BASE}/${e}/${h.CHILDREN}`)}initShareFromFile(e,n,t=!1,c=!1){let g,E=null,A=y({id:0,name:"",createdAt:new Date,modifiedAt:new Date,enabled:!0},t?{parent:{id:0,ownerId:0,alias:n.space.alias,name:n.space.name}}:{});if(n){c&&(E=n.root.id);let ge=null;(n?.root?.owner.login===e.login||!n?.space?.alias)&&(n.space=null,ge=e.id),g=new T(I(y({},A),{name:n.name,file:I(y({},n),{path:c?".":st(n.path,2),ownerId:ge})}))}else g=new T(A);return[g,E]}goTo(e){if(!e.id)return Ce(V(!1));if(e.externalPath&&!e.parent?.id)return this.router.navigate([H.SPACES_SHARES],{queryParams:{select:e.name}});if(e.parent?.id&&!e.file?.id&&e.file?.path.indexOf("/")===-1)return this.router.navigate([H.SPACES_SHARES],{queryParams:{select:e.parent.name}});{let[n,t]=bt(e);return this.router.navigate([n],{queryParams:{select:t}})}}};r.\u0275fac=function(n){return new(n||r)},r.\u0275prov=P({token:r,factory:r.\u0275fac,providedIn:"root"});let o=r;return o})();var U={BASE:`${ee}/link`,LINK:"link",VALIDATION:"validation",ACCESS:"access",AUTH:"auth"},Tt=`${U.BASE}/${U.VALIDATION}`,Se=`${U.BASE}/${U.ACCESS}`,Dt=`${U.BASE}/${U.AUTH}`;var Nt=new ye("WindowToken",typeof window<"u"&&window.document?{providedIn:"root",factory:()=>window}:{providedIn:"root",factory:()=>{}});var Rt=(()=>{class o{constructor(i,e,n){this.ngZone=i,this.document=e,this.window=n,this.copySubject=new ke,this.copyResponse$=this.copySubject.asObservable(),this.config={}}configure(i){this.config=i}copy(i){if(!this.isSupported||!i)return this.pushCopyResponse({isSuccess:!1,content:i});let e=this.copyFromContent(i);return e?this.pushCopyResponse({content:i,isSuccess:e}):this.pushCopyResponse({isSuccess:!1,content:i})}get isSupported(){return!!this.document.queryCommandSupported&&!!this.document.queryCommandSupported("copy")&&!!this.window}isTargetValid(i){if(i instanceof HTMLInputElement||i instanceof HTMLTextAreaElement){if(i.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');return!0}throw new Error("Target should be input or textarea")}copyFromInputElement(i,e=!0){try{this.selectTarget(i);let n=this.copyText();return this.clearSelection(e?i:void 0,this.window),n&&this.isCopySuccessInIE11()}catch{return!1}}isCopySuccessInIE11(){let i=this.window.clipboardData;return!(i&&i.getData&&!i.getData("Text"))}copyFromContent(i,e=this.document.body){if(this.tempTextArea&&!e.contains(this.tempTextArea)&&this.destroy(this.tempTextArea.parentElement||void 0),!this.tempTextArea){this.tempTextArea=this.createTempTextArea(this.document,this.window);try{e.appendChild(this.tempTextArea)}catch{throw new Error("Container should be a Dom element")}}this.tempTextArea.value=i;let n=this.copyFromInputElement(this.tempTextArea,!1);return this.config.cleanUpAfterCopy&&this.destroy(this.tempTextArea.parentElement||void 0),n}destroy(i=this.document.body){this.tempTextArea&&(i.removeChild(this.tempTextArea),this.tempTextArea=void 0)}selectTarget(i){return i.select(),i.setSelectionRange(0,i.value.length),i.value.length}copyText(){return this.document.execCommand("copy")}clearSelection(i,e){i&&i.focus(),e.getSelection()?.removeAllRanges()}createTempTextArea(i,e){let n=i.documentElement.getAttribute("dir")==="rtl",t;t=i.createElement("textarea"),t.style.fontSize="12pt",t.style.border="0",t.style.padding="0",t.style.margin="0",t.style.position="absolute",t.style[n?"right":"left"]="-9999px";let c=e.pageYOffset||i.documentElement.scrollTop;return t.style.top=c+"px",t.setAttribute("readonly",""),t}pushCopyResponse(i){this.copySubject.observers.length>0&&this.ngZone.run(()=>{this.copySubject.next(i)})}pushCopyReponse(i){this.pushCopyResponse(i)}}return o.\u0275fac=function(i){return new(i||o)(j(Ae),j(be),j(Nt,8))},o.\u0275prov=P({token:o,factory:o.\u0275fac,providedIn:"root"}),o})();var Pt=(()=>{let r=class r{constructor(){this.router=S(Y),this.http=S(Z),this.layout=S(B),this.authService=S(kt),this.clipboard=S(Rt)}shareLinksList(){return this.http.get(wt).pipe(b(e=>e.map(n=>new te(n))))}shareLink(e){return this.http.get(`${q}/${e}`).pipe(b(n=>new te(n)))}shareLinkChild(e,n){return this.http.get(`${q}/${e}/${h.CHILDREN}/${n}`).pipe(b(t=>new te(t)))}linkFromSpaceOrShare(e,n,t){return this.http.get(`${q}/${e}/${t}/${n}`)}linkValidation(e){return this.http.get(`${Tt}/${e}`).pipe(b(n=>n.ok?n.link:(n.error&&(n.error===ue.UNAUTHORIZED?this.router.navigate([`${N.LINK}/${e}/${N.AUTH}`]).catch(console.error):this.router.navigate([`${N.LINK}/${e}/${n.error}`]).catch(console.error)),!1)),oe(()=>(this.authService.logout(),V(!1))))}linkAccess(e,n){n.share?.isDir||n.space?.alias?this.http.get(`${Se}/${e}`).subscribe(t=>{this.authService.initUserFromResponse(t),n.space?this.router.navigate([H.SPACES],{queryParams:{select:n.space.name}}).catch(console.error):this.router.navigate([H.SPACES_SHARES],{queryParams:{select:n.share.name}}).catch(console.error)}):lt(`${Se}/${e}`)}linkAuthentication(e,n){return this.http.post(`${Dt}/${e}`,{password:n}).pipe(b(t=>(this.authService.initUserFromResponse(t),this.router.navigate([`${N.LINK}/${e}`]).catch(console.error),!0)),oe(t=>(t.error.message===ue.UNAUTHORIZED?this.layout.sendNotification("warning","Link","Bad password"):this.router.navigate([`${N.LINK}/${e}/${t.error.message}`]).catch(console.error),V(!1))))}copyLinkToClipboard(e){this.clipboard.copyFromContent(this.genLink(e))}genUUID(){return this.http.get(xt).pipe(b(e=>e.uuid))}createLinkDialog(e){this.genUUID().subscribe(n=>{let t=this.layout.openDialog(ne,"md",{initialState:{link:{name:e.name,uuid:n,isActive:!0,nbAccess:0}}});this.subscribeToSubmitLinkModal(t,e)})}updateLinkFromSpaceOrShare(e,n,t,c){return this.http.put(`${q}/${e}/${t}/${n}`,c)}editLinkDialog(e,n,t){if(n.id===0||e?.linkSettings?.uuid){let c=this.layout.openDialog(ne,"md",{initialState:{link:e.linkSettings}});this.subscribeToSubmitLinkModal(c,n,e)}else this.linkFromSpaceOrShare(e.linkId,n.id,t).subscribe({next:c=>{let g=this.layout.openDialog(ne,"md",{initialState:{link:I(y({},c),{permissions:e.permissions})}});this.subscribeToSubmitLinkModal(g,n,e)},error:c=>this.layout.sendNotification("error","Link error",e.name||n.name,c)})}shareLinkGuestToMember(e,n,t){return new ft({id:e,linkId:n,name:t.name,description:t.email,createdAt:t.createdAt,permissions:t.permissions,type:ht.LINK,spaceRole:ct.IS_MEMBER,linkSettings:t},[L.SHARE_INSIDE,L.SHARE_OUTSIDE])}subscribeToSubmitLinkModal(e,n,t){e.content.submitEvent.pipe(ve(1)).subscribe(c=>{if(Object.keys(c).length){let g=Object.assign(e.content.link,c),E=this.shareLinkGuestToMember(g.userId||-(n.links.length+1),t?.linkId||-(n.links.length+1),g);E.linkId?n.links=[E,...n.links.filter(A=>A.linkId!==E.linkId)]:n.links=[E,...n.links]}e.content.layout.closeDialog()})}genLink(e){return`${document.location.origin}/#/${N.LINK}/${e}`}};r.\u0275fac=function(n){return new(n||r)},r.\u0275prov=P({token:r,factory:r.\u0275fac,providedIn:"root"});let o=r;return o})();var Ut=o=>({dateInputFormat:"YYYY-MM-DD",containerClass:"theme-dark-blue",returnFocusToInput:!0,minDate:o,showWeekNumbers:!1}),Vt=(o,r)=>r.key;function Kt(o,r){o&1&&(s(0,"span",4),p(1,"Edit link"),a())}function qt(o,r){o&1&&(s(0,"span",4),p(1,"New link"),a())}function jt(o,r){o&1&&d(0,"div",54)}function Wt(o,r){if(o&1){let i=G();s(0,"button",53),C(1,"translate"),pe("ngModelChange",function(n){let t=F(i).$implicit,c=u(3);return ce(c.permissions[t.key],n)||(c.permissions[t.key]=n),M(n)}),w("ngModelChange",function(){F(i);let n=u(3);return M(n.onPermissionChange())}),d(2,"fa-icon",50),a(),_(3,jt,1,0,"div",54)}if(o&2){let i=r.$implicit,e=r.$index,n=r.$count,t=u(3);le("ngModel",t.permissions[i.key]),m("tooltip",v(1,4,t.SPACES_PERMISSIONS_TEXT[i.key].text,t.locale.language)),l(2),m("icon",t.SPACES_PERMISSIONS_TEXT[i.key].icon),l(),k(e===n-1?3:-1)}}function Gt(o,r){if(o&1&&(se(0,Wt,4,7,null,null,Vt),C(2,"keyvalue")),o&2){let i=u(2);ae(v(2,0,i.permissions,i.originalOrderKeyValue))}}function Zt(o,r){if(o&1&&(s(0,"div",51),d(1,"app-share-repository",55),a()),o&2){let i=u(2);l(),m("share",i.share)("showIcon",!0)("showFullPath",!0)}}function Yt(o,r){if(o&1){let i=G();s(0,"div",44),d(1,"fa-icon",45),s(2,"div",46)(3,"span"),p(4),a(),s(5,"span",47),p(6),a()(),s(7,"div",48),_(8,Gt,3,3),s(9,"button",49),C(10,"translate"),w("click",function(){F(i);let n=u();return M(n.toggleRequireAuth())}),d(11,"fa-icon",50),a(),s(12,"button",49),C(13,"translate"),w("click",function(){F(i);let n=u();return M(n.copyToClipboard())}),d(14,"fa-icon",50),a()()(),_(15,Zt,2,3,"div",51),d(16,"hr",52)}if(o&2){let i=u();l(),m("icon",i.icons.links),l(3),$(i.linkForm.value.name||i.linkForm.value.shareName),l(2),$(i.linkForm.value.email),l(2),k(i.share&&i.permissions?8:-1),l(),x(O("btn btn-sm ",i.linkForm.value.requireAuth?"btn-success":"btn-warning")),m("tooltip",v(10,15,"Password",i.locale.language)),l(2),m("icon",i.linkForm.value.requireAuth?i.icons.faLock:i.icons.faLockOpen),l(),x(O("btn btn-sm ms-2 ",i.linkWasCopied?"btn-info":"btn-secondary")),m("tooltip",v(13,18,"Copy link",i.locale.language)),l(2),m("icon",i.linkWasCopied?i.icons.faClipboardCheck:i.icons.faClipboard),l(),k(i.share?15:-1)}}function Xt(o,r){if(o&1&&(s(0,"span"),p(1),a()),o&2){let i=u();x(O("badge rounded-pill ",(i.share?i.share.link.nbAccess:i.link.nbAccess)>=i.linkForm.value.limitAccess?"bg-danger":"bg-success")),l(),xe(" ",i.share?i.share.link.nbAccess:i.link.nbAccess,"/",i.linkForm.value.limitAccess," ")}}function zt(o,r){if(o&1&&(s(0,"span",20),p(1),a()),o&2){let i=u();l(),$(i.share?i.share.link.nbAccess:i.link.nbAccess)}}function Qt(o,r){if(o&1&&(s(0,"div",27)(1,"label",56),p(2,"Share name"),a(),d(3,"input",57),C(4,"translate"),a(),s(5,"div",27)(6,"label",58),p(7,"Share description"),a(),d(8,"input",59),C(9,"translate"),a()),o&2){let i=u();l(3),K("is-invalid",i.linkForm.controls.shareName.invalid),m("placeholder",v(4,4,"Share name",i.locale.language)),l(5),m("placeholder",v(9,7,"Share description",i.locale.language))}}function Jt(o,r){if(o&1&&(s(0,"option",30),p(1),a()),o&2){let i=r.$implicit;m("ngValue",i),l(),$(i)}}function ei(o,r){if(o&1&&(s(0,"div",37),d(1,"app-password-strength-bar",60),a()),o&2){let i=u();l(),m("passwordToCheck",i.password)}}function ti(o,r){if(o&1){let i=G();s(0,"button",61),w("click",function(){F(i);let n=u();return M(n.confirmDeletion=!0)}),p(1," Remove "),a()}if(o&2){let i=u();m("disabled",i.confirmDeletion)}}var ne=(()=>{let r=class r{constructor(){this.layout=S(B),this.parentSpaceId=null,this.isSharesRepo=!1,this.inSharesList=!1,this.submitEvent=new re,this.shareChange=new re,this.locale=S(Q),this.confirmDeletion=!1,this.submitted=!1,this.SPACES_PERMISSIONS_TEXT=mt,this.originalOrderKeyValue=at,this.icons={faEye:Je,faEyeSlash:ot,links:R.LINKS,faClipboard:tt,faClipboardCheck:et,faLock:nt,faLockOpen:it},this.languages=this.layout.getLanguages(),this.minDate=he(),this.defaultPassword=this.layout.translateString(rt),this.passwordMinLength=8,this.password="",this.linkIsExpired=!1,this.linkIsHovered=!1,this.linkWasCopied=!1,this.userService=S(St),this.sharesService=S(Lt),this.linksService=S(Pt),this.spacesService=S(Et),this.minDate.setDate(this.minDate.getDate()+1)}ngOnInit(){this.link?this.initLink():this.file?this.initFile():this.initShareLink(),this.linkForm.value.requireAuth&&(this.password=this.defaultPassword),this.linkForm.value.expiresAt&&this.isLinkIsExpired(this.share?this.share.link.expiresAt:this.link.expiresAt),this.linkForm.controls.expiresAt.valueChanges.subscribe(e=>this.isLinkIsExpired(e))}onPermissionChange(){let e=ut(this.permissions);this.linkForm.controls.permissions.setValue(e),e!==this.share.link.permissions?this.linkForm.controls.permissions.markAsDirty():this.linkForm.controls.permissions.markAsPristine()}toggleRequireAuth(){this.linkForm.controls.requireAuth.setValue(!this.linkForm.value.requireAuth),this.linkForm.controls.requireAuth.markAsDirty()}copyToClipboard(){this.linksService.copyLinkToClipboard(this.share?this.share.link.uuid:this.link.uuid),this.linkWasCopied=!0,this.layout.sendNotification("info","Link copied",this.linkForm.value.name||this.linkForm.value.shareName),setTimeout(()=>this.linkWasCopied=!1,3e3)}onCancel(){this.confirmDeletion?this.confirmDeletion=!1:this.layout.closeDialog()}onSubmit(){if(this.submitted=!0,this.confirmDeletion){(this.parentSpaceId?this.spacesService.deleteSpaceShare(this.parentSpaceId,this.share.id):this.sharesService.deleteShare(this.share.id)).subscribe({next:()=>{this.layout.sendNotification("success","Link deleted",this.share.link.name||this.share.name),this.shareChange.emit(["delete",this.share]),this.layout.closeDialog()},error:c=>{this.layout.sendNotification("error","Delete share",this.share.name,c),this.layout.closeDialog()}});return}if(this.file?.id){let n=this.share,{link:t}=n,c=_e(n,["link"]),g=I(y(y({},t),this.linkForm.value),{password:this.mustIncludePassword()?this.password:void 0});c.name=de("shareName",g),c.description=de("shareDescription",g);let E=this.linksService.shareLinkGuestToMember(-1,-1,g);this.sharesService.createShare(I(y({},c),{type:yt.LINK,links:[E]})).subscribe({next:A=>{this.shareChange.emit(["add",A]),this.layout.sendNotification("success","Link created",t.name||A.name),this.layout.closeDialog()},error:A=>{this.layout.sendNotification("error","Link error",this.share.name,A),this.layout.closeDialog()}});return}let e={};for(let t in this.linkForm.controls)this.linkForm.controls[t].dirty&&(e[t]=this.linkForm.controls[t].value);if(this.mustIncludePassword()&&(e.password=this.password),this.share?.id){Object.keys(e).length&&this.linksService.updateLinkFromSpaceOrShare(this.share.link.id,this.share.id,pt.SHARE,e).subscribe({next:t=>{this.share.name=this.linkForm.value.shareName,this.share.description=this.linkForm.value.shareDescription,this.share.link=Object.assign(this.share.link,t),this.share.updateTimes(),this.share.updatePermission(),this.shareChange.emit(["update",this.share]),this.layout.closeDialog()},error:t=>{this.layout.sendNotification("error","Link error",this.share.link.name||this.share.name,t),this.layout.closeDialog()}}),this.layout.closeDialog();return}this.submitEvent.emit(e)}initFile(){let e=this.sharesService.initShareFromFile(this.userService.user,this.file,this.isSharesRepo,this.inSharesList)[0];this.share=I(y({},e),{link:{id:-1,userId:-1,uuid:"",isActive:!0,requireAuth:!1,permissions:"",nbAccess:0,limitAccess:0}}),this.linksService.genUUID().subscribe(n=>this.share.link.uuid=n),this.initShareLink(),this.onPermissionChange()}initShareLink(){this.linkForm=new me({shareName:new f(this.share.name,z.required),shareDescription:new f(this.share.description||""),name:new f(this.share.link?.name||""),email:new f(this.share.link?.email||"",z.email),language:new f(this.share.link.language||null),limitAccess:new f(this.share.link.limitAccess||null),expiresAt:new f(this.share.link.expiresAt||null),requireAuth:new f(this.share.link.requireAuth||!1),permissions:new f(this.share.link.permissions),isActive:new f(this.share.link.isActive)}),this.permissions=dt(this.share.file.permissions,this.share.link.permissions,[L.SHARE_INSIDE,L.SHARE_OUTSIDE,...this.share.file.isDir?[]:[L.DELETE,L.ADD]])}initLink(){this.linkForm=new me({shareName:new f(""),shareDescription:new f(""),name:new f(this.link.name||""),email:new f(this.link.email||"",z.email),language:new f(this.link.language||null),limitAccess:new f(this.link.limitAccess||null),expiresAt:new f(this.link.expiresAt||null),requireAuth:new f(this.link.requireAuth||!1),permissions:new f(this.link.permissions),isActive:new f(this.link.isActive)}),this.link.id||(this.linkForm.controls.name.markAsDirty(),this.linkForm.controls.isActive.markAsDirty())}isLinkIsExpired(e){if(e==null){if(this.linkIsExpired=!1,e===null)return;this.linkForm.controls.expiresAt.setValue(null)}this.linkIsExpired=he()>=e}mustIncludePassword(){return!!this.password.length&&this.password!==this.defaultPassword}};r.\u0275fac=function(n){return new(n||r)},r.\u0275cmp=W({type:r,selectors:[["app-link-dialog"]],inputs:{share:"share",parentSpaceId:"parentSpaceId",link:"link",file:"file",isSharesRepo:"isSharesRepo",inSharesList:"inSharesList"},outputs:{submitEvent:"submitEvent",shareChange:"shareChange"},decls:73,vars:52,consts:[[1,"modal-header","align-items-center"],[1,"modal-title"],[1,"me-2",3,"icon"],[1,"modal-title","ms-auto"],["l10nTranslate",""],["aria-label","Close","type","button",1,"btn-close","btn-close-white","ms-2",3,"click"],[1,"modal-body"],["autocomplete","off",3,"formGroup"],[1,"d-flex"],[1,"d-flex","flex-column","flex-grow-1"],[1,"d-flex","align-items-center","cursor-pointer","py-2",3,"mouseover","mouseleave","focus","click"],["for","link","l10nTranslate",""],["id","link",1,"ms-auto"],[1,"d-flex","align-items-center","py-2"],["for","state","l10nTranslate","",1,"cursor-pointer","me-auto"],[1,"d-flex","align-items-center","form-check","form-switch","cursor-pointer"],["id","state","formControlName","isActive","type","checkbox","role","button",1,"form-check-input"],["for","access","l10nTranslate",""],["id","access",1,"ms-auto"],[3,"class"],[1,"badge","rounded-pill","bg-success"],[1,"d-flex","align-items-center"],["for","guestName","l10nTranslate",""],["id","guestName","formControlName","name","type","text",1,"form-control","form-control-sm","ms-auto","w-50",3,"placeholder"],[1,"d-flex","align-items-center","justify-content-between","px-0"],["for","guestEmail","l10nTranslate",""],["id","guestEmail","autocomplete","off","formControlName","email","type","email",1,"form-control","form-control-sm","ms-auto","w-50",3,"placeholder"],[1,"d-flex","align-items-center","justify-content-between"],["for","guestLanguage","l10nTranslate",""],["id","guestLanguage","formControlName","language",1,"form-control","form-select","form-select-sm","ms-auto","w-50"],[3,"ngValue"],["for","limitAccess","l10nTranslate",""],["id","limitAccess","formControlName","limitAccess","min","1","type","number",1,"form-control","form-control-sm","ms-auto","w-50",3,"placeholder"],["for","expiration","l10nTranslate",""],["id","expiration","formControlName","expiresAt","placement","left","type","text","bsDatepicker","",1,"form-control","form-control-sm","ms-auto","w-50",3,"placeholder","bsConfig"],[1,"d-flex","align-items-center","px-0"],["for","requireAuth","translate","",1,"cursor-pointer","me-auto"],[1,"d-flex","align-items-center","d-none","d-sm-flex","mx-auto"],["id","requireAuth","formControlName","requireAuth","type","checkbox","role","button",1,"form-check-input"],["placeholder","Set a password",2,"width","45%",3,"passwordChange","isRequired","disabled","passwordMinLength","password","showGenerator"],[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,"d-flex","flex-fill","align-items-center"],[1,"circle-primary-icon","me-2",3,"icon"],[1,"d-flex","flex-column"],[1,"fs-xxxs"],[1,"d-flex","ms-auto"],["container","body","type","button",3,"click","tooltip"],["size","lg",3,"icon"],[1,"d-flex","align-items-center","d-none","d-sm-flex","py-2"],[1,"my-2"],["btnCheckbox","","type","button",1,"btn","btn-sm","btn-custom","me-0","ms-2",3,"ngModelChange","ngModel","tooltip"],[1,"vr","mx-2"],["id","file",3,"share","showIcon","showFullPath"],["for","shareName","l10nTranslate",""],["id","shareName","formControlName","shareName","type","email",1,"form-control","form-control-sm","ms-auto","w-50",3,"placeholder"],["for","shareDescription","l10nTranslate",""],["id","shareDescription","formControlName","shareDescription","type","email",1,"form-control","form-control-sm","ms-auto","w-50",3,"placeholder"],[3,"passwordToCheck"],["type","button","l10nTranslate","",1,"btn","btn-sm","btn-danger",3,"click","disabled"]],template:function(n,t){n&1&&(s(0,"div",0)(1,"h4",1),d(2,"fa-icon",2),s(3,"span"),p(4),a()(),s(5,"h4",3),_(6,Kt,2,0,"span",4)(7,qt,2,0,"span",4),a(),s(8,"button",5),w("click",function(){return t.layout.closeDialog()}),a()(),s(9,"div",6),_(10,Yt,17,21),s(11,"form",7)(12,"div",8)(13,"div",9)(14,"div",10),w("mouseover",function(){return t.linkIsHovered=!0})("mouseleave",function(){return t.linkIsHovered=!1})("focus",function(){return t.linkIsHovered=!0})("click",function(){return t.copyToClipboard()}),s(15,"label",11),p(16,"Link"),a(),s(17,"span",12),p(18),a()(),s(19,"div",13)(20,"label",14),p(21,"Active"),a(),s(22,"div",15),d(23,"input",16),s(24,"span"),p(25),C(26,"translate"),a()()(),s(27,"div",13)(28,"label",17),p(29,"Current access count"),a(),s(30,"span",18),_(31,Xt,2,5,"span",19)(32,zt,2,1,"span",20),a()(),_(33,Qt,10,10),s(34,"div",21)(35,"label",22),p(36,"Guest name"),a(),d(37,"input",23),C(38,"translate"),a(),s(39,"div",24)(40,"label",25),p(41,"Guest email"),a(),d(42,"input",26),C(43,"translate"),a(),s(44,"div",27)(45,"label",28),p(46,"Guest language"),a(),s(47,"select",29),se(48,Jt,2,2,"option",30,Ie),a()(),s(50,"div",27)(51,"label",31),p(52,"Limit access"),a(),d(53,"input",32),C(54,"translate"),a(),s(55,"div",27)(56,"label",33),p(57,"Expiration"),a(),d(58,"input",34),C(59,"translate"),a(),s(60,"div",35)(61,"label",36),p(62,"Password"),a(),_(63,ei,2,1,"div",37),s(64,"div",15),d(65,"input",38),a(),s(66,"app-input-password",39),pe("passwordChange",function(g){return ce(t.password,g)||(t.password=g),g}),a()()()()()(),s(67,"div",40),_(68,ti,2,1,"button",41),s(69,"button",42),w("click",function(){return t.onCancel()}),p(70,"Cancel"),a(),s(71,"button",43),w("click",function(){return t.onSubmit()}),p(72),a()()),n&2&&(l(2),m("icon",t.icons.links),l(2),$(t.linkForm.value.name||t.linkForm.value.shareName),l(2),k(t.share!=null&&t.share.id||t.link!=null&&t.link.id?6:7),l(4),k(t.share||t.link?10:-1),l(),m("formGroup",t.linkForm),l(6),K("text-primary",t.linkIsHovered),l(),D(" ",t.share?t.share.link.uuid:t.link.uuid," "),l(6),x(O("badge rounded-pill ms-3 ",t.linkForm.value.isActive?"bg-primary":"bg-danger")),l(),D(" ",v(26,35,t.linkForm.value.isActive?"yes":"no",t.locale.language)," "),l(6),k(t.linkForm.value.limitAccess?31:32),l(2),k(t.share?33:-1),l(4),m("placeholder",v(38,38,"Guest name",t.locale.language)),l(5),K("is-invalid",t.linkForm.controls.email.invalid),m("placeholder",v(43,41,"Guest email",t.locale.language)),l(6),ae(t.languages),l(5),m("placeholder",v(54,44,"Unlimited",t.locale.language)),l(5),K("text-danger",t.linkIsExpired),m("placeholder",v(59,47,"Unlimited",t.locale.language))("bsConfig",Le(50,Ut,t.minDate)),l(5),k(t.linkForm.value.requireAuth&&t.password!==t.defaultPassword?63:-1),l(3),m("isRequired",t.linkForm.value.requireAuth)("disabled",!t.linkForm.value.requireAuth)("passwordMinLength",t.passwordMinLength),le("password",t.password),m("showGenerator",!0),l(2),k(t.share!=null&&t.share.id?68:-1),l(3),x(O("btn btn-sm ",t.confirmDeletion?"btn-danger":"btn-primary")),m("disabled",t.linkForm.invalid||t.linkForm.controls.requireAuth.value&&t.password.length<t.passwordMinLength||t.submitted),l(),D(" ",t.confirmDeletion?"Confirm deletion":"Confirm"," "))},dependencies:[X,We,ze,Ye,Xe,_t,gt,qe,Me,Ue,Ve,Ne,$e,De,He,Re,Pe,Ke,Fe,Ct,Ze,Ge,je,Oe,Be,At,vt,Te,J],encapsulation:2});let o=r;return o})();export{Rt as a,At as b,Lt as c,ne as d,Pt as e};
1
+ import{a as yt,c as bt,d as T,e as te,g as Et}from"./chunk-MVO4WZLK.js";import{a as Ct,b as vt}from"./chunk-7ZRXJONB.js";import{f as kt}from"./chunk-JF7S3UYQ.js";import{f as St,g as gt,h as _t}from"./chunk-VPJ2V27B.js";import{A as ze,Ca as he,Ea as de,Gb as fe,Hb as R,Ib as H,Jb as mt,La as st,Lb as ht,Nb as dt,Pb as ut,Qb as ft,S as ee,Xa as at,Za as lt,lb as L,ob as ct,v as Ge,va as rt,w as Ze,wb as B,y as Ye,z as Xe}from"./chunk-4U5A2DEP.js";import{d as Y}from"./chunk-BIUNUYZ5.js";import{$b as Le,$c as De,Cb as w,Eb as u,Ed as J,Fd as We,G as oe,Gc as Te,Jd as Qe,L as ve,Lf as ot,Ma as l,Mb as we,Nb as K,Ob as x,Oc as Z,Pb as p,Qb as $,Rb as D,Sb as xe,Tb as le,Ub as ce,Vb as pe,Xa as W,Xb as O,Zc as X,ad as Ne,bb as re,be as Je,bg as ue,ca as P,cb as Ae,cd as z,ce as et,cg as pt,dc as C,dg as N,ed as Re,f as ke,fa as ye,fc as v,fd as Pe,ga as j,gd as me,ha as S,id as f,jb as _,jd as Fe,kb as k,kd as Me,lb as Ie,ld as $e,lf as it,ma as F,na as M,nb as se,nd as Oe,ob as ae,od as Be,p as V,pa as be,pb as m,pd as He,qb as s,qd as Ue,rb as a,rd as Ve,sb as d,sd as Ke,t as Ce,te as tt,tf as nt,v as b,va as Ee,wd as qe,xd as je,yd as Q,zb as G}from"./chunk-HW2H3ISM.js";import{a as y,b as I,c as _e}from"./chunk-RTRJ3KFH.js";function Ft(o,r){if(o&1&&d(0,"fa-icon",2),o&2){let i=u();x(i.repository.class),we("min-width",i.galleryMode.dimensions/3,"px")("min-height",i.galleryMode.dimensions/3,"px")("font-size",i.galleryMode.faSize/1.8,"px"),m("icon",i.repository.icon)}}function Mt(o,r){if(o&1&&d(0,"fa-icon",5),o&2){let i=u(2);x(i.repository.class),m("icon",i.repository.icon)}}function $t(o,r){if(o&1&&(p(0),C(1,"translate")),o&2){let i=u(2);D(" ",v(1,1,i.repository.label,i.locale.language)," ")}}function Ot(o,r){if(o&1&&p(0),o&2){let i=u(2);D(" ",i.repository.label," ")}}function Bt(o,r){if(o&1&&(s(0,"div",1),_(1,Mt,1,3,"fa-icon",3),s(2,"span",4),_(3,$t,2,4)(4,Ot,1,1),a()()),o&2){let i=u();l(),k(i.showIcon?1:-1),l(2),k(i.repository.translate?3:4)}}var At=(()=>{let r=class r{constructor(){this.showIcon=!0,this.showFullPath=!1,this.locale=S(Q),this.layout=S(B),this.unknownRepository={icon:Qe,label:"",class:"circle-primary-icon",translate:!1}}ngOnInit(){this.setRepository()}ngOnChanges(){this.setRepository()}setRepository(){this.share.parent?.id||this.share.parent?.id===0?this.repository={icon:R.SHARES,label:this.share.parent.name,class:"circle-purple-icon",translate:!1}:this.share.file?.ownerId?this.repository={icon:R.PERSONAL,label:fe.PERSONAL_FILES,class:"circle-primary-icon",translate:!0}:this.share.file?.space?.alias?this.repository={icon:R.SPACES,label:`${this.share.file.space.name}`,class:"circle-primary-icon",translate:!1}:this.share.externalPath?this.repository={icon:R.EXTERNAL,label:"External",class:"circle-primary-icon",translate:!0}:this.repository=y({},this.unknownRepository),this.showFullPath&&this.setFullPath()}setFullPath(){if(!this.repository.label)return;let e=this.share.file?.path?this.share.file.path.split("/").filter(n=>n&&n!=="."):[];this.share.parent?.id&&!this.share.file?.id&&this.share.file?.path.indexOf("/")===-1?e.shift():this.share.file?.space?.alias&&this.share.file.space?.root?.alias&&(e.length?e.unshift(this.share.file.space.root.name):e.push(this.share.file.space.root.name)),this.repository.label===fe.PERSONAL_FILES&&(this.repository.label=this.layout.translateString(this.repository.label)),e.length&&(this.repository.label=`${this.repository.label}/${e.join("/")}`)}};r.\u0275fac=function(n){return new(n||r)},r.\u0275cmp=W({type:r,selectors:[["app-share-repository"]],inputs:{share:"share",galleryMode:"galleryMode",showIcon:"showIcon",showFullPath:"showFullPath"},features:[Ee],decls:2,vars:1,consts:[[3,"icon","class","min-width","min-height","font-size"],[1,"d-flex","align-items-center"],[3,"icon"],[1,"me-2",3,"icon","class"],["draggable","false",1,"no-pointer-events"],[1,"me-2",3,"icon"]],template:function(n,t){n&1&&_(0,Ft,1,9,"fa-icon",0)(1,Bt,5,2,"div",1),n&2&&k(t.galleryMode?0:1)},dependencies:[X,J],encapsulation:2});let o=r;return o})();var h={BASE:`${ee}/shares`,LIST:"list",CHILDREN:"children",LINKS:"links",LINKS_LIST:"links/list",LINKS_UUID:"links/uuid"},It=`${h.BASE}/${h.LIST}`,q=`${h.BASE}/${h.LINKS}`,wt=`${h.BASE}/${h.LINKS_LIST}`,xt=`${h.BASE}/${h.LINKS_UUID}`;var Lt=(()=>{let r=class r{constructor(){this.http=S(Z),this.router=S(Y)}getShare(e){return this.http.get(`${h.BASE}/${e}`).pipe(b(n=>new T(n)))}createShare(e){return this.http.post(h.BASE,e).pipe(b(n=>new T(n)))}updateShare(e){return this.http.put(`${h.BASE}/${e.id}`,e).pipe(b(n=>new T(n)))}deleteShare(e){return this.http.delete(`${h.BASE}/${e}`)}listShares(){return this.http.get(It)}getShareChild(e,n){return this.http.get(`${h.BASE}/${e}/${h.CHILDREN}/${n}`).pipe(b(t=>new T(t)))}updateShareChild(e,n,t){return this.http.put(`${h.BASE}/${e}/${h.CHILDREN}/${n}`,t).pipe(b(c=>new T(c)))}deleteShareChild(e,n){return this.http.delete(`${h.BASE}/${e}/${h.CHILDREN}/${n}`)}listChildShares(e){return this.http.get(`${h.BASE}/${e}/${h.CHILDREN}`)}initShareFromFile(e,n,t=!1,c=!1){let g,E=null,A=y({id:0,name:"",createdAt:new Date,modifiedAt:new Date,enabled:!0},t?{parent:{id:0,ownerId:0,alias:n.space.alias,name:n.space.name}}:{});if(n){c&&(E=n.root.id);let ge=null;(n?.root?.owner.login===e.login||!n?.space?.alias)&&(n.space=null,ge=e.id),g=new T(I(y({},A),{name:n.name,file:I(y({},n),{path:c?".":st(n.path,2),ownerId:ge})}))}else g=new T(A);return[g,E]}goTo(e){if(!e.id)return Ce(V(!1));if(e.externalPath&&!e.parent?.id)return this.router.navigate([H.SPACES_SHARES],{queryParams:{select:e.name}});if(e.parent?.id&&!e.file?.id&&e.file?.path.indexOf("/")===-1)return this.router.navigate([H.SPACES_SHARES],{queryParams:{select:e.parent.name}});{let[n,t]=bt(e);return this.router.navigate([n],{queryParams:{select:t}})}}};r.\u0275fac=function(n){return new(n||r)},r.\u0275prov=P({token:r,factory:r.\u0275fac,providedIn:"root"});let o=r;return o})();var U={BASE:`${ee}/link`,LINK:"link",VALIDATION:"validation",ACCESS:"access",AUTH:"auth"},Tt=`${U.BASE}/${U.VALIDATION}`,Se=`${U.BASE}/${U.ACCESS}`,Dt=`${U.BASE}/${U.AUTH}`;var Nt=new ye("WindowToken",typeof window<"u"&&window.document?{providedIn:"root",factory:()=>window}:{providedIn:"root",factory:()=>{}});var Rt=(()=>{class o{constructor(i,e,n){this.ngZone=i,this.document=e,this.window=n,this.copySubject=new ke,this.copyResponse$=this.copySubject.asObservable(),this.config={}}configure(i){this.config=i}copy(i){if(!this.isSupported||!i)return this.pushCopyResponse({isSuccess:!1,content:i});let e=this.copyFromContent(i);return e?this.pushCopyResponse({content:i,isSuccess:e}):this.pushCopyResponse({isSuccess:!1,content:i})}get isSupported(){return!!this.document.queryCommandSupported&&!!this.document.queryCommandSupported("copy")&&!!this.window}isTargetValid(i){if(i instanceof HTMLInputElement||i instanceof HTMLTextAreaElement){if(i.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');return!0}throw new Error("Target should be input or textarea")}copyFromInputElement(i,e=!0){try{this.selectTarget(i);let n=this.copyText();return this.clearSelection(e?i:void 0,this.window),n&&this.isCopySuccessInIE11()}catch{return!1}}isCopySuccessInIE11(){let i=this.window.clipboardData;return!(i&&i.getData&&!i.getData("Text"))}copyFromContent(i,e=this.document.body){if(this.tempTextArea&&!e.contains(this.tempTextArea)&&this.destroy(this.tempTextArea.parentElement||void 0),!this.tempTextArea){this.tempTextArea=this.createTempTextArea(this.document,this.window);try{e.appendChild(this.tempTextArea)}catch{throw new Error("Container should be a Dom element")}}this.tempTextArea.value=i;let n=this.copyFromInputElement(this.tempTextArea,!1);return this.config.cleanUpAfterCopy&&this.destroy(this.tempTextArea.parentElement||void 0),n}destroy(i=this.document.body){this.tempTextArea&&(i.removeChild(this.tempTextArea),this.tempTextArea=void 0)}selectTarget(i){return i.select(),i.setSelectionRange(0,i.value.length),i.value.length}copyText(){return this.document.execCommand("copy")}clearSelection(i,e){i&&i.focus(),e.getSelection()?.removeAllRanges()}createTempTextArea(i,e){let n=i.documentElement.getAttribute("dir")==="rtl",t;t=i.createElement("textarea"),t.style.fontSize="12pt",t.style.border="0",t.style.padding="0",t.style.margin="0",t.style.position="absolute",t.style[n?"right":"left"]="-9999px";let c=e.pageYOffset||i.documentElement.scrollTop;return t.style.top=c+"px",t.setAttribute("readonly",""),t}pushCopyResponse(i){this.copySubject.observers.length>0&&this.ngZone.run(()=>{this.copySubject.next(i)})}pushCopyReponse(i){this.pushCopyResponse(i)}}return o.\u0275fac=function(i){return new(i||o)(j(Ae),j(be),j(Nt,8))},o.\u0275prov=P({token:o,factory:o.\u0275fac,providedIn:"root"}),o})();var Pt=(()=>{let r=class r{constructor(){this.router=S(Y),this.http=S(Z),this.layout=S(B),this.authService=S(kt),this.clipboard=S(Rt)}shareLinksList(){return this.http.get(wt).pipe(b(e=>e.map(n=>new te(n))))}shareLink(e){return this.http.get(`${q}/${e}`).pipe(b(n=>new te(n)))}shareLinkChild(e,n){return this.http.get(`${q}/${e}/${h.CHILDREN}/${n}`).pipe(b(t=>new te(t)))}linkFromSpaceOrShare(e,n,t){return this.http.get(`${q}/${e}/${t}/${n}`)}linkValidation(e){return this.http.get(`${Tt}/${e}`).pipe(b(n=>n.ok?n.link:(n.error&&(n.error===ue.UNAUTHORIZED?this.router.navigate([`${N.LINK}/${e}/${N.AUTH}`]).catch(console.error):this.router.navigate([`${N.LINK}/${e}/${n.error}`]).catch(console.error)),!1)),oe(()=>(this.authService.logout(),V(!1))))}linkAccess(e,n){n.share?.isDir||n.space?.alias?this.http.get(`${Se}/${e}`).subscribe(t=>{this.authService.initUserFromResponse(t),n.space?this.router.navigate([H.SPACES],{queryParams:{select:n.space.name}}).catch(console.error):this.router.navigate([H.SPACES_SHARES],{queryParams:{select:n.share.name}}).catch(console.error)}):lt(`${Se}/${e}`)}linkAuthentication(e,n){return this.http.post(`${Dt}/${e}`,{password:n}).pipe(b(t=>(this.authService.initUserFromResponse(t),this.router.navigate([`${N.LINK}/${e}`]).catch(console.error),!0)),oe(t=>(t.error.message===ue.UNAUTHORIZED?this.layout.sendNotification("warning","Link","Bad password"):this.router.navigate([`${N.LINK}/${e}/${t.error.message}`]).catch(console.error),V(!1))))}copyLinkToClipboard(e){this.clipboard.copyFromContent(this.genLink(e))}genUUID(){return this.http.get(xt).pipe(b(e=>e.uuid))}createLinkDialog(e){this.genUUID().subscribe(n=>{let t=this.layout.openDialog(ne,"md",{initialState:{link:{name:e.name,uuid:n,isActive:!0,nbAccess:0}}});this.subscribeToSubmitLinkModal(t,e)})}updateLinkFromSpaceOrShare(e,n,t,c){return this.http.put(`${q}/${e}/${t}/${n}`,c)}editLinkDialog(e,n,t){if(n.id===0||e?.linkSettings?.uuid){let c=this.layout.openDialog(ne,"md",{initialState:{link:e.linkSettings}});this.subscribeToSubmitLinkModal(c,n,e)}else this.linkFromSpaceOrShare(e.linkId,n.id,t).subscribe({next:c=>{let g=this.layout.openDialog(ne,"md",{initialState:{link:I(y({},c),{permissions:e.permissions})}});this.subscribeToSubmitLinkModal(g,n,e)},error:c=>this.layout.sendNotification("error","Link error",e.name||n.name,c)})}shareLinkGuestToMember(e,n,t){return new ft({id:e,linkId:n,name:t.name,description:t.email,createdAt:t.createdAt,permissions:t.permissions,type:ht.LINK,spaceRole:ct.IS_MEMBER,linkSettings:t},[L.SHARE_INSIDE,L.SHARE_OUTSIDE])}subscribeToSubmitLinkModal(e,n,t){e.content.submitEvent.pipe(ve(1)).subscribe(c=>{if(Object.keys(c).length){let g=Object.assign(e.content.link,c),E=this.shareLinkGuestToMember(g.userId||-(n.links.length+1),t?.linkId||-(n.links.length+1),g);E.linkId?n.links=[E,...n.links.filter(A=>A.linkId!==E.linkId)]:n.links=[E,...n.links]}e.content.layout.closeDialog()})}genLink(e){return`${document.location.origin}/#/${N.LINK}/${e}`}};r.\u0275fac=function(n){return new(n||r)},r.\u0275prov=P({token:r,factory:r.\u0275fac,providedIn:"root"});let o=r;return o})();var Ut=o=>({dateInputFormat:"YYYY-MM-DD",containerClass:"theme-dark-blue",returnFocusToInput:!0,minDate:o,showWeekNumbers:!1}),Vt=(o,r)=>r.key;function Kt(o,r){o&1&&(s(0,"span",4),p(1,"Edit link"),a())}function qt(o,r){o&1&&(s(0,"span",4),p(1,"New link"),a())}function jt(o,r){o&1&&d(0,"div",54)}function Wt(o,r){if(o&1){let i=G();s(0,"button",53),C(1,"translate"),pe("ngModelChange",function(n){let t=F(i).$implicit,c=u(3);return ce(c.permissions[t.key],n)||(c.permissions[t.key]=n),M(n)}),w("ngModelChange",function(){F(i);let n=u(3);return M(n.onPermissionChange())}),d(2,"fa-icon",50),a(),_(3,jt,1,0,"div",54)}if(o&2){let i=r.$implicit,e=r.$index,n=r.$count,t=u(3);le("ngModel",t.permissions[i.key]),m("tooltip",v(1,4,t.SPACES_PERMISSIONS_TEXT[i.key].text,t.locale.language)),l(2),m("icon",t.SPACES_PERMISSIONS_TEXT[i.key].icon),l(),k(e===n-1?3:-1)}}function Gt(o,r){if(o&1&&(se(0,Wt,4,7,null,null,Vt),C(2,"keyvalue")),o&2){let i=u(2);ae(v(2,0,i.permissions,i.originalOrderKeyValue))}}function Zt(o,r){if(o&1&&(s(0,"div",51),d(1,"app-share-repository",55),a()),o&2){let i=u(2);l(),m("share",i.share)("showIcon",!0)("showFullPath",!0)}}function Yt(o,r){if(o&1){let i=G();s(0,"div",44),d(1,"fa-icon",45),s(2,"div",46)(3,"span"),p(4),a(),s(5,"span",47),p(6),a()(),s(7,"div",48),_(8,Gt,3,3),s(9,"button",49),C(10,"translate"),w("click",function(){F(i);let n=u();return M(n.toggleRequireAuth())}),d(11,"fa-icon",50),a(),s(12,"button",49),C(13,"translate"),w("click",function(){F(i);let n=u();return M(n.copyToClipboard())}),d(14,"fa-icon",50),a()()(),_(15,Zt,2,3,"div",51),d(16,"hr",52)}if(o&2){let i=u();l(),m("icon",i.icons.links),l(3),$(i.linkForm.value.name||i.linkForm.value.shareName),l(2),$(i.linkForm.value.email),l(2),k(i.share&&i.permissions?8:-1),l(),x(O("btn btn-sm ",i.linkForm.value.requireAuth?"btn-success":"btn-warning")),m("tooltip",v(10,15,"Password",i.locale.language)),l(2),m("icon",i.linkForm.value.requireAuth?i.icons.faLock:i.icons.faLockOpen),l(),x(O("btn btn-sm ms-2 ",i.linkWasCopied?"btn-info":"btn-secondary")),m("tooltip",v(13,18,"Copy link",i.locale.language)),l(2),m("icon",i.linkWasCopied?i.icons.faClipboardCheck:i.icons.faClipboard),l(),k(i.share?15:-1)}}function Xt(o,r){if(o&1&&(s(0,"span"),p(1),a()),o&2){let i=u();x(O("badge rounded-pill ",(i.share?i.share.link.nbAccess:i.link.nbAccess)>=i.linkForm.value.limitAccess?"bg-danger":"bg-success")),l(),xe(" ",i.share?i.share.link.nbAccess:i.link.nbAccess,"/",i.linkForm.value.limitAccess," ")}}function zt(o,r){if(o&1&&(s(0,"span",20),p(1),a()),o&2){let i=u();l(),$(i.share?i.share.link.nbAccess:i.link.nbAccess)}}function Qt(o,r){if(o&1&&(s(0,"div",27)(1,"label",56),p(2,"Share name"),a(),d(3,"input",57),C(4,"translate"),a(),s(5,"div",27)(6,"label",58),p(7,"Share description"),a(),d(8,"input",59),C(9,"translate"),a()),o&2){let i=u();l(3),K("is-invalid",i.linkForm.controls.shareName.invalid),m("placeholder",v(4,4,"Share name",i.locale.language)),l(5),m("placeholder",v(9,7,"Share description",i.locale.language))}}function Jt(o,r){if(o&1&&(s(0,"option",30),p(1),a()),o&2){let i=r.$implicit;m("ngValue",i),l(),$(i)}}function ei(o,r){if(o&1&&(s(0,"div",37),d(1,"app-password-strength-bar",60),a()),o&2){let i=u();l(),m("passwordToCheck",i.password)}}function ti(o,r){if(o&1){let i=G();s(0,"button",61),w("click",function(){F(i);let n=u();return M(n.confirmDeletion=!0)}),p(1," Remove "),a()}if(o&2){let i=u();m("disabled",i.confirmDeletion)}}var ne=(()=>{let r=class r{constructor(){this.layout=S(B),this.parentSpaceId=null,this.isSharesRepo=!1,this.inSharesList=!1,this.submitEvent=new re,this.shareChange=new re,this.locale=S(Q),this.confirmDeletion=!1,this.submitted=!1,this.SPACES_PERMISSIONS_TEXT=mt,this.originalOrderKeyValue=at,this.icons={faEye:Je,faEyeSlash:ot,links:R.LINKS,faClipboard:tt,faClipboardCheck:et,faLock:nt,faLockOpen:it},this.languages=this.layout.getLanguages(),this.minDate=he(),this.defaultPassword=this.layout.translateString(rt),this.passwordMinLength=8,this.password="",this.linkIsExpired=!1,this.linkIsHovered=!1,this.linkWasCopied=!1,this.userService=S(St),this.sharesService=S(Lt),this.linksService=S(Pt),this.spacesService=S(Et),this.minDate.setDate(this.minDate.getDate()+1)}ngOnInit(){this.link?this.initLink():this.file?this.initFile():this.initShareLink(),this.linkForm.value.requireAuth&&(this.password=this.defaultPassword),this.linkForm.value.expiresAt&&this.isLinkIsExpired(this.share?this.share.link.expiresAt:this.link.expiresAt),this.linkForm.controls.expiresAt.valueChanges.subscribe(e=>this.isLinkIsExpired(e))}onPermissionChange(){let e=ut(this.permissions);this.linkForm.controls.permissions.setValue(e),e!==this.share.link.permissions?this.linkForm.controls.permissions.markAsDirty():this.linkForm.controls.permissions.markAsPristine()}toggleRequireAuth(){this.linkForm.controls.requireAuth.setValue(!this.linkForm.value.requireAuth),this.linkForm.controls.requireAuth.markAsDirty()}copyToClipboard(){this.linksService.copyLinkToClipboard(this.share?this.share.link.uuid:this.link.uuid),this.linkWasCopied=!0,this.layout.sendNotification("info","Link copied",this.linkForm.value.name||this.linkForm.value.shareName),setTimeout(()=>this.linkWasCopied=!1,3e3)}onCancel(){this.confirmDeletion?this.confirmDeletion=!1:this.layout.closeDialog()}onSubmit(){if(this.submitted=!0,this.confirmDeletion){(this.parentSpaceId?this.spacesService.deleteSpaceShare(this.parentSpaceId,this.share.id):this.sharesService.deleteShare(this.share.id)).subscribe({next:()=>{this.layout.sendNotification("success","Link deleted",this.share.link.name||this.share.name),this.shareChange.emit(["delete",this.share]),this.layout.closeDialog()},error:c=>{this.layout.sendNotification("error","Delete share",this.share.name,c),this.layout.closeDialog()}});return}if(this.file?.id){let n=this.share,{link:t}=n,c=_e(n,["link"]),g=I(y(y({},t),this.linkForm.value),{password:this.mustIncludePassword()?this.password:void 0});c.name=de("shareName",g),c.description=de("shareDescription",g);let E=this.linksService.shareLinkGuestToMember(-1,-1,g);this.sharesService.createShare(I(y({},c),{type:yt.LINK,links:[E]})).subscribe({next:A=>{this.shareChange.emit(["add",A]),this.layout.sendNotification("success","Link created",t.name||A.name),this.layout.closeDialog()},error:A=>{this.layout.sendNotification("error","Link error",this.share.name,A),this.layout.closeDialog()}});return}let e={};for(let t in this.linkForm.controls)this.linkForm.controls[t].dirty&&(e[t]=this.linkForm.controls[t].value);if(this.mustIncludePassword()&&(e.password=this.password),this.share?.id){Object.keys(e).length&&this.linksService.updateLinkFromSpaceOrShare(this.share.link.id,this.share.id,pt.SHARE,e).subscribe({next:t=>{this.share.name=this.linkForm.value.shareName,this.share.description=this.linkForm.value.shareDescription,this.share.link=Object.assign(this.share.link,t),this.share.updateTimes(),this.share.updatePermission(),this.shareChange.emit(["update",this.share]),this.layout.closeDialog()},error:t=>{this.layout.sendNotification("error","Link error",this.share.link.name||this.share.name,t),this.layout.closeDialog()}}),this.layout.closeDialog();return}this.submitEvent.emit(e)}initFile(){let e=this.sharesService.initShareFromFile(this.userService.user,this.file,this.isSharesRepo,this.inSharesList)[0];this.share=I(y({},e),{link:{id:-1,userId:-1,uuid:"",isActive:!0,requireAuth:!1,permissions:"",nbAccess:0,limitAccess:0}}),this.linksService.genUUID().subscribe(n=>this.share.link.uuid=n),this.initShareLink(),this.onPermissionChange()}initShareLink(){this.linkForm=new me({shareName:new f(this.share.name,z.required),shareDescription:new f(this.share.description||""),name:new f(this.share.link?.name||""),email:new f(this.share.link?.email||"",z.email),language:new f(this.share.link.language||null),limitAccess:new f(this.share.link.limitAccess||null),expiresAt:new f(this.share.link.expiresAt||null),requireAuth:new f(this.share.link.requireAuth||!1),permissions:new f(this.share.link.permissions),isActive:new f(this.share.link.isActive)}),this.permissions=dt(this.share.file.permissions,this.share.link.permissions,[L.SHARE_INSIDE,L.SHARE_OUTSIDE,...this.share.file.isDir?[]:[L.DELETE,L.ADD]])}initLink(){this.linkForm=new me({shareName:new f(""),shareDescription:new f(""),name:new f(this.link.name||""),email:new f(this.link.email||"",z.email),language:new f(this.link.language||null),limitAccess:new f(this.link.limitAccess||null),expiresAt:new f(this.link.expiresAt||null),requireAuth:new f(this.link.requireAuth||!1),permissions:new f(this.link.permissions),isActive:new f(this.link.isActive)}),this.link.id||(this.linkForm.controls.name.markAsDirty(),this.linkForm.controls.isActive.markAsDirty())}isLinkIsExpired(e){if(e==null){if(this.linkIsExpired=!1,e===null)return;this.linkForm.controls.expiresAt.setValue(null)}this.linkIsExpired=he()>=e}mustIncludePassword(){return!!this.password.length&&this.password!==this.defaultPassword}};r.\u0275fac=function(n){return new(n||r)},r.\u0275cmp=W({type:r,selectors:[["app-link-dialog"]],inputs:{share:"share",parentSpaceId:"parentSpaceId",link:"link",file:"file",isSharesRepo:"isSharesRepo",inSharesList:"inSharesList"},outputs:{submitEvent:"submitEvent",shareChange:"shareChange"},decls:73,vars:52,consts:[[1,"modal-header","align-items-center"],[1,"modal-title"],[1,"me-2",3,"icon"],[1,"modal-title","ms-auto"],["l10nTranslate",""],["aria-label","Close","type","button",1,"btn-close","btn-close-white","ms-2",3,"click"],[1,"modal-body"],["autocomplete","off",3,"formGroup"],[1,"d-flex"],[1,"d-flex","flex-column","flex-grow-1"],[1,"d-flex","align-items-center","cursor-pointer","py-2",3,"mouseover","mouseleave","focus","click"],["for","link","l10nTranslate",""],["id","link",1,"ms-auto"],[1,"d-flex","align-items-center","py-2"],["for","state","l10nTranslate","",1,"cursor-pointer","me-auto"],[1,"d-flex","align-items-center","form-check","form-switch","cursor-pointer"],["id","state","formControlName","isActive","type","checkbox","role","button",1,"form-check-input"],["for","access","l10nTranslate",""],["id","access",1,"ms-auto"],[3,"class"],[1,"badge","rounded-pill","bg-success"],[1,"d-flex","align-items-center"],["for","guestName","l10nTranslate",""],["id","guestName","formControlName","name","type","text",1,"form-control","form-control-sm","ms-auto","w-50",3,"placeholder"],[1,"d-flex","align-items-center","justify-content-between","px-0"],["for","guestEmail","l10nTranslate",""],["id","guestEmail","autocomplete","off","formControlName","email","type","email",1,"form-control","form-control-sm","ms-auto","w-50",3,"placeholder"],[1,"d-flex","align-items-center","justify-content-between"],["for","guestLanguage","l10nTranslate",""],["id","guestLanguage","formControlName","language",1,"form-control","form-select","form-select-sm","ms-auto","w-50"],[3,"ngValue"],["for","limitAccess","l10nTranslate",""],["id","limitAccess","formControlName","limitAccess","min","1","type","number",1,"form-control","form-control-sm","ms-auto","w-50",3,"placeholder"],["for","expiration","l10nTranslate",""],["id","expiration","formControlName","expiresAt","placement","left","type","text","bsDatepicker","",1,"form-control","form-control-sm","ms-auto","w-50",3,"placeholder","bsConfig"],[1,"d-flex","align-items-center","px-0"],["for","requireAuth","translate","",1,"cursor-pointer","me-auto"],[1,"d-flex","align-items-center","d-none","d-sm-flex","mx-auto"],["id","requireAuth","formControlName","requireAuth","type","checkbox","role","button",1,"form-check-input"],["placeholder","Set a password",2,"width","45%",3,"passwordChange","isRequired","disabled","passwordMinLength","password","showGenerator"],[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,"d-flex","flex-fill","align-items-center"],[1,"circle-primary-icon","me-2",3,"icon"],[1,"d-flex","flex-column"],[1,"fs-xxxs"],[1,"d-flex","ms-auto"],["container","body","type","button",3,"click","tooltip"],["size","lg",3,"icon"],[1,"d-flex","align-items-center","d-none","d-sm-flex","py-2"],[1,"my-2"],["btnCheckbox","","type","button",1,"btn","btn-sm","btn-custom","me-0","ms-2",3,"ngModelChange","ngModel","tooltip"],[1,"vr","mx-2"],["id","file",3,"share","showIcon","showFullPath"],["for","shareName","l10nTranslate",""],["id","shareName","formControlName","shareName","type","email",1,"form-control","form-control-sm","ms-auto","w-50",3,"placeholder"],["for","shareDescription","l10nTranslate",""],["id","shareDescription","formControlName","shareDescription","type","email",1,"form-control","form-control-sm","ms-auto","w-50",3,"placeholder"],[3,"passwordToCheck"],["type","button","l10nTranslate","",1,"btn","btn-sm","btn-danger",3,"click","disabled"]],template:function(n,t){n&1&&(s(0,"div",0)(1,"h4",1),d(2,"fa-icon",2),s(3,"span"),p(4),a()(),s(5,"h4",3),_(6,Kt,2,0,"span",4)(7,qt,2,0,"span",4),a(),s(8,"button",5),w("click",function(){return t.layout.closeDialog()}),a()(),s(9,"div",6),_(10,Yt,17,21),s(11,"form",7)(12,"div",8)(13,"div",9)(14,"div",10),w("mouseover",function(){return t.linkIsHovered=!0})("mouseleave",function(){return t.linkIsHovered=!1})("focus",function(){return t.linkIsHovered=!0})("click",function(){return t.copyToClipboard()}),s(15,"label",11),p(16,"Link"),a(),s(17,"span",12),p(18),a()(),s(19,"div",13)(20,"label",14),p(21,"Active"),a(),s(22,"div",15),d(23,"input",16),s(24,"span"),p(25),C(26,"translate"),a()()(),s(27,"div",13)(28,"label",17),p(29,"Current access count"),a(),s(30,"span",18),_(31,Xt,2,5,"span",19)(32,zt,2,1,"span",20),a()(),_(33,Qt,10,10),s(34,"div",21)(35,"label",22),p(36,"Guest name"),a(),d(37,"input",23),C(38,"translate"),a(),s(39,"div",24)(40,"label",25),p(41,"Guest email"),a(),d(42,"input",26),C(43,"translate"),a(),s(44,"div",27)(45,"label",28),p(46,"Guest language"),a(),s(47,"select",29),se(48,Jt,2,2,"option",30,Ie),a()(),s(50,"div",27)(51,"label",31),p(52,"Limit access"),a(),d(53,"input",32),C(54,"translate"),a(),s(55,"div",27)(56,"label",33),p(57,"Expiration"),a(),d(58,"input",34),C(59,"translate"),a(),s(60,"div",35)(61,"label",36),p(62,"Password"),a(),_(63,ei,2,1,"div",37),s(64,"div",15),d(65,"input",38),a(),s(66,"app-input-password",39),pe("passwordChange",function(g){return ce(t.password,g)||(t.password=g),g}),a()()()()()(),s(67,"div",40),_(68,ti,2,1,"button",41),s(69,"button",42),w("click",function(){return t.onCancel()}),p(70,"Cancel"),a(),s(71,"button",43),w("click",function(){return t.onSubmit()}),p(72),a()()),n&2&&(l(2),m("icon",t.icons.links),l(2),$(t.linkForm.value.name||t.linkForm.value.shareName),l(2),k(t.share!=null&&t.share.id||t.link!=null&&t.link.id?6:7),l(4),k(t.share||t.link?10:-1),l(),m("formGroup",t.linkForm),l(6),K("text-primary",t.linkIsHovered),l(),D(" ",t.share?t.share.link.uuid:t.link.uuid," "),l(6),x(O("badge rounded-pill ms-3 ",t.linkForm.value.isActive?"bg-primary":"bg-danger")),l(),D(" ",v(26,35,t.linkForm.value.isActive?"yes":"no",t.locale.language)," "),l(6),k(t.linkForm.value.limitAccess?31:32),l(2),k(t.share?33:-1),l(4),m("placeholder",v(38,38,"Guest name",t.locale.language)),l(5),K("is-invalid",t.linkForm.controls.email.invalid),m("placeholder",v(43,41,"Guest email",t.locale.language)),l(6),ae(t.languages),l(5),m("placeholder",v(54,44,"Unlimited",t.locale.language)),l(5),K("text-danger",t.linkIsExpired),m("placeholder",v(59,47,"Unlimited",t.locale.language))("bsConfig",Le(50,Ut,t.minDate)),l(5),k(t.linkForm.value.requireAuth&&t.password!==t.defaultPassword?63:-1),l(3),m("isRequired",t.linkForm.value.requireAuth)("disabled",!t.linkForm.value.requireAuth)("passwordMinLength",t.passwordMinLength),le("password",t.password),m("showGenerator",!0),l(2),k(t.share!=null&&t.share.id?68:-1),l(3),x(O("btn btn-sm ",t.confirmDeletion?"btn-danger":"btn-primary")),m("disabled",t.linkForm.invalid||t.linkForm.controls.requireAuth.value&&t.password.length<t.passwordMinLength||t.submitted),l(),D(" ",t.confirmDeletion?"Confirm deletion":"Confirm"," "))},dependencies:[X,We,ze,Ye,Xe,_t,gt,qe,Me,Ue,Ve,Ne,$e,De,He,Re,Pe,Ke,Fe,Ct,Ze,Ge,je,Oe,Be,At,vt,Te,J],encapsulation:2});let o=r;return o})();export{Rt as a,At as b,Lt as c,ne as d,Pt as e};