@sync-in/server 1.8.0 → 1.8.1

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 (55) hide show
  1. package/CHANGELOG.md +11 -2
  2. package/package.json +10 -9
  3. package/server/app.bootstrap.js +4 -2
  4. package/server/app.bootstrap.js.map +1 -1
  5. package/server/applications/files/files.controller.js +12 -4
  6. package/server/applications/files/files.controller.js.map +1 -1
  7. package/server/applications/files/files.controller.spec.js +18 -4
  8. package/server/applications/files/files.controller.spec.js.map +1 -1
  9. package/server/applications/files/services/files-manager.service.js.map +1 -1
  10. package/server/applications/files/services/files-methods.service.js +1 -6
  11. package/server/applications/files/services/files-methods.service.js.map +1 -1
  12. package/server/applications/files/utils/doc-textify/adapters/pdf.js +5 -16
  13. package/server/applications/files/utils/doc-textify/adapters/pdf.js.map +1 -1
  14. package/server/applications/users/services/users-manager.service.js +1 -2
  15. package/server/applications/users/services/users-manager.service.js.map +1 -1
  16. package/server/applications/users/users.gateway.js +6 -0
  17. package/server/applications/users/users.gateway.js.map +1 -1
  18. package/server/common/image.js +62 -58
  19. package/server/common/image.js.map +1 -1
  20. package/static/3rdpartylicenses.txt +0 -26
  21. package/static/chunk-2VMSXRCB.js +12 -0
  22. package/static/{chunk-X5XGK6T7.js → chunk-3OHSRRKH.js} +1 -1
  23. package/static/{chunk-H6NE33VX.js → chunk-3R4WKOHQ.js} +1 -1
  24. package/static/{chunk-WLMNXRBS.js → chunk-3R74L4UU.js} +1 -1
  25. package/static/{chunk-ZPF2DSQV.js → chunk-5UKZLU5H.js} +1 -1
  26. package/static/{chunk-KFJIQIGR.js → chunk-BQV4FRM6.js} +1 -1
  27. package/static/{chunk-MFLIJH6T.js → chunk-CETH7UYS.js} +1 -1
  28. package/static/{chunk-C36MW4ME.js → chunk-DIT6W7VM.js} +9 -9
  29. package/static/{chunk-YW57T2PF.js → chunk-IQSKQXC3.js} +1 -1
  30. package/static/{chunk-QZU2S5CV.js → chunk-ITUFI2BJ.js} +1 -1
  31. package/static/{chunk-PGZZP5W3.js → chunk-LCTZJ537.js} +1 -1
  32. package/static/{chunk-LVM4QB22.js → chunk-LK2UCQJ6.js} +1 -1
  33. package/static/{chunk-ZTCRGJ6Y.js → chunk-LP5TBXEN.js} +1 -1
  34. package/static/{chunk-BIKLW4YS.js → chunk-LVSNIS5P.js} +1 -1
  35. package/static/{chunk-VM4YX6Q7.js → chunk-MTVSJTIW.js} +1 -1
  36. package/static/{chunk-V3AT2BKP.js → chunk-O6FYXVHI.js} +1 -1
  37. package/static/{chunk-SHIVUDP3.js → chunk-PNR6M34W.js} +1 -1
  38. package/static/{chunk-M3XVNQZQ.js → chunk-QMRBZHE4.js} +1 -1
  39. package/static/{chunk-NO2LTNW3.js → chunk-QSJRY3TF.js} +1 -1
  40. package/static/{chunk-373XVRXW.js → chunk-QUUIRSYT.js} +1 -1
  41. package/static/{chunk-UEQCWMXD.js → chunk-RFH46UW3.js} +1 -1
  42. package/static/{chunk-AY2SZ3G6.js → chunk-RSXHRKM5.js} +1 -1
  43. package/static/{chunk-UJPPR4MX.js → chunk-RV3VZJPZ.js} +1 -1
  44. package/static/{chunk-JSWCNGXJ.js → chunk-S7HNXVRB.js} +1 -1
  45. package/static/{chunk-VKK5BSLX.js → chunk-SJR5R3Y4.js} +1 -1
  46. package/static/{chunk-UG5DMXYO.js → chunk-V3LHHZYN.js} +1 -1
  47. package/static/{chunk-HAS5ZOTR.js → chunk-VJTXJ43D.js} +1 -1
  48. package/static/{chunk-HNQRZALS.js → chunk-VQQKMY2C.js} +1 -1
  49. package/static/{chunk-MSUHTBB2.js → chunk-WSSU2HXE.js} +1 -1
  50. package/static/{chunk-GUGNR5TF.js → chunk-XDZGW64M.js} +2 -2
  51. package/static/{chunk-TPYBFZS5.js → chunk-XTRDKGKG.js} +1 -1
  52. package/static/{chunk-YEKR5OPO.js → chunk-YLWTEC3X.js} +1 -1
  53. package/static/index.html +1 -1
  54. package/static/{main-VOL6OMJ5.js → main-4H5BJY3J.js} +2 -2
  55. package/static/chunk-WJW7CT6G.js +0 -27
@@ -1,4 +1,4 @@
1
- import{q as ct,r as ht}from"./chunk-HNQRZALS.js";import{I as it,Jb as at,Lb as rt,Nb as ot,Rb as lt,Za as st,c as je,d as he,f as G,g as Oe,h as de,l as Se,n as Q,o as pe,r as Je,s as Xe}from"./chunk-GUGNR5TF.js";import{$ as ee,$a as R,Ab as w,Bc as oe,Cc as le,Cd as Ye,Db as C,Dd as qe,E as Me,Fb as l,Fc as Ne,Ga as N,Gb as Fe,H as ke,Ha as ye,Hb as De,Ic as ze,J as fe,Jb as z,Jc as ce,Kb as j,Lb as $,Mb as B,Na as h,Nb as Re,Ob as A,Pa as v,Pb as re,Qa as ne,Qb as b,Rb as T,Sa as Le,Ub as ve,Va as D,Vb as Ce,Wa as u,Wb as be,Xa as se,Yb as Ue,Z as Pe,_b as xe,_c as $e,a as we,ab as ae,ac as Ve,bb as U,bd as We,c as Ie,cb as V,cd as Ke,da as te,dc as Te,dg as nt,ea as ie,eb as O,ec as I,fc as Be,gc as M,hd as Ge,ia as L,ic as W,jb as k,k as ue,kb as S,kf as et,lb as E,na as y,o as Ae,oa as _,ob as _e,of as tt,pb as ge,qb as d,r as J,rb as p,sb as m,sc as K,tb as g,vd as Qe,x as X,xd as Ze,za as F,zc as He}from"./chunk-C36MW4ME.js";import{n as x}from"./chunk-DM4NXKEP.js";var hi=(()=>{let n=class n{transform(e,t="L HH:mm:ss"){return e?x(e).format(t):""}};n.\u0275fac=function(t){return new(t||n)},n.\u0275pipe=V({name:"amDateFormat",type:n,pure:!0});let s=n;return s})();var vt=["*"],Ct=s=>["nav-item",s];function bt(s,n){if(s&1){let a=w();p(0,"span",7),C("click",function(t){y(a);let i=l().$implicit,r=l();return t.preventDefault(),_(r.removeTab(i))}),b(1," \u274C"),m()}}function xt(s,n){if(s&1){let a=w();p(0,"li",3),C("keydown",function(t){let i=y(a).index,r=l();return _(r.keyNavActions(t,i))}),p(1,"a",4),C("click",function(){let t=y(a).$implicit;return _(t.active=!0)}),p(2,"span",5),b(3),m(),O(4,bt,2,0,"span",6),m()()}if(s&2){let a=n.$implicit;A("active",a.active)("disabled",a.disabled),d("ngClass",Ve(15,Ct,a.customClass||"")),h(),A("active",a.active)("disabled",a.disabled),k("aria-controls",a.id?a.id:"")("aria-selected",!!a.active)("id",a.id?a.id+"-link":""),h(),d("ngTransclude",a.headingRef),h(),T(a.heading),h(),d("ngIf",a.removable)}}var Tt=(()=>{let n=class n{set ngTransclude(e){this._ngTransclude=e,e&&this.viewRef.createEmbeddedView(e)}get ngTransclude(){return this._ngTransclude}constructor(e){this.viewRef=e}};n.\u0275fac=function(t){return new(t||n)(u(se))},n.\u0275dir=U({type:n,selectors:[["","ngTransclude",""]],inputs:{ngTransclude:"ngTransclude"}});let s=n;return s})(),Ot=(()=>{let n=class n{constructor(){this.type="tabs",this.isKeysAllowed=!0,this.ariaLabel="Tabs"}};n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=te({token:n,factory:n.\u0275fac,providedIn:"root"});let s=n;return s})(),St=(()=>{let n=class n{get vertical(){return this._vertical}set vertical(e){this._vertical=e,this.setClassMap()}get justified(){return this._justified}set justified(e){this._justified=e,this.setClassMap()}get type(){return this._type}set type(e){this._type=e,this.setClassMap()}get isKeysAllowed(){return this._isKeysAllowed}set isKeysAllowed(e){this._isKeysAllowed=e}constructor(e,t,i){this.renderer=t,this.elementRef=i,this.clazz=!0,this.tabs=[],this.classMap={},this.ariaLabel="Tabs",this.isDestroyed=!1,this._vertical=!1,this._justified=!1,this._type="tabs",this._isKeysAllowed=!0,this.defaultActivationScheduled=!1,Object.assign(this,e)}ngOnDestroy(){this.isDestroyed=!0}addTab(e){if(e.tabOrder!==void 0?this.insertTabByOrder(e):this.tabs.push(e),e.active){e.active=!0;return}this.defaultActivationScheduled||(this.defaultActivationScheduled=!0,Promise.resolve().then(()=>{if(this.defaultActivationScheduled=!1,!this.tabs.length||this.tabs.some(i=>!!i.active))return;let t=this.tabs.find(i=>!i.disabled);t&&(t.active=!0)}))}insertTabByOrder(e){let t=this.tabs.length;for(let i=0;i<this.tabs.length;i++){let r=this.tabs[i];if(r.tabOrder!==void 0&&e.tabOrder!==void 0&&e.tabOrder<r.tabOrder){t=i;break}if(r.tabOrder===void 0){t=i;break}}this.tabs.splice(t,0,e)}removeTab(e,t={reselect:!0,emit:!0}){let i=this.tabs.indexOf(e);if(!(i===-1||this.isDestroyed)){if(t.reselect&&e.active&&this.hasAvailableTabs(i)){let r=this.getClosestTabIndex(i);this.tabs[r].active=!0}t.emit&&e.removed.emit(e),this.tabs.splice(i,1),e.elementRef.nativeElement.parentNode&&this.renderer.removeChild(e.elementRef.nativeElement.parentNode,e.elementRef.nativeElement)}}keyNavActions(e,t){if(!this.isKeysAllowed)return;let i=Array.from(this.elementRef.nativeElement.querySelectorAll(".nav-link"));if(e.keyCode===13||e.key==="Enter"||e.keyCode===32||e.key==="Space"){e.preventDefault(),i[t%i.length].click();return}if(e.keyCode===39||e.key==="RightArrow"){let r,o=1;do r=i[(t+o)%i.length],o++;while(r.classList.contains("disabled"));r.focus();return}if(e.keyCode===37||e.key==="LeftArrow"){let r,o=1,c=t;do c-o<0?(c=i.length-1,r=i[c],o=0):r=i[c-o],o++;while(r.classList.contains("disabled"));r.focus();return}if(e.keyCode===36||e.key==="Home"){e.preventDefault();let r,o=0;do r=i[o%i.length],o++;while(r.classList.contains("disabled"));r.focus();return}if(e.keyCode===35||e.key==="End"){e.preventDefault();let r,o=1,c=t;do c-o<0?(c=i.length-1,r=i[c],o=0):r=i[c-o],o++;while(r.classList.contains("disabled"));r.focus();return}if((e.keyCode===46||e.key==="Delete")&&this.tabs[t].removable){if(this.removeTab(this.tabs[t]),i[t+1]){i[(t+1)%i.length].focus();return}i[i.length-1]&&i[0].focus()}}getClosestTabIndex(e){let t=this.tabs.length;if(!t)return-1;for(let i=1;i<=t;i+=1){let r=e-i,o=e+i;if(this.tabs[r]&&!this.tabs[r].disabled)return r;if(this.tabs[o]&&!this.tabs[o].disabled)return o}return-1}hasAvailableTabs(e){let t=this.tabs.length;if(!t)return!1;for(let i=0;i<t;i+=1)if(!this.tabs[i].disabled&&i!==e)return!0;return!1}setClassMap(){this.classMap={"nav-stacked":this.vertical,"flex-column":this.vertical,"nav-justified":this.justified,[`nav-${this.type}`]:!0}}};n.\u0275fac=function(t){return new(t||n)(u(Ot),u(D),u(F))},n.\u0275cmp=R({type:n,selectors:[["tabset"]],hostVars:2,hostBindings:function(t,i){t&2&&A("tab-container",i.clazz)},inputs:{vertical:"vertical",justified:"justified",type:"type"},ngContentSelectors:vt,decls:4,vars:3,consts:[["role","tablist",1,"nav",3,"click","ngClass"],[3,"ngClass","active","disabled","keydown",4,"ngFor","ngForOf"],[1,"tab-content"],[3,"keydown","ngClass"],["href","javascript:void(0);","role","tab",1,"nav-link",3,"click"],[3,"ngTransclude"],["class","bs-remove-tab",3,"click",4,"ngIf"],[1,"bs-remove-tab",3,"click"]],template:function(t,i){t&1&&(Fe(),p(0,"ul",0),C("click",function(o){return o.preventDefault()}),O(1,xt,5,17,"li",1),m(),p(2,"div",2),De(3),m()),t&2&&(d("ngClass",i.classMap),k("aria-label",i.ariaLabel),h(),d("ngForOf",i.tabs))},dependencies:[He,oe,Tt,le],styles:["[_nghost-%COMP%] .nav-tabs[_ngcontent-%COMP%] .nav-item.disabled[_ngcontent-%COMP%] a.disabled[_ngcontent-%COMP%]{cursor:default}"]});let s=n;return s})(),Et=(()=>{let n=class n{get customClass(){return this._customClass}set customClass(e){this.customClass&&this.customClass.split(" ").forEach(t=>{this.renderer.removeClass(this.elementRef.nativeElement,t)}),this._customClass=e?e.trim():"",this.customClass&&this.customClass.split(" ").forEach(t=>{this.renderer.addClass(this.elementRef.nativeElement,t)})}get active(){return this._active}set active(e){if(this._active!==e){if(this.disabled&&e||!e){this._active&&!e&&(this.deselect.emit(this),this._active=e);return}this._active=e,this.selectTab.emit(this),this.tabset.tabs.forEach(t=>{t!==this&&(t.active=!1)})}}get ariaLabelledby(){return this.id?`${this.id}-link`:""}constructor(e,t,i){this.elementRef=t,this.renderer=i,this.disabled=!1,this.removable=!1,this.selectTab=new v,this.deselect=new v,this.removed=new v,this.addClass=!0,this.role="tabpanel",this._active=!1,this._customClass="",this.tabset=e}ngOnInit(){this.removable=!!this.removable,this.tabset.addTab(this)}ngOnDestroy(){this.tabset.removeTab(this,{reselect:!1,emit:!1})}};n.\u0275fac=function(t){return new(t||n)(u(St),u(F),u(D))},n.\u0275dir=U({type:n,selectors:[["tab"],["","tab",""]],hostVars:7,hostBindings:function(t,i){t&2&&(k("id",i.id)("role",i.role)("aria-labelledby",i.ariaLabelledby),A("active",i.active)("tab-pane",i.addClass))},inputs:{heading:"heading",id:"id",disabled:"disabled",removable:"removable",tabOrder:"tabOrder",customClass:"customClass",active:"active"},outputs:{selectTab:"selectTab",deselect:"deselect",removed:"removed"},exportAs:["tab"]});let s=n;return s})(),bi=(()=>{let n=class n{constructor(e,t){t.headingRef=e}};n.\u0275fac=function(t){return new(t||n)(u(Le),u(Et))},n.\u0275dir=U({type:n,selectors:[["","tabHeading",""]]});let s=n;return s})(),xi=(()=>{let n=class n{static forRoot(){return{ngModule:n,providers:[]}}};n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=ae({type:n}),n.\u0275inj=ie({imports:[ce]});let s=n;return s})();var dt=(()=>{let n=class n{constructor(){this.cdRef=L(K),this.ngZone=L(ne)}format(e){return e.from(x(),this.lastOmitSuffix)}transform(e,t,i){return this.hasChanged(e,t)?(this.lastTime=this.getTime(e),this.lastValue=e,this.lastOmitSuffix=t,this.lastLocale=this.getLocale(e),this.formatFn=i||this.format.bind(this),this.removeTimer(),this.createTimer(),this.lastText=this.formatFn(x(e))):this.createTimer(),this.lastText}ngOnDestroy(){this.removeTimer()}createTimer(){if(this.currentTimer)return;let e=x(this.lastValue),t=this.getSecondsUntilUpdate(e)*1e3;this.currentTimer=this.ngZone.runOutsideAngular(()=>typeof window<"u"?window.setTimeout(()=>{this.lastText=this.formatFn(x(this.lastValue)),this.currentTimer=null,this.ngZone.run(()=>this.cdRef.markForCheck())},t):null)}removeTimer(){this.currentTimer&&(window.clearTimeout(this.currentTimer),this.currentTimer=null)}getSecondsUntilUpdate(e){let t=Math.abs(x().diff(e,"minute"));return t<1?1:t<60?30:t<180?300:3600}hasChanged(e,t){return this.getTime(e)!==this.lastTime||this.getLocale(e)!==this.lastLocale||t!==this.lastOmitSuffix}getTime(e){return e instanceof Date?e.getTime():x.isDayjs(e)?e.valueOf():x(e).valueOf()}getLocale(e){return x.isDayjs(e)?e.locale():x.locale()}};n.\u0275fac=function(t){return new(t||n)},n.\u0275pipe=V({name:"amTimeAgo",type:n,pure:!1});let s=n;return s})();var It=["ulElement"],At=["liElements"],Mt=(s,n,a,e)=>({matches:s,itemTemplate:n,query:a,$implicit:e}),kt=(s,n,a,e)=>({item:s,index:n,match:a,query:e});function Pt(s,n){}function Lt(s,n){if(s&1&&g(0,"span",4),s&2){let a=n.match,e=n.query,t=l();d("innerHtml",t.highlight(a,e),N)}}function Ft(s,n){if(s&1&&(p(0,"h6",8),b(1),m()),s&2){let a=l().$implicit;h(),T(a)}}function Dt(s,n){}function Rt(s,n){if(s&1){let a=w();p(0,"button",9,2),C("click",function(t){y(a);let i=l().$implicit,r=l(2);return _(r.selectMatch(i,t))})("mouseenter",function(){y(a);let t=l().$implicit,i=l(2);return _(i.selectActive(t))}),O(2,Dt,0,0,"ng-template",3),m()}if(s&2){let a=l(),e=a.$implicit,t=a.index,i=l(2),r=B(2);A("active",i.isActive(e)),d("id",i.popupId+"-"+t)("@typeaheadAnimation",i.animationState),h(2),d("ngTemplateOutlet",i.itemTemplate||r)("ngTemplateOutletContext",Te(6,kt,e.item,t,e,i.query))}}function Ut(s,n){if(s&1&&O(0,Ft,2,1,"h6",6)(1,Rt,3,11,"ng-template",7),s&2){let a=n.$implicit;d("ngIf",a.isHeader()),h(),d("ngIf",!a.isHeader())}}function Vt(s,n){if(s&1&&O(0,Ut,2,2,"ng-template",5),s&2){let a=l();d("ngForOf",a.matches)}}var Bt={\u00C1:"A",\u0102:"A",\u1EAE:"A",\u1EB6:"A",\u1EB0:"A",\u1EB2:"A",\u1EB4:"A",\u01CD:"A",\u00C2:"A",\u1EA4:"A",\u1EAC:"A",\u1EA6:"A",\u1EA8:"A",\u1EAA:"A",\u00C4:"A",\u01DE:"A",\u0226:"A",\u01E0:"A",\u1EA0:"A",\u0200:"A",\u00C0:"A",\u1EA2:"A",\u0202:"A",\u0100:"A",\u0104:"A",\u00C5:"A",\u01FA:"A",\u1E00:"A","\u023A":"A",\u00C3:"A","\uA732":"AA",\u00C6:"AE",\u01FC:"AE",\u01E2:"AE","\uA734":"AO","\uA736":"AU","\uA738":"AV","\uA73A":"AV","\uA73C":"AY",\u1E02:"B",\u1E04:"B",\u0181:"B",\u1E06:"B","\u0243":"B",\u0182:"B",\u0106:"C",\u010C:"C",\u00C7:"C",\u1E08:"C",\u0108:"C",\u010A:"C",\u0187:"C","\u023B":"C",\u010E:"D",\u1E10:"D",\u1E12:"D",\u1E0A:"D",\u1E0C:"D",\u018A:"D",\u1E0E:"D",\u01F2:"D",\u01C5:"D",\u0110:"D",\u018B:"D",\u01F1:"DZ",\u01C4:"DZ",\u00C9:"E",\u0114:"E",\u011A:"E",\u0228:"E",\u1E1C:"E",\u00CA:"E",\u1EBE:"E",\u1EC6:"E",\u1EC0:"E",\u1EC2:"E",\u1EC4:"E",\u1E18:"E",\u00CB:"E",\u0116:"E",\u1EB8:"E",\u0204:"E",\u00C8:"E",\u1EBA:"E",\u0206:"E",\u0112:"E",\u1E16:"E",\u1E14:"E",\u0118:"E","\u0246":"E",\u1EBC:"E",\u1E1A:"E","\uA76A":"ET",\u1E1E:"F",\u0191:"F",\u01F4:"G",\u011E:"G",\u01E6:"G",\u0122:"G",\u011C:"G",\u0120:"G",\u0193:"G",\u1E20:"G",\u01E4:"G",\u1E2A:"H",\u021E:"H",\u1E28:"H",\u0124:"H","\u2C67":"H",\u1E26:"H",\u1E22:"H",\u1E24:"H",\u0126:"H",\u00CD:"I",\u012C:"I",\u01CF:"I",\u00CE:"I",\u00CF:"I",\u1E2E:"I",\u0130:"I",\u1ECA:"I",\u0208:"I",\u00CC:"I",\u1EC8:"I",\u020A:"I",\u012A:"I",\u012E:"I",\u0197:"I",\u0128:"I",\u1E2C:"I","\uA779":"D","\uA77B":"F","\uA77D":"G","\uA782":"R","\uA784":"S","\uA786":"T","\uA76C":"IS",\u0134:"J","\u0248":"J",\u1E30:"K",\u01E8:"K",\u0136:"K","\u2C69":"K","\uA742":"K",\u1E32:"K",\u0198:"K",\u1E34:"K","\uA740":"K","\uA744":"K",\u0139:"L","\u023D":"L",\u013D:"L",\u013B:"L",\u1E3C:"L",\u1E36:"L",\u1E38:"L","\u2C60":"L","\uA748":"L",\u1E3A:"L",\u013F:"L","\u2C62":"L",\u01C8:"L",\u0141:"L",\u01C7:"LJ",\u1E3E:"M",\u1E40:"M",\u1E42:"M","\u2C6E":"M",\u0143:"N",\u0147:"N",\u0145:"N",\u1E4A:"N",\u1E44:"N",\u1E46:"N",\u01F8:"N",\u019D:"N",\u1E48:"N","\u0220":"N",\u01CB:"N",\u00D1:"N",\u01CA:"NJ",\u00D3:"O",\u014E:"O",\u01D1:"O",\u00D4:"O",\u1ED0:"O",\u1ED8:"O",\u1ED2:"O",\u1ED4:"O",\u1ED6:"O",\u00D6:"O",\u022A:"O",\u022E:"O",\u0230:"O",\u1ECC:"O",\u0150:"O",\u020C:"O",\u00D2:"O",\u1ECE:"O",\u01A0:"O",\u1EDA:"O",\u1EE2:"O",\u1EDC:"O",\u1EDE:"O",\u1EE0:"O",\u020E:"O","\uA74A":"O","\uA74C":"O",\u014C:"O",\u1E52:"O",\u1E50:"O",\u019F:"O",\u01EA:"O",\u01EC:"O",\u00D8:"O",\u01FE:"O",\u00D5:"O",\u1E4C:"O",\u1E4E:"O",\u022C:"O",\u01A2:"OI","\uA74E":"OO",\u0190:"E",\u0186:"O",\u0222:"OU",\u1E54:"P",\u1E56:"P","\uA752":"P",\u01A4:"P","\uA754":"P","\u2C63":"P","\uA750":"P","\uA758":"Q","\uA756":"Q",\u0154:"R",\u0158:"R",\u0156:"R",\u1E58:"R",\u1E5A:"R",\u1E5C:"R",\u0210:"R",\u0212:"R",\u1E5E:"R","\u024C":"R","\u2C64":"R","\uA73E":"C",\u018E:"E",\u015A:"S",\u1E64:"S",\u0160:"S",\u1E66:"S",\u015E:"S",\u015C:"S",\u0218:"S",\u1E60:"S",\u1E62:"S",\u1E68:"S",\u0164:"T",\u0162:"T",\u1E70:"T",\u021A:"T","\u023E":"T",\u1E6A:"T",\u1E6C:"T",\u01AC:"T",\u1E6E:"T",\u01AE:"T",\u0166:"T","\u2C6F":"A","\uA780":"L",\u019C:"M","\u0245":"V","\uA728":"TZ",\u00DA:"U",\u016C:"U",\u01D3:"U",\u00DB:"U",\u1E76:"U",\u00DC:"U",\u01D7:"U",\u01D9:"U",\u01DB:"U",\u01D5:"U",\u1E72:"U",\u1EE4:"U",\u0170:"U",\u0214:"U",\u00D9:"U",\u1EE6:"U",\u01AF:"U",\u1EE8:"U",\u1EF0:"U",\u1EEA:"U",\u1EEC:"U",\u1EEE:"U",\u0216:"U",\u016A:"U",\u1E7A:"U",\u0172:"U",\u016E:"U",\u0168:"U",\u1E78:"U",\u1E74:"U","\uA75E":"V",\u1E7E:"V",\u01B2:"V",\u1E7C:"V","\uA760":"VY",\u1E82:"W",\u0174:"W",\u1E84:"W",\u1E86:"W",\u1E88:"W",\u1E80:"W","\u2C72":"W",\u1E8C:"X",\u1E8A:"X",\u00DD:"Y",\u0176:"Y",\u0178:"Y",\u1E8E:"Y",\u1EF4:"Y",\u1EF2:"Y",\u01B3:"Y",\u1EF6:"Y","\u1EFE":"Y",\u0232:"Y","\u024E":"Y",\u1EF8:"Y",\u0179:"Z",\u017D:"Z",\u1E90:"Z","\u2C6B":"Z",\u017B:"Z",\u1E92:"Z",\u0224:"Z",\u1E94:"Z",\u01B5:"Z",\u0132:"IJ",\u0152:"OE","\u1D00":"A","\u1D01":"AE",\u0299:"B","\u1D03":"B","\u1D04":"C","\u1D05":"D","\u1D07":"E","\uA730":"F",\u0262:"G",\u029B:"G",\u029C:"H",\u026A:"I",\u0281:"R","\u1D0A":"J","\u1D0B":"K",\u029F:"L","\u1D0C":"L","\u1D0D":"M",\u0274:"N","\u1D0F":"O",\u0276:"OE","\u1D10":"O","\u1D15":"OU","\u1D18":"P",\u0280:"R","\u1D0E":"N","\u1D19":"R","\uA731":"S","\u1D1B":"T","\u2C7B":"E","\u1D1A":"R","\u1D1C":"U","\u1D20":"V","\u1D21":"W",\u028F:"Y","\u1D22":"Z",\u00E1:"a",\u0103:"a",\u1EAF:"a",\u1EB7:"a",\u1EB1:"a",\u1EB3:"a",\u1EB5:"a",\u01CE:"a",\u00E2:"a",\u1EA5:"a",\u1EAD:"a",\u1EA7:"a",\u1EA9:"a",\u1EAB:"a",\u00E4:"a",\u01DF:"a",\u0227:"a",\u01E1:"a",\u1EA1:"a",\u0201:"a",\u00E0:"a",\u1EA3:"a",\u0203:"a",\u0101:"a",\u0105:"a","\u1D8F":"a",\u1E9A:"a",\u00E5:"a",\u01FB:"a",\u1E01:"a","\u2C65":"a",\u00E3:"a","\uA733":"aa",\u00E6:"ae",\u01FD:"ae",\u01E3:"ae","\uA735":"ao","\uA737":"au","\uA739":"av","\uA73B":"av","\uA73D":"ay",\u1E03:"b",\u1E05:"b",\u0253:"b",\u1E07:"b","\u1D6C":"b","\u1D80":"b",\u0180:"b",\u0183:"b",\u0275:"o",\u0107:"c",\u010D:"c",\u00E7:"c",\u1E09:"c",\u0109:"c",\u0255:"c",\u010B:"c",\u0188:"c","\u023C":"c",\u010F:"d",\u1E11:"d",\u1E13:"d","\u0221":"d",\u1E0B:"d",\u1E0D:"d",\u0257:"d","\u1D91":"d",\u1E0F:"d","\u1D6D":"d","\u1D81":"d",\u0111:"d",\u0256:"d",\u018C:"d",\u0131:"i","\u0237":"j",\u025F:"j",\u0284:"j",\u01F3:"dz",\u01C6:"dz",\u00E9:"e",\u0115:"e",\u011B:"e",\u0229:"e",\u1E1D:"e",\u00EA:"e",\u1EBF:"e",\u1EC7:"e",\u1EC1:"e",\u1EC3:"e",\u1EC5:"e",\u1E19:"e",\u00EB:"e",\u0117:"e",\u1EB9:"e",\u0205:"e",\u00E8:"e",\u1EBB:"e",\u0207:"e",\u0113:"e",\u1E17:"e",\u1E15:"e","\u2C78":"e",\u0119:"e","\u1D92":"e","\u0247":"e",\u1EBD:"e",\u1E1B:"e","\uA76B":"et",\u1E1F:"f",\u0192:"f","\u1D6E":"f","\u1D82":"f",\u01F5:"g",\u011F:"g",\u01E7:"g",\u0123:"g",\u011D:"g",\u0121:"g",\u0260:"g",\u1E21:"g","\u1D83":"g",\u01E5:"g",\u1E2B:"h",\u021F:"h",\u1E29:"h",\u0125:"h","\u2C68":"h",\u1E27:"h",\u1E23:"h",\u1E25:"h",\u0266:"h",\u1E96:"h",\u0127:"h",\u0195:"hv",\u00ED:"i",\u012D:"i",\u01D0:"i",\u00EE:"i",\u00EF:"i",\u1E2F:"i",\u1ECB:"i",\u0209:"i",\u00EC:"i",\u1EC9:"i",\u020B:"i",\u012B:"i",\u012F:"i","\u1D96":"i",\u0268:"i",\u0129:"i",\u1E2D:"i","\uA77A":"d","\uA77C":"f","\u1D79":"g","\uA783":"r","\uA785":"s","\uA787":"t","\uA76D":"is",\u01F0:"j",\u0135:"j",\u029D:"j","\u0249":"j",\u1E31:"k",\u01E9:"k",\u0137:"k","\u2C6A":"k","\uA743":"k",\u1E33:"k",\u0199:"k",\u1E35:"k","\u1D84":"k","\uA741":"k","\uA745":"k",\u013A:"l",\u019A:"l",\u026C:"l",\u013E:"l",\u013C:"l",\u1E3D:"l","\u0234":"l",\u1E37:"l",\u1E39:"l","\u2C61":"l","\uA749":"l",\u1E3B:"l",\u0140:"l",\u026B:"l","\u1D85":"l",\u026D:"l",\u0142:"l",\u01C9:"lj",\u017F:"s","\u1E9C":"s",\u1E9B:"s","\u1E9D":"s",\u1E3F:"m",\u1E41:"m",\u1E43:"m",\u0271:"m","\u1D6F":"m","\u1D86":"m",\u0144:"n",\u0148:"n",\u0146:"n",\u1E4B:"n","\u0235":"n",\u1E45:"n",\u1E47:"n",\u01F9:"n",\u0272:"n",\u1E49:"n",\u019E:"n","\u1D70":"n","\u1D87":"n",\u0273:"n",\u00F1:"n",\u01CC:"nj",\u00F3:"o",\u014F:"o",\u01D2:"o",\u00F4:"o",\u1ED1:"o",\u1ED9:"o",\u1ED3:"o",\u1ED5:"o",\u1ED7:"o",\u00F6:"o",\u022B:"o",\u022F:"o",\u0231:"o",\u1ECD:"o",\u0151:"o",\u020D:"o",\u00F2:"o",\u1ECF:"o",\u01A1:"o",\u1EDB:"o",\u1EE3:"o",\u1EDD:"o",\u1EDF:"o",\u1EE1:"o",\u020F:"o","\uA74B":"o","\uA74D":"o","\u2C7A":"o",\u014D:"o",\u1E53:"o",\u1E51:"o",\u01EB:"o",\u01ED:"o",\u00F8:"o",\u01FF:"o",\u00F5:"o",\u1E4D:"o",\u1E4F:"o",\u022D:"o",\u01A3:"oi","\uA74F":"oo",\u025B:"e","\u1D93":"e",\u0254:"o","\u1D97":"o",\u0223:"ou",\u1E55:"p",\u1E57:"p","\uA753":"p",\u01A5:"p","\u1D71":"p","\u1D88":"p","\uA755":"p","\u1D7D":"p","\uA751":"p","\uA759":"q",\u02A0:"q","\u024B":"q","\uA757":"q",\u0155:"r",\u0159:"r",\u0157:"r",\u1E59:"r",\u1E5B:"r",\u1E5D:"r",\u0211:"r",\u027E:"r","\u1D73":"r",\u0213:"r",\u1E5F:"r",\u027C:"r","\u1D72":"r","\u1D89":"r","\u024D":"r",\u027D:"r","\u2184":"c","\uA73F":"c",\u0258:"e",\u027F:"r",\u015B:"s",\u1E65:"s",\u0161:"s",\u1E67:"s",\u015F:"s",\u015D:"s",\u0219:"s",\u1E61:"s",\u1E63:"s",\u1E69:"s",\u0282:"s","\u1D74":"s","\u1D8A":"s","\u023F":"s",\u0261:"g","\u1D11":"o","\u1D13":"o","\u1D1D":"u",\u0165:"t",\u0163:"t",\u1E71:"t",\u021B:"t","\u0236":"t",\u1E97:"t","\u2C66":"t",\u1E6B:"t",\u1E6D:"t",\u01AD:"t",\u1E6F:"t","\u1D75":"t",\u01AB:"t",\u0288:"t",\u0167:"t","\u1D7A":"th",\u0250:"a","\u1D02":"ae",\u01DD:"e","\u1D77":"g",\u0265:"h","\u02AE":"h","\u02AF":"h","\u1D09":"i",\u029E:"k","\uA781":"l",\u026F:"m",\u0270:"m","\u1D14":"oe",\u0279:"r",\u027B:"r",\u027A:"r","\u2C79":"r",\u0287:"t",\u028C:"v",\u028D:"w",\u028E:"y","\uA729":"tz",\u00FA:"u",\u016D:"u",\u01D4:"u",\u00FB:"u",\u1E77:"u",\u00FC:"u",\u01D8:"u",\u01DA:"u",\u01DC:"u",\u01D6:"u",\u1E73:"u",\u1EE5:"u",\u0171:"u",\u0215:"u",\u00F9:"u",\u1EE7:"u",\u01B0:"u",\u1EE9:"u",\u1EF1:"u",\u1EEB:"u",\u1EED:"u",\u1EEF:"u",\u0217:"u",\u016B:"u",\u1E7B:"u",\u0173:"u","\u1D99":"u",\u016F:"u",\u0169:"u",\u1E79:"u",\u1E75:"u","\u1D6B":"ue","\uA778":"um","\u2C74":"v","\uA75F":"v",\u1E7F:"v",\u028B:"v","\u1D8C":"v","\u2C71":"v",\u1E7D:"v","\uA761":"vy",\u1E83:"w",\u0175:"w",\u1E85:"w",\u1E87:"w",\u1E89:"w",\u1E81:"w","\u2C73":"w",\u1E98:"w",\u1E8D:"x",\u1E8B:"x","\u1D8D":"x",\u00FD:"y",\u0177:"y",\u00FF:"y",\u1E8F:"y",\u1EF5:"y",\u1EF3:"y",\u01B4:"y",\u1EF7:"y","\u1EFF":"y",\u0233:"y",\u1E99:"y","\u024F":"y",\u1EF9:"y",\u017A:"z",\u017E:"z",\u1E91:"z",\u0291:"z","\u2C6C":"z",\u017C:"z",\u1E93:"z",\u0225:"z",\u1E95:"z","\u1D76":"z","\u1D8E":"z",\u0290:"z",\u01B6:"z","\u0240":"z",\uFB00:"ff",\uFB03:"ffi",\uFB04:"ffl",\uFB01:"fi",\uFB02:"fl",\u0133:"ij",\u0153:"oe",\uFB06:"st","\u2090":"a","\u2091":"e","\u1D62":"i","\u2C7C":"j","\u2092":"o","\u1D63":"r","\u1D64":"u","\u1D65":"v","\u2093":"x"};var H=class{constructor(n,a=n,e=!1){this.item=n,this.value=a,this.header=e}isHeader(){return this.header}toString(){return this.value}};function Y(s){return s?s.replace(/[^A-Za-z0-9[\] ]/g,function(n){return Bt[n]||n}):""}function Ee(s,n=" ",a="",e){let t=[];if(!e)t=pt(s,n,a);else{let i=`([${e}]+)`,r=s.split(new RegExp(i,"g")),o=r[r.length-1];o>""&&(n&&a?t=pt(o,n,a):t.push(o))}return t}function pt(s,n,a){let e=[],t=`(?:[${a}])([^${a}]+)(?:[${a}])|([^${n}]+)`,i=s.split(new RegExp(t,"g")),r=i.length,o,c=new RegExp(`[${a}]+`,"g");for(let f=0;f<r;f+=1)o=i[f],o&&o.length&&o!==n&&e.push(o.replace(c,""));return e}function P(s,n){if(!n||typeof s!="object")return s.toString();if(n.endsWith("()")){let t=n.slice(0,n.length-2);return s[t]().toString()}let e=n.replace(/\[(\w+)\]/g,".$1").replace(/^\./,"").split(".");for(let t of e)t in s&&(s=s[t]);return s?s.toString():""}var mt="220ms cubic-bezier(0, 0, 0.2, 1)",Ht=je("typeaheadAnimation",[Oe("animated-down",G({height:"*",overflow:"hidden"})),de("* => animated-down",[G({height:0,overflow:"hidden"}),he(mt)]),Oe("animated-up",G({height:"*",overflow:"hidden"})),de("* => animated-up",[G({height:"*",overflow:"hidden"}),he(mt)]),de("* => unanimated",he("0s"))]),Nt=0,zt=(()=>{let n=class n{get typeaheadTemplateMethods(){return{selectMatch:this.selectMatch.bind(this),selectActive:this.selectActive.bind(this),isActive:this.isActive.bind(this)}}constructor(e,t,i,r){this.positionService=e,this.renderer=t,this.element=i,this.changeDetectorRef=r,this.activeChangeEvent=new v,this.isFocused=!1,this.positionServiceSubscription=new we,this.height=0,this.popupId=`ngb-typeahead-${Nt++}`,this._matches=[],this.renderer.setAttribute(this.element.nativeElement,"id",this.popupId),this.positionServiceSubscription.add(this.positionService.event$?.subscribe(()=>{if(this.isAnimated){this.animationState=this.isTopPosition?"animated-up":"animated-down",this.changeDetectorRef.detectChanges();return}this.animationState="unanimated",this.changeDetectorRef.detectChanges()}))}get active(){return this._active}set active(e){this._active=e,this.activeChanged()}get matches(){return this._matches}set matches(e){if(this.positionService.setOptions({modifiers:{flip:{enabled:this.adaptivePosition}},allowedPositions:["top","bottom"]}),this._matches=e,this.needScrollbar=this.typeaheadScrollable&&this.typeaheadOptionsInScrollableView<this.matches.length,this.typeaheadScrollable&&setTimeout(()=>{this.setScrollableMode()}),this.typeaheadIsFirstItemActive&&this._matches.length>0&&(this.setActive(this._matches[0]),this._active?.isHeader()&&this.nextActiveMatch()),this._active&&!this.typeaheadIsFirstItemActive){let t=this._matches.find(i=>i.value===this._active?.value);if(t){this.selectActive(t);return}this.active=void 0}}get isTopPosition(){return this.element.nativeElement.classList.contains("top")}get optionsListTemplate(){return this.parent?this.parent.optionsListTemplate:void 0}get isAnimated(){return this.parent?this.parent.isAnimated:!1}get adaptivePosition(){return this.parent?this.parent.adaptivePosition:!1}get typeaheadScrollable(){return this.parent?this.parent.typeaheadScrollable:!1}get typeaheadOptionsInScrollableView(){return this.parent?this.parent.typeaheadOptionsInScrollableView:5}get typeaheadIsFirstItemActive(){return this.parent?this.parent.typeaheadIsFirstItemActive:!0}get itemTemplate(){return this.parent?this.parent.typeaheadItemTemplate:void 0}get canSelectItemsOnBlur(){return!!this.parent?.selectItemOnBlur}selectActiveMatch(e){this._active&&this.parent?.typeaheadSelectFirstItem&&this.selectMatch(this._active),!this.parent?.typeaheadSelectFirstItem&&e&&this.selectMatch(this._active)}activeChanged(){if(!this._active)return;let e=this.matches.indexOf(this._active);this.activeChangeEvent.emit(`${this.popupId}-${e}`)}prevActiveMatch(){if(!this._active)return;let e=this.matches.indexOf(this._active);this.setActive(this.matches[e-1<0?this.matches.length-1:e-1]),this._active.isHeader()&&this.prevActiveMatch(),this.typeaheadScrollable&&this.scrollPrevious(e)}nextActiveMatch(){let e=this._active?this.matches.indexOf(this._active):-1;this.setActive(this.matches[e+1>this.matches.length-1?0:e+1]),this._active?.isHeader()&&this.nextActiveMatch(),this.typeaheadScrollable&&this.scrollNext(e)}selectActive(e){this.isFocused=!0,this.setActive(e)}highlight(e,t){let i=e.value,r=(this.parent&&this.parent.typeaheadLatinize?Y(i):i).toLowerCase(),o,c;if(typeof t=="object"){let f=t.length,me="\u2063",gt=17;for(let q=0;q<f;q+=1)o=r.indexOf(t[q]),c=t[q].length,o>=0&&c>0&&(i=`${i.substring(0,o)}<strong>${i.substring(o,o+c)}</strong>${i.substring(o+c)}`,r=`${r.substring(0,o)}${me.repeat(gt+c)}${r.substring(o+c)}`)}else t&&(o=r.indexOf(t),c=t.length,o>=0&&c>0&&(i=`${i.substring(0,o)}<strong>${i.substring(o,o+c)}</strong>${i.substring(o+c)}`));return i}focusLost(){this.isFocused=!1,this.canSelectItemsOnBlur||this.setActive(void 0)}isActive(e){return this.active===e}selectMatch(e,t){return t&&(t.stopPropagation(),t.preventDefault()),this.parent?.changeModel(e),setTimeout(()=>this.parent?.typeaheadOnSelect.emit(e),0),!1}setScrollableMode(){if(this.ulElement||(this.ulElement=this.element),this.liElements?.first){let e=Se.getStyles(this.ulElement.nativeElement),t=Se.getStyles(this.liElements.first.nativeElement),i=parseFloat((e["padding-bottom"]?e["padding-bottom"]:"").replace("px","")),r=parseFloat((e["padding-top"]?e["padding-top"]:"0").replace("px","")),o=parseFloat((t.height?t.height:"0").replace("px","")),c=this.typeaheadOptionsInScrollableView*o;this.guiHeight=`${c+r+i}px`}this.renderer.setStyle(this.element.nativeElement,"visibility","visible")}scrollPrevious(e){if(e===0){this.scrollToBottom();return}if(this.liElements&&this.ulElement){let t=this.liElements.toArray()[e-1];t&&!this.isScrolledIntoView(t.nativeElement)&&(this.ulElement.nativeElement.scrollTop=t.nativeElement.offsetTop)}}scrollNext(e){if(e+1>this.matches.length-1){this.scrollToTop();return}if(this.liElements&&this.ulElement){let t=this.liElements.toArray()[e+1];t&&!this.isScrolledIntoView(t.nativeElement)&&(this.ulElement.nativeElement.scrollTop=t.nativeElement.offsetTop-Number(this.ulElement.nativeElement.offsetHeight)+Number(t.nativeElement.offsetHeight))}}ngOnDestroy(){this.positionServiceSubscription.unsubscribe()}setActive(e){this._active=e;let t;this._active==null||this._active.isHeader()||(t=e),this.parent?.typeaheadOnPreview.emit(t)}isScrolledIntoView(e){if(!this.ulElement)return!1;let t=this.ulElement.nativeElement.scrollTop,i=t+Number(this.ulElement.nativeElement.offsetHeight),r=e.offsetTop;return r+e.offsetHeight<=i&&r>=t}scrollToBottom(){this.ulElement?.nativeElement&&(this.ulElement.nativeElement.scrollTop=this.ulElement.nativeElement.scrollHeight)}scrollToTop(){this.ulElement?.nativeElement&&(this.ulElement.nativeElement.scrollTop=0)}};n.\u0275fac=function(t){return new(t||n)(u(Q),u(D),u(F),u(K))},n.\u0275cmp=R({type:n,selectors:[["typeahead-container"]],viewQuery:function(t,i){if(t&1&&(z(It,5),z(At,5)),t&2){let r;j(r=$())&&(i.ulElement=r.first),j(r=$())&&(i.liElements=r)}},hostAttrs:[1,"dropdown","open","bottom","dropdown-menu",2,"position","absolute","display","block"],hostVars:7,hostBindings:function(t,i){t&1&&C("mouseleave",function(){return i.focusLost()})("blur",function(){return i.focusLost()}),t&2&&(k("role","listbox"),Re("height",i.needScrollbar?i.guiHeight:"auto")("visibility","inherit"),A("dropup",i.dropup))},outputs:{activeChangeEvent:"activeChange"},features:[xe([Q])],decls:5,vars:7,consts:[["bsItemTemplate",""],["bs4Template",""],["liElements",""],[3,"ngTemplateOutlet","ngTemplateOutletContext"],[3,"innerHtml"],["ngFor","",3,"ngForOf"],["class","dropdown-header",4,"ngIf"],[3,"ngIf"],[1,"dropdown-header"],["role","option",1,"dropdown-item",3,"click","mouseenter","id"]],template:function(t,i){if(t&1&&O(0,Pt,0,0,"ng-template",3)(1,Lt,1,1,"ng-template",null,0,W)(3,Vt,1,1,"ng-template",null,1,W),t&2){let r=B(2),o=B(4);d("ngTemplateOutlet",i.optionsListTemplate||o)("ngTemplateOutletContext",Te(2,Mt,i.matches,i.itemTemplate||r,i.query,i.typeaheadTemplateMethods))}},dependencies:[Ne,oe,le],styles:[".dropdown[_nghost-%COMP%]{z-index:1000}.dropdown-menu[_nghost-%COMP%], .dropdown-menu[_ngcontent-%COMP%]{overflow-y:auto;height:100px}"],data:{animation:[Ht]}});let s=n;return s})(),ut=(()=>{let n=class n{constructor(){this.adaptivePosition=!1,this.isAnimated=!1,this.hideResultsOnBlur=!0,this.cancelRequestOnFocusLost=!1,this.selectFirstItem=!0,this.isFirstItemActive=!0,this.minLength=1,this.selectItemOnBlur=!1}};n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=te({token:n,factory:n.\u0275fac,providedIn:"root"});let s=n;return s})(),ft=(()=>{let n=class n{constructor(e,t,i,r,o,c,f){this.changeDetection=i,this.element=r,this.ngControl=o,this.renderer=c,this.typeaheadMinLength=1,this.adaptivePosition=!1,this.isAnimated=!1,this.typeaheadWaitMs=0,this.typeaheadLatinize=!0,this.typeaheadSingleWords=!0,this.typeaheadWordDelimiters=" ",this.typeaheadMultipleSearchDelimiters=",",this.typeaheadPhraseDelimiters=`'"`,this.typeaheadScrollable=!1,this.typeaheadOptionsInScrollableView=5,this.typeaheadSelectFirstItem=!0,this.typeaheadIsFirstItemActive=!0,this.typeaheadLoading=new v,this.typeaheadNoResults=new v,this.typeaheadOnSelect=new v,this.typeaheadOnPreview=new v,this.typeaheadOnBlur=new v,this.dropup=!1,this.isOpen=!1,this.list="list",this.isActiveItemChanged=!1,this.isFocused=!1,this.cancelRequestOnFocusLost=!1,this.selectItemOnBlur=!1,this.keyUpEventEmitter=new v,this.placement="bottom left",this._matches=[],this._subscriptions=[],this._outsideClickListener=()=>{},this._typeahead=e.createLoader(r,f,c).provide({provide:ut,useValue:t}),Object.assign(this,{typeaheadHideResultsOnBlur:t.hideResultsOnBlur,cancelRequestOnFocusLost:t.cancelRequestOnFocusLost,typeaheadSelectFirstItem:t.selectFirstItem,typeaheadIsFirstItemActive:t.isFirstItemActive,typeaheadMinLength:t.minLength,adaptivePosition:t.adaptivePosition,isAnimated:t.isAnimated,selectItemOnBlur:t.selectItemOnBlur})}get matches(){return this._matches}ngOnInit(){this.typeaheadOptionsLimit=this.typeaheadOptionsLimit||20,this.typeaheadMinLength=this.typeaheadMinLength===void 0?1:this.typeaheadMinLength,this.typeaheadAsync===void 0&&!J(this.typeahead)&&(this.typeaheadAsync=!1),J(this.typeahead)&&(this.typeaheadAsync=!0),this.typeaheadAsync?this.asyncActions():this.syncActions(),this.checkDelimitersConflict()}onInput(e){let t=e.target.value!==void 0?e.target.value:e.target.textContent!==void 0?e.target.textContent:e.target.innerText;t!=null&&t.trim().length>=this.typeaheadMinLength?(this.typeaheadLoading.emit(!0),this.keyUpEventEmitter.emit(e.target.value)):(this.typeaheadLoading.emit(!1),this.typeaheadNoResults.emit(!1),this.hide())}onChange(e){if(this._container){if(e.keyCode===27||e.key==="Escape"){this.hide();return}if(e.keyCode===38||e.key==="ArrowUp"){this.isActiveItemChanged=!0,this._container.prevActiveMatch();return}if(e.keyCode===40||e.key==="ArrowDown"){this.isActiveItemChanged=!0,this._container.nextActiveMatch();return}if(e.keyCode===13||e.key==="Enter"){this._container.selectActiveMatch();return}}}onFocus(){this.isFocused=!0,setTimeout(()=>{this.typeaheadMinLength===0&&(this.typeaheadLoading.emit(!0),this.keyUpEventEmitter.emit(this.element.nativeElement.value||""))},0)}onBlur(){this.isFocused=!1,this._container&&!this._container.isFocused&&this.typeaheadOnBlur.emit(this._container.active),!this.container&&this._matches?.length===0&&this.typeaheadOnBlur.emit(new H(this.element.nativeElement.value,this.element.nativeElement.value,!1))}onKeydown(e){if(this._container&&((e.keyCode===9||e.key==="Tab")&&this.onBlur(),e.keyCode===9||e.key==="Tab"||e.keyCode===13||e.key==="Enter")){if(e.preventDefault(),this.typeaheadSelectFirstItem){this._container.selectActiveMatch();return}this.typeaheadSelectFirstItem||(this._container.selectActiveMatch(this.isActiveItemChanged),this.isActiveItemChanged=!1,this.hide())}}changeModel(e){if(!e)return;let t;if(this.typeaheadMultipleSearch&&this._allEnteredValue){let i=this._allEnteredValue.split(new RegExp(`([${this.typeaheadMultipleSearchDelimiters}]+)`));this._allEnteredValue=i.slice(0,i.length-1).concat(e.value).join(""),t=this._allEnteredValue}else t=e.value;this.ngControl.viewToModelUpdate(t),this.ngControl.control?.setValue(t),this.changeDetection.markForCheck(),this.hide()}show(){if(this._typeahead.attach(zt).to(this.container).position({attachment:`${this.dropup?"top":"bottom"} left`}).show({typeaheadRef:this,placement:this.placement,animation:!1,dropup:this.dropup}),this._outsideClickListener=this.renderer.listen("document","click",t=>{this.typeaheadMinLength===0&&this.element.nativeElement.contains(t.target)||!this.typeaheadHideResultsOnBlur||this.element.nativeElement.contains(t.target)||this.onOutsideClick()}),!this._typeahead.instance||!this.ngControl.control)return;this._container=this._typeahead.instance,this._container.parent=this;let e=(this.typeaheadLatinize?Y(this.ngControl.control.value):this.ngControl.control.value).toString().toLowerCase();this._container.query=this.tokenizeQuery(e),this._container.matches=this._matches,this.element.nativeElement.focus(),this._container.activeChangeEvent.subscribe(t=>{this.activeDescendant=t,this.changeDetection.markForCheck()}),this.isOpen=!0}hide(){this._typeahead.isShown&&(this._typeahead.hide(),this._outsideClickListener(),this._container=void 0,this.isOpen=!1,this.changeDetection.markForCheck()),this.typeaheadOnPreview.emit()}onOutsideClick(){this._container&&!this._container.isFocused&&this.hide()}ngOnDestroy(){for(let e of this._subscriptions)e.unsubscribe();this._typeahead.dispose()}asyncActions(){this._subscriptions.push(this.keyUpEventEmitter.pipe(fe(this.typeaheadWaitMs),ee(e=>this._allEnteredValue=e),Pe(()=>this.typeahead?this.typeahead:ue)).subscribe(e=>{this.finalizeAsyncCall(e)}))}syncActions(){this._subscriptions.push(this.keyUpEventEmitter.pipe(fe(this.typeaheadWaitMs),X(e=>{this._allEnteredValue=e;let t=this.normalizeQuery(e);return this.typeahead?(J(this.typeahead)?this.typeahead:Ae(this.typeahead)).pipe(Me(r=>!!r&&this.testMatch(this.normalizeOption(r),t)),ke()):ue})).subscribe(e=>{this.finalizeAsyncCall(e)}))}normalizeOption(e){let t=P(e,this.typeaheadOptionField);return(this.typeaheadLatinize?Y(t):t).toLowerCase()}tokenizeQuery(e){let t=e;return this.typeaheadMultipleSearch&&this.typeaheadSingleWords?this.haveCommonCharacters(`${this.typeaheadPhraseDelimiters}${this.typeaheadWordDelimiters}`,this.typeaheadMultipleSearchDelimiters)||(t=Ee(t,this.typeaheadWordDelimiters,this.typeaheadPhraseDelimiters,this.typeaheadMultipleSearchDelimiters)):this.typeaheadSingleWords?t=Ee(t,this.typeaheadWordDelimiters,this.typeaheadPhraseDelimiters):t=Ee(t,void 0,void 0,this.typeaheadMultipleSearchDelimiters),t}normalizeQuery(e){let t=(this.typeaheadLatinize?Y(e):e).toString().toLowerCase();return t=this.tokenizeQuery(t),t}testMatch(e,t){let i;if(typeof t=="object"){i=t.length;for(let r=0;r<i;r+=1)if(t[r].length>0&&e.indexOf(t[r])<0)return!1;return!0}return e.indexOf(t)>=0}finalizeAsyncCall(e){if(this.prepareMatches(e||[]),this.typeaheadLoading.emit(!1),this.typeaheadNoResults.emit(!this.hasMatches()),!this.hasMatches()){this.hide();return}if(!(!this.isFocused&&this.cancelRequestOnFocusLost))if(this._container&&this.ngControl.control){let i=((this.typeaheadLatinize?Y(this.ngControl.control.value):this.ngControl.control.value)||"").toString().toLowerCase();this._container.query=this.tokenizeQuery(i),this._container.matches=this._matches}else this.show()}prepareMatches(e){let t=e.slice(0,this.typeaheadOptionsLimit),i=this.typeaheadOrderBy?this.orderMatches(t):t;if(this.typeaheadGroupField){let r=[];i.map(c=>P(c,this.typeaheadGroupField)).filter((c,f,me)=>me.indexOf(c)===f).forEach(c=>{r.push(new H(c,c,!0)),r=r.concat(i.filter(f=>P(f,this.typeaheadGroupField)===c).map(f=>new H(f,P(f,this.typeaheadOptionField))))}),this._matches=r}else this._matches=i.map(r=>new H(r,P(r,this.typeaheadOptionField)))}orderMatches(e){if(!e.length)return e;if(this.typeaheadOrderBy!==null&&this.typeaheadOrderBy!==void 0&&typeof this.typeaheadOrderBy=="object"&&Object.keys(this.typeaheadOrderBy).length===0)return console.error("Field and direction properties for typeaheadOrderBy have to be set according to documentation!"),e;let{field:t,direction:i}=this.typeaheadOrderBy||{};return!i||!(i==="asc"||i==="desc")?(console.error('typeaheadOrderBy direction has to equal "asc" or "desc". Please follow the documentation.'),e):typeof e[0]=="string"?i==="asc"?e.sort():e.sort().reverse():!t||typeof t!="string"?(console.error("typeaheadOrderBy field has to set according to the documentation."),e):e.sort((r,o)=>{let c=P(r,t),f=P(o,t);return c<f?i==="asc"?-1:1:c>f?i==="asc"?1:-1:0})}hasMatches(){return this._matches.length>0}checkDelimitersConflict(){if(this.typeaheadMultipleSearch&&this.typeaheadSingleWords&&this.haveCommonCharacters(`${this.typeaheadPhraseDelimiters}${this.typeaheadWordDelimiters}`,this.typeaheadMultipleSearchDelimiters))throw new Error(`Delimiters used in typeaheadMultipleSearchDelimiters must be different
1
+ import{q as ct,r as ht}from"./chunk-VQQKMY2C.js";import{I as it,Jb as at,Lb as rt,Nb as ot,Rb as lt,Za as st,c as je,d as he,f as G,g as Oe,h as de,l as Se,n as Q,o as pe,r as Je,s as Xe}from"./chunk-XDZGW64M.js";import{$ as ee,$a as R,$c as $e,Ab as w,Ac as He,Cc as oe,Db as C,Dc as le,Dd as Ye,E as Me,Ed as qe,Fb as l,Ga as N,Gb as Fe,Gc as Ne,H as ke,Ha as ye,Hb as De,J as fe,Jb as z,Jc as ze,Kb as j,Kc as ce,Lb as $,Mb as B,Na as h,Nb as Re,Ob as A,Pa as v,Pb as re,Qa as ne,Qb as b,Rb as T,Sa as Le,Ub as ve,Va as D,Vb as Ce,Wa as u,Wb as be,Xa as se,Yb as Ue,Z as Pe,_b as xe,a as we,ab as ae,ac as Ve,bb as U,c as Ie,cb as V,cd as We,da as te,dc as Te,dd as Ke,ea as ie,eb as O,ec as I,eg as nt,fc as Be,gc as M,ia as L,ic as W,id as Ge,jb as k,k as ue,kb as S,lb as E,lf as et,na as y,o as Ae,oa as _,ob as _e,pb as ge,pf as tt,qb as d,r as J,rb as p,sb as m,tb as g,tc as K,wd as Qe,x as X,yd as Ze,za as F}from"./chunk-DIT6W7VM.js";import{n as x}from"./chunk-DM4NXKEP.js";var hi=(()=>{let n=class n{transform(e,t="L HH:mm:ss"){return e?x(e).format(t):""}};n.\u0275fac=function(t){return new(t||n)},n.\u0275pipe=V({name:"amDateFormat",type:n,pure:!0});let s=n;return s})();var vt=["*"],Ct=s=>["nav-item",s];function bt(s,n){if(s&1){let a=w();p(0,"span",7),C("click",function(t){y(a);let i=l().$implicit,r=l();return t.preventDefault(),_(r.removeTab(i))}),b(1," \u274C"),m()}}function xt(s,n){if(s&1){let a=w();p(0,"li",3),C("keydown",function(t){let i=y(a).index,r=l();return _(r.keyNavActions(t,i))}),p(1,"a",4),C("click",function(){let t=y(a).$implicit;return _(t.active=!0)}),p(2,"span",5),b(3),m(),O(4,bt,2,0,"span",6),m()()}if(s&2){let a=n.$implicit;A("active",a.active)("disabled",a.disabled),d("ngClass",Ve(15,Ct,a.customClass||"")),h(),A("active",a.active)("disabled",a.disabled),k("aria-controls",a.id?a.id:"")("aria-selected",!!a.active)("id",a.id?a.id+"-link":""),h(),d("ngTransclude",a.headingRef),h(),T(a.heading),h(),d("ngIf",a.removable)}}var Tt=(()=>{let n=class n{set ngTransclude(e){this._ngTransclude=e,e&&this.viewRef.createEmbeddedView(e)}get ngTransclude(){return this._ngTransclude}constructor(e){this.viewRef=e}};n.\u0275fac=function(t){return new(t||n)(u(se))},n.\u0275dir=U({type:n,selectors:[["","ngTransclude",""]],inputs:{ngTransclude:"ngTransclude"}});let s=n;return s})(),Ot=(()=>{let n=class n{constructor(){this.type="tabs",this.isKeysAllowed=!0,this.ariaLabel="Tabs"}};n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=te({token:n,factory:n.\u0275fac,providedIn:"root"});let s=n;return s})(),St=(()=>{let n=class n{get vertical(){return this._vertical}set vertical(e){this._vertical=e,this.setClassMap()}get justified(){return this._justified}set justified(e){this._justified=e,this.setClassMap()}get type(){return this._type}set type(e){this._type=e,this.setClassMap()}get isKeysAllowed(){return this._isKeysAllowed}set isKeysAllowed(e){this._isKeysAllowed=e}constructor(e,t,i){this.renderer=t,this.elementRef=i,this.clazz=!0,this.tabs=[],this.classMap={},this.ariaLabel="Tabs",this.isDestroyed=!1,this._vertical=!1,this._justified=!1,this._type="tabs",this._isKeysAllowed=!0,this.defaultActivationScheduled=!1,Object.assign(this,e)}ngOnDestroy(){this.isDestroyed=!0}addTab(e){if(e.tabOrder!==void 0?this.insertTabByOrder(e):this.tabs.push(e),e.active){e.active=!0;return}this.defaultActivationScheduled||(this.defaultActivationScheduled=!0,Promise.resolve().then(()=>{if(this.defaultActivationScheduled=!1,!this.tabs.length||this.tabs.some(i=>!!i.active))return;let t=this.tabs.find(i=>!i.disabled);t&&(t.active=!0)}))}insertTabByOrder(e){let t=this.tabs.length;for(let i=0;i<this.tabs.length;i++){let r=this.tabs[i];if(r.tabOrder!==void 0&&e.tabOrder!==void 0&&e.tabOrder<r.tabOrder){t=i;break}if(r.tabOrder===void 0){t=i;break}}this.tabs.splice(t,0,e)}removeTab(e,t={reselect:!0,emit:!0}){let i=this.tabs.indexOf(e);if(!(i===-1||this.isDestroyed)){if(t.reselect&&e.active&&this.hasAvailableTabs(i)){let r=this.getClosestTabIndex(i);this.tabs[r].active=!0}t.emit&&e.removed.emit(e),this.tabs.splice(i,1),e.elementRef.nativeElement.parentNode&&this.renderer.removeChild(e.elementRef.nativeElement.parentNode,e.elementRef.nativeElement)}}keyNavActions(e,t){if(!this.isKeysAllowed)return;let i=Array.from(this.elementRef.nativeElement.querySelectorAll(".nav-link"));if(e.keyCode===13||e.key==="Enter"||e.keyCode===32||e.key==="Space"){e.preventDefault(),i[t%i.length].click();return}if(e.keyCode===39||e.key==="RightArrow"){let r,o=1;do r=i[(t+o)%i.length],o++;while(r.classList.contains("disabled"));r.focus();return}if(e.keyCode===37||e.key==="LeftArrow"){let r,o=1,c=t;do c-o<0?(c=i.length-1,r=i[c],o=0):r=i[c-o],o++;while(r.classList.contains("disabled"));r.focus();return}if(e.keyCode===36||e.key==="Home"){e.preventDefault();let r,o=0;do r=i[o%i.length],o++;while(r.classList.contains("disabled"));r.focus();return}if(e.keyCode===35||e.key==="End"){e.preventDefault();let r,o=1,c=t;do c-o<0?(c=i.length-1,r=i[c],o=0):r=i[c-o],o++;while(r.classList.contains("disabled"));r.focus();return}if((e.keyCode===46||e.key==="Delete")&&this.tabs[t].removable){if(this.removeTab(this.tabs[t]),i[t+1]){i[(t+1)%i.length].focus();return}i[i.length-1]&&i[0].focus()}}getClosestTabIndex(e){let t=this.tabs.length;if(!t)return-1;for(let i=1;i<=t;i+=1){let r=e-i,o=e+i;if(this.tabs[r]&&!this.tabs[r].disabled)return r;if(this.tabs[o]&&!this.tabs[o].disabled)return o}return-1}hasAvailableTabs(e){let t=this.tabs.length;if(!t)return!1;for(let i=0;i<t;i+=1)if(!this.tabs[i].disabled&&i!==e)return!0;return!1}setClassMap(){this.classMap={"nav-stacked":this.vertical,"flex-column":this.vertical,"nav-justified":this.justified,[`nav-${this.type}`]:!0}}};n.\u0275fac=function(t){return new(t||n)(u(Ot),u(D),u(F))},n.\u0275cmp=R({type:n,selectors:[["tabset"]],hostVars:2,hostBindings:function(t,i){t&2&&A("tab-container",i.clazz)},inputs:{vertical:"vertical",justified:"justified",type:"type"},ngContentSelectors:vt,decls:4,vars:3,consts:[["role","tablist",1,"nav",3,"click","ngClass"],[3,"ngClass","active","disabled","keydown",4,"ngFor","ngForOf"],[1,"tab-content"],[3,"keydown","ngClass"],["href","javascript:void(0);","role","tab",1,"nav-link",3,"click"],[3,"ngTransclude"],["class","bs-remove-tab",3,"click",4,"ngIf"],[1,"bs-remove-tab",3,"click"]],template:function(t,i){t&1&&(Fe(),p(0,"ul",0),C("click",function(o){return o.preventDefault()}),O(1,xt,5,17,"li",1),m(),p(2,"div",2),De(3),m()),t&2&&(d("ngClass",i.classMap),k("aria-label",i.ariaLabel),h(),d("ngForOf",i.tabs))},dependencies:[He,oe,Tt,le],styles:["[_nghost-%COMP%] .nav-tabs[_ngcontent-%COMP%] .nav-item.disabled[_ngcontent-%COMP%] a.disabled[_ngcontent-%COMP%]{cursor:default}"]});let s=n;return s})(),Et=(()=>{let n=class n{get customClass(){return this._customClass}set customClass(e){this.customClass&&this.customClass.split(" ").forEach(t=>{this.renderer.removeClass(this.elementRef.nativeElement,t)}),this._customClass=e?e.trim():"",this.customClass&&this.customClass.split(" ").forEach(t=>{this.renderer.addClass(this.elementRef.nativeElement,t)})}get active(){return this._active}set active(e){if(this._active!==e){if(this.disabled&&e||!e){this._active&&!e&&(this.deselect.emit(this),this._active=e);return}this._active=e,this.selectTab.emit(this),this.tabset.tabs.forEach(t=>{t!==this&&(t.active=!1)})}}get ariaLabelledby(){return this.id?`${this.id}-link`:""}constructor(e,t,i){this.elementRef=t,this.renderer=i,this.disabled=!1,this.removable=!1,this.selectTab=new v,this.deselect=new v,this.removed=new v,this.addClass=!0,this.role="tabpanel",this._active=!1,this._customClass="",this.tabset=e}ngOnInit(){this.removable=!!this.removable,this.tabset.addTab(this)}ngOnDestroy(){this.tabset.removeTab(this,{reselect:!1,emit:!1})}};n.\u0275fac=function(t){return new(t||n)(u(St),u(F),u(D))},n.\u0275dir=U({type:n,selectors:[["tab"],["","tab",""]],hostVars:7,hostBindings:function(t,i){t&2&&(k("id",i.id)("role",i.role)("aria-labelledby",i.ariaLabelledby),A("active",i.active)("tab-pane",i.addClass))},inputs:{heading:"heading",id:"id",disabled:"disabled",removable:"removable",tabOrder:"tabOrder",customClass:"customClass",active:"active"},outputs:{selectTab:"selectTab",deselect:"deselect",removed:"removed"},exportAs:["tab"]});let s=n;return s})(),bi=(()=>{let n=class n{constructor(e,t){t.headingRef=e}};n.\u0275fac=function(t){return new(t||n)(u(Le),u(Et))},n.\u0275dir=U({type:n,selectors:[["","tabHeading",""]]});let s=n;return s})(),xi=(()=>{let n=class n{static forRoot(){return{ngModule:n,providers:[]}}};n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=ae({type:n}),n.\u0275inj=ie({imports:[ce]});let s=n;return s})();var dt=(()=>{let n=class n{constructor(){this.cdRef=L(K),this.ngZone=L(ne)}format(e){return e.from(x(),this.lastOmitSuffix)}transform(e,t,i){return this.hasChanged(e,t)?(this.lastTime=this.getTime(e),this.lastValue=e,this.lastOmitSuffix=t,this.lastLocale=this.getLocale(e),this.formatFn=i||this.format.bind(this),this.removeTimer(),this.createTimer(),this.lastText=this.formatFn(x(e))):this.createTimer(),this.lastText}ngOnDestroy(){this.removeTimer()}createTimer(){if(this.currentTimer)return;let e=x(this.lastValue),t=this.getSecondsUntilUpdate(e)*1e3;this.currentTimer=this.ngZone.runOutsideAngular(()=>typeof window<"u"?window.setTimeout(()=>{this.lastText=this.formatFn(x(this.lastValue)),this.currentTimer=null,this.ngZone.run(()=>this.cdRef.markForCheck())},t):null)}removeTimer(){this.currentTimer&&(window.clearTimeout(this.currentTimer),this.currentTimer=null)}getSecondsUntilUpdate(e){let t=Math.abs(x().diff(e,"minute"));return t<1?1:t<60?30:t<180?300:3600}hasChanged(e,t){return this.getTime(e)!==this.lastTime||this.getLocale(e)!==this.lastLocale||t!==this.lastOmitSuffix}getTime(e){return e instanceof Date?e.getTime():x.isDayjs(e)?e.valueOf():x(e).valueOf()}getLocale(e){return x.isDayjs(e)?e.locale():x.locale()}};n.\u0275fac=function(t){return new(t||n)},n.\u0275pipe=V({name:"amTimeAgo",type:n,pure:!1});let s=n;return s})();var It=["ulElement"],At=["liElements"],Mt=(s,n,a,e)=>({matches:s,itemTemplate:n,query:a,$implicit:e}),kt=(s,n,a,e)=>({item:s,index:n,match:a,query:e});function Pt(s,n){}function Lt(s,n){if(s&1&&g(0,"span",4),s&2){let a=n.match,e=n.query,t=l();d("innerHtml",t.highlight(a,e),N)}}function Ft(s,n){if(s&1&&(p(0,"h6",8),b(1),m()),s&2){let a=l().$implicit;h(),T(a)}}function Dt(s,n){}function Rt(s,n){if(s&1){let a=w();p(0,"button",9,2),C("click",function(t){y(a);let i=l().$implicit,r=l(2);return _(r.selectMatch(i,t))})("mouseenter",function(){y(a);let t=l().$implicit,i=l(2);return _(i.selectActive(t))}),O(2,Dt,0,0,"ng-template",3),m()}if(s&2){let a=l(),e=a.$implicit,t=a.index,i=l(2),r=B(2);A("active",i.isActive(e)),d("id",i.popupId+"-"+t)("@typeaheadAnimation",i.animationState),h(2),d("ngTemplateOutlet",i.itemTemplate||r)("ngTemplateOutletContext",Te(6,kt,e.item,t,e,i.query))}}function Ut(s,n){if(s&1&&O(0,Ft,2,1,"h6",6)(1,Rt,3,11,"ng-template",7),s&2){let a=n.$implicit;d("ngIf",a.isHeader()),h(),d("ngIf",!a.isHeader())}}function Vt(s,n){if(s&1&&O(0,Ut,2,2,"ng-template",5),s&2){let a=l();d("ngForOf",a.matches)}}var Bt={\u00C1:"A",\u0102:"A",\u1EAE:"A",\u1EB6:"A",\u1EB0:"A",\u1EB2:"A",\u1EB4:"A",\u01CD:"A",\u00C2:"A",\u1EA4:"A",\u1EAC:"A",\u1EA6:"A",\u1EA8:"A",\u1EAA:"A",\u00C4:"A",\u01DE:"A",\u0226:"A",\u01E0:"A",\u1EA0:"A",\u0200:"A",\u00C0:"A",\u1EA2:"A",\u0202:"A",\u0100:"A",\u0104:"A",\u00C5:"A",\u01FA:"A",\u1E00:"A","\u023A":"A",\u00C3:"A","\uA732":"AA",\u00C6:"AE",\u01FC:"AE",\u01E2:"AE","\uA734":"AO","\uA736":"AU","\uA738":"AV","\uA73A":"AV","\uA73C":"AY",\u1E02:"B",\u1E04:"B",\u0181:"B",\u1E06:"B","\u0243":"B",\u0182:"B",\u0106:"C",\u010C:"C",\u00C7:"C",\u1E08:"C",\u0108:"C",\u010A:"C",\u0187:"C","\u023B":"C",\u010E:"D",\u1E10:"D",\u1E12:"D",\u1E0A:"D",\u1E0C:"D",\u018A:"D",\u1E0E:"D",\u01F2:"D",\u01C5:"D",\u0110:"D",\u018B:"D",\u01F1:"DZ",\u01C4:"DZ",\u00C9:"E",\u0114:"E",\u011A:"E",\u0228:"E",\u1E1C:"E",\u00CA:"E",\u1EBE:"E",\u1EC6:"E",\u1EC0:"E",\u1EC2:"E",\u1EC4:"E",\u1E18:"E",\u00CB:"E",\u0116:"E",\u1EB8:"E",\u0204:"E",\u00C8:"E",\u1EBA:"E",\u0206:"E",\u0112:"E",\u1E16:"E",\u1E14:"E",\u0118:"E","\u0246":"E",\u1EBC:"E",\u1E1A:"E","\uA76A":"ET",\u1E1E:"F",\u0191:"F",\u01F4:"G",\u011E:"G",\u01E6:"G",\u0122:"G",\u011C:"G",\u0120:"G",\u0193:"G",\u1E20:"G",\u01E4:"G",\u1E2A:"H",\u021E:"H",\u1E28:"H",\u0124:"H","\u2C67":"H",\u1E26:"H",\u1E22:"H",\u1E24:"H",\u0126:"H",\u00CD:"I",\u012C:"I",\u01CF:"I",\u00CE:"I",\u00CF:"I",\u1E2E:"I",\u0130:"I",\u1ECA:"I",\u0208:"I",\u00CC:"I",\u1EC8:"I",\u020A:"I",\u012A:"I",\u012E:"I",\u0197:"I",\u0128:"I",\u1E2C:"I","\uA779":"D","\uA77B":"F","\uA77D":"G","\uA782":"R","\uA784":"S","\uA786":"T","\uA76C":"IS",\u0134:"J","\u0248":"J",\u1E30:"K",\u01E8:"K",\u0136:"K","\u2C69":"K","\uA742":"K",\u1E32:"K",\u0198:"K",\u1E34:"K","\uA740":"K","\uA744":"K",\u0139:"L","\u023D":"L",\u013D:"L",\u013B:"L",\u1E3C:"L",\u1E36:"L",\u1E38:"L","\u2C60":"L","\uA748":"L",\u1E3A:"L",\u013F:"L","\u2C62":"L",\u01C8:"L",\u0141:"L",\u01C7:"LJ",\u1E3E:"M",\u1E40:"M",\u1E42:"M","\u2C6E":"M",\u0143:"N",\u0147:"N",\u0145:"N",\u1E4A:"N",\u1E44:"N",\u1E46:"N",\u01F8:"N",\u019D:"N",\u1E48:"N","\u0220":"N",\u01CB:"N",\u00D1:"N",\u01CA:"NJ",\u00D3:"O",\u014E:"O",\u01D1:"O",\u00D4:"O",\u1ED0:"O",\u1ED8:"O",\u1ED2:"O",\u1ED4:"O",\u1ED6:"O",\u00D6:"O",\u022A:"O",\u022E:"O",\u0230:"O",\u1ECC:"O",\u0150:"O",\u020C:"O",\u00D2:"O",\u1ECE:"O",\u01A0:"O",\u1EDA:"O",\u1EE2:"O",\u1EDC:"O",\u1EDE:"O",\u1EE0:"O",\u020E:"O","\uA74A":"O","\uA74C":"O",\u014C:"O",\u1E52:"O",\u1E50:"O",\u019F:"O",\u01EA:"O",\u01EC:"O",\u00D8:"O",\u01FE:"O",\u00D5:"O",\u1E4C:"O",\u1E4E:"O",\u022C:"O",\u01A2:"OI","\uA74E":"OO",\u0190:"E",\u0186:"O",\u0222:"OU",\u1E54:"P",\u1E56:"P","\uA752":"P",\u01A4:"P","\uA754":"P","\u2C63":"P","\uA750":"P","\uA758":"Q","\uA756":"Q",\u0154:"R",\u0158:"R",\u0156:"R",\u1E58:"R",\u1E5A:"R",\u1E5C:"R",\u0210:"R",\u0212:"R",\u1E5E:"R","\u024C":"R","\u2C64":"R","\uA73E":"C",\u018E:"E",\u015A:"S",\u1E64:"S",\u0160:"S",\u1E66:"S",\u015E:"S",\u015C:"S",\u0218:"S",\u1E60:"S",\u1E62:"S",\u1E68:"S",\u0164:"T",\u0162:"T",\u1E70:"T",\u021A:"T","\u023E":"T",\u1E6A:"T",\u1E6C:"T",\u01AC:"T",\u1E6E:"T",\u01AE:"T",\u0166:"T","\u2C6F":"A","\uA780":"L",\u019C:"M","\u0245":"V","\uA728":"TZ",\u00DA:"U",\u016C:"U",\u01D3:"U",\u00DB:"U",\u1E76:"U",\u00DC:"U",\u01D7:"U",\u01D9:"U",\u01DB:"U",\u01D5:"U",\u1E72:"U",\u1EE4:"U",\u0170:"U",\u0214:"U",\u00D9:"U",\u1EE6:"U",\u01AF:"U",\u1EE8:"U",\u1EF0:"U",\u1EEA:"U",\u1EEC:"U",\u1EEE:"U",\u0216:"U",\u016A:"U",\u1E7A:"U",\u0172:"U",\u016E:"U",\u0168:"U",\u1E78:"U",\u1E74:"U","\uA75E":"V",\u1E7E:"V",\u01B2:"V",\u1E7C:"V","\uA760":"VY",\u1E82:"W",\u0174:"W",\u1E84:"W",\u1E86:"W",\u1E88:"W",\u1E80:"W","\u2C72":"W",\u1E8C:"X",\u1E8A:"X",\u00DD:"Y",\u0176:"Y",\u0178:"Y",\u1E8E:"Y",\u1EF4:"Y",\u1EF2:"Y",\u01B3:"Y",\u1EF6:"Y","\u1EFE":"Y",\u0232:"Y","\u024E":"Y",\u1EF8:"Y",\u0179:"Z",\u017D:"Z",\u1E90:"Z","\u2C6B":"Z",\u017B:"Z",\u1E92:"Z",\u0224:"Z",\u1E94:"Z",\u01B5:"Z",\u0132:"IJ",\u0152:"OE","\u1D00":"A","\u1D01":"AE",\u0299:"B","\u1D03":"B","\u1D04":"C","\u1D05":"D","\u1D07":"E","\uA730":"F",\u0262:"G",\u029B:"G",\u029C:"H",\u026A:"I",\u0281:"R","\u1D0A":"J","\u1D0B":"K",\u029F:"L","\u1D0C":"L","\u1D0D":"M",\u0274:"N","\u1D0F":"O",\u0276:"OE","\u1D10":"O","\u1D15":"OU","\u1D18":"P",\u0280:"R","\u1D0E":"N","\u1D19":"R","\uA731":"S","\u1D1B":"T","\u2C7B":"E","\u1D1A":"R","\u1D1C":"U","\u1D20":"V","\u1D21":"W",\u028F:"Y","\u1D22":"Z",\u00E1:"a",\u0103:"a",\u1EAF:"a",\u1EB7:"a",\u1EB1:"a",\u1EB3:"a",\u1EB5:"a",\u01CE:"a",\u00E2:"a",\u1EA5:"a",\u1EAD:"a",\u1EA7:"a",\u1EA9:"a",\u1EAB:"a",\u00E4:"a",\u01DF:"a",\u0227:"a",\u01E1:"a",\u1EA1:"a",\u0201:"a",\u00E0:"a",\u1EA3:"a",\u0203:"a",\u0101:"a",\u0105:"a","\u1D8F":"a",\u1E9A:"a",\u00E5:"a",\u01FB:"a",\u1E01:"a","\u2C65":"a",\u00E3:"a","\uA733":"aa",\u00E6:"ae",\u01FD:"ae",\u01E3:"ae","\uA735":"ao","\uA737":"au","\uA739":"av","\uA73B":"av","\uA73D":"ay",\u1E03:"b",\u1E05:"b",\u0253:"b",\u1E07:"b","\u1D6C":"b","\u1D80":"b",\u0180:"b",\u0183:"b",\u0275:"o",\u0107:"c",\u010D:"c",\u00E7:"c",\u1E09:"c",\u0109:"c",\u0255:"c",\u010B:"c",\u0188:"c","\u023C":"c",\u010F:"d",\u1E11:"d",\u1E13:"d","\u0221":"d",\u1E0B:"d",\u1E0D:"d",\u0257:"d","\u1D91":"d",\u1E0F:"d","\u1D6D":"d","\u1D81":"d",\u0111:"d",\u0256:"d",\u018C:"d",\u0131:"i","\u0237":"j",\u025F:"j",\u0284:"j",\u01F3:"dz",\u01C6:"dz",\u00E9:"e",\u0115:"e",\u011B:"e",\u0229:"e",\u1E1D:"e",\u00EA:"e",\u1EBF:"e",\u1EC7:"e",\u1EC1:"e",\u1EC3:"e",\u1EC5:"e",\u1E19:"e",\u00EB:"e",\u0117:"e",\u1EB9:"e",\u0205:"e",\u00E8:"e",\u1EBB:"e",\u0207:"e",\u0113:"e",\u1E17:"e",\u1E15:"e","\u2C78":"e",\u0119:"e","\u1D92":"e","\u0247":"e",\u1EBD:"e",\u1E1B:"e","\uA76B":"et",\u1E1F:"f",\u0192:"f","\u1D6E":"f","\u1D82":"f",\u01F5:"g",\u011F:"g",\u01E7:"g",\u0123:"g",\u011D:"g",\u0121:"g",\u0260:"g",\u1E21:"g","\u1D83":"g",\u01E5:"g",\u1E2B:"h",\u021F:"h",\u1E29:"h",\u0125:"h","\u2C68":"h",\u1E27:"h",\u1E23:"h",\u1E25:"h",\u0266:"h",\u1E96:"h",\u0127:"h",\u0195:"hv",\u00ED:"i",\u012D:"i",\u01D0:"i",\u00EE:"i",\u00EF:"i",\u1E2F:"i",\u1ECB:"i",\u0209:"i",\u00EC:"i",\u1EC9:"i",\u020B:"i",\u012B:"i",\u012F:"i","\u1D96":"i",\u0268:"i",\u0129:"i",\u1E2D:"i","\uA77A":"d","\uA77C":"f","\u1D79":"g","\uA783":"r","\uA785":"s","\uA787":"t","\uA76D":"is",\u01F0:"j",\u0135:"j",\u029D:"j","\u0249":"j",\u1E31:"k",\u01E9:"k",\u0137:"k","\u2C6A":"k","\uA743":"k",\u1E33:"k",\u0199:"k",\u1E35:"k","\u1D84":"k","\uA741":"k","\uA745":"k",\u013A:"l",\u019A:"l",\u026C:"l",\u013E:"l",\u013C:"l",\u1E3D:"l","\u0234":"l",\u1E37:"l",\u1E39:"l","\u2C61":"l","\uA749":"l",\u1E3B:"l",\u0140:"l",\u026B:"l","\u1D85":"l",\u026D:"l",\u0142:"l",\u01C9:"lj",\u017F:"s","\u1E9C":"s",\u1E9B:"s","\u1E9D":"s",\u1E3F:"m",\u1E41:"m",\u1E43:"m",\u0271:"m","\u1D6F":"m","\u1D86":"m",\u0144:"n",\u0148:"n",\u0146:"n",\u1E4B:"n","\u0235":"n",\u1E45:"n",\u1E47:"n",\u01F9:"n",\u0272:"n",\u1E49:"n",\u019E:"n","\u1D70":"n","\u1D87":"n",\u0273:"n",\u00F1:"n",\u01CC:"nj",\u00F3:"o",\u014F:"o",\u01D2:"o",\u00F4:"o",\u1ED1:"o",\u1ED9:"o",\u1ED3:"o",\u1ED5:"o",\u1ED7:"o",\u00F6:"o",\u022B:"o",\u022F:"o",\u0231:"o",\u1ECD:"o",\u0151:"o",\u020D:"o",\u00F2:"o",\u1ECF:"o",\u01A1:"o",\u1EDB:"o",\u1EE3:"o",\u1EDD:"o",\u1EDF:"o",\u1EE1:"o",\u020F:"o","\uA74B":"o","\uA74D":"o","\u2C7A":"o",\u014D:"o",\u1E53:"o",\u1E51:"o",\u01EB:"o",\u01ED:"o",\u00F8:"o",\u01FF:"o",\u00F5:"o",\u1E4D:"o",\u1E4F:"o",\u022D:"o",\u01A3:"oi","\uA74F":"oo",\u025B:"e","\u1D93":"e",\u0254:"o","\u1D97":"o",\u0223:"ou",\u1E55:"p",\u1E57:"p","\uA753":"p",\u01A5:"p","\u1D71":"p","\u1D88":"p","\uA755":"p","\u1D7D":"p","\uA751":"p","\uA759":"q",\u02A0:"q","\u024B":"q","\uA757":"q",\u0155:"r",\u0159:"r",\u0157:"r",\u1E59:"r",\u1E5B:"r",\u1E5D:"r",\u0211:"r",\u027E:"r","\u1D73":"r",\u0213:"r",\u1E5F:"r",\u027C:"r","\u1D72":"r","\u1D89":"r","\u024D":"r",\u027D:"r","\u2184":"c","\uA73F":"c",\u0258:"e",\u027F:"r",\u015B:"s",\u1E65:"s",\u0161:"s",\u1E67:"s",\u015F:"s",\u015D:"s",\u0219:"s",\u1E61:"s",\u1E63:"s",\u1E69:"s",\u0282:"s","\u1D74":"s","\u1D8A":"s","\u023F":"s",\u0261:"g","\u1D11":"o","\u1D13":"o","\u1D1D":"u",\u0165:"t",\u0163:"t",\u1E71:"t",\u021B:"t","\u0236":"t",\u1E97:"t","\u2C66":"t",\u1E6B:"t",\u1E6D:"t",\u01AD:"t",\u1E6F:"t","\u1D75":"t",\u01AB:"t",\u0288:"t",\u0167:"t","\u1D7A":"th",\u0250:"a","\u1D02":"ae",\u01DD:"e","\u1D77":"g",\u0265:"h","\u02AE":"h","\u02AF":"h","\u1D09":"i",\u029E:"k","\uA781":"l",\u026F:"m",\u0270:"m","\u1D14":"oe",\u0279:"r",\u027B:"r",\u027A:"r","\u2C79":"r",\u0287:"t",\u028C:"v",\u028D:"w",\u028E:"y","\uA729":"tz",\u00FA:"u",\u016D:"u",\u01D4:"u",\u00FB:"u",\u1E77:"u",\u00FC:"u",\u01D8:"u",\u01DA:"u",\u01DC:"u",\u01D6:"u",\u1E73:"u",\u1EE5:"u",\u0171:"u",\u0215:"u",\u00F9:"u",\u1EE7:"u",\u01B0:"u",\u1EE9:"u",\u1EF1:"u",\u1EEB:"u",\u1EED:"u",\u1EEF:"u",\u0217:"u",\u016B:"u",\u1E7B:"u",\u0173:"u","\u1D99":"u",\u016F:"u",\u0169:"u",\u1E79:"u",\u1E75:"u","\u1D6B":"ue","\uA778":"um","\u2C74":"v","\uA75F":"v",\u1E7F:"v",\u028B:"v","\u1D8C":"v","\u2C71":"v",\u1E7D:"v","\uA761":"vy",\u1E83:"w",\u0175:"w",\u1E85:"w",\u1E87:"w",\u1E89:"w",\u1E81:"w","\u2C73":"w",\u1E98:"w",\u1E8D:"x",\u1E8B:"x","\u1D8D":"x",\u00FD:"y",\u0177:"y",\u00FF:"y",\u1E8F:"y",\u1EF5:"y",\u1EF3:"y",\u01B4:"y",\u1EF7:"y","\u1EFF":"y",\u0233:"y",\u1E99:"y","\u024F":"y",\u1EF9:"y",\u017A:"z",\u017E:"z",\u1E91:"z",\u0291:"z","\u2C6C":"z",\u017C:"z",\u1E93:"z",\u0225:"z",\u1E95:"z","\u1D76":"z","\u1D8E":"z",\u0290:"z",\u01B6:"z","\u0240":"z",\uFB00:"ff",\uFB03:"ffi",\uFB04:"ffl",\uFB01:"fi",\uFB02:"fl",\u0133:"ij",\u0153:"oe",\uFB06:"st","\u2090":"a","\u2091":"e","\u1D62":"i","\u2C7C":"j","\u2092":"o","\u1D63":"r","\u1D64":"u","\u1D65":"v","\u2093":"x"};var H=class{constructor(n,a=n,e=!1){this.item=n,this.value=a,this.header=e}isHeader(){return this.header}toString(){return this.value}};function Y(s){return s?s.replace(/[^A-Za-z0-9[\] ]/g,function(n){return Bt[n]||n}):""}function Ee(s,n=" ",a="",e){let t=[];if(!e)t=pt(s,n,a);else{let i=`([${e}]+)`,r=s.split(new RegExp(i,"g")),o=r[r.length-1];o>""&&(n&&a?t=pt(o,n,a):t.push(o))}return t}function pt(s,n,a){let e=[],t=`(?:[${a}])([^${a}]+)(?:[${a}])|([^${n}]+)`,i=s.split(new RegExp(t,"g")),r=i.length,o,c=new RegExp(`[${a}]+`,"g");for(let f=0;f<r;f+=1)o=i[f],o&&o.length&&o!==n&&e.push(o.replace(c,""));return e}function P(s,n){if(!n||typeof s!="object")return s.toString();if(n.endsWith("()")){let t=n.slice(0,n.length-2);return s[t]().toString()}let e=n.replace(/\[(\w+)\]/g,".$1").replace(/^\./,"").split(".");for(let t of e)t in s&&(s=s[t]);return s?s.toString():""}var mt="220ms cubic-bezier(0, 0, 0.2, 1)",Ht=je("typeaheadAnimation",[Oe("animated-down",G({height:"*",overflow:"hidden"})),de("* => animated-down",[G({height:0,overflow:"hidden"}),he(mt)]),Oe("animated-up",G({height:"*",overflow:"hidden"})),de("* => animated-up",[G({height:"*",overflow:"hidden"}),he(mt)]),de("* => unanimated",he("0s"))]),Nt=0,zt=(()=>{let n=class n{get typeaheadTemplateMethods(){return{selectMatch:this.selectMatch.bind(this),selectActive:this.selectActive.bind(this),isActive:this.isActive.bind(this)}}constructor(e,t,i,r){this.positionService=e,this.renderer=t,this.element=i,this.changeDetectorRef=r,this.activeChangeEvent=new v,this.isFocused=!1,this.positionServiceSubscription=new we,this.height=0,this.popupId=`ngb-typeahead-${Nt++}`,this._matches=[],this.renderer.setAttribute(this.element.nativeElement,"id",this.popupId),this.positionServiceSubscription.add(this.positionService.event$?.subscribe(()=>{if(this.isAnimated){this.animationState=this.isTopPosition?"animated-up":"animated-down",this.changeDetectorRef.detectChanges();return}this.animationState="unanimated",this.changeDetectorRef.detectChanges()}))}get active(){return this._active}set active(e){this._active=e,this.activeChanged()}get matches(){return this._matches}set matches(e){if(this.positionService.setOptions({modifiers:{flip:{enabled:this.adaptivePosition}},allowedPositions:["top","bottom"]}),this._matches=e,this.needScrollbar=this.typeaheadScrollable&&this.typeaheadOptionsInScrollableView<this.matches.length,this.typeaheadScrollable&&setTimeout(()=>{this.setScrollableMode()}),this.typeaheadIsFirstItemActive&&this._matches.length>0&&(this.setActive(this._matches[0]),this._active?.isHeader()&&this.nextActiveMatch()),this._active&&!this.typeaheadIsFirstItemActive){let t=this._matches.find(i=>i.value===this._active?.value);if(t){this.selectActive(t);return}this.active=void 0}}get isTopPosition(){return this.element.nativeElement.classList.contains("top")}get optionsListTemplate(){return this.parent?this.parent.optionsListTemplate:void 0}get isAnimated(){return this.parent?this.parent.isAnimated:!1}get adaptivePosition(){return this.parent?this.parent.adaptivePosition:!1}get typeaheadScrollable(){return this.parent?this.parent.typeaheadScrollable:!1}get typeaheadOptionsInScrollableView(){return this.parent?this.parent.typeaheadOptionsInScrollableView:5}get typeaheadIsFirstItemActive(){return this.parent?this.parent.typeaheadIsFirstItemActive:!0}get itemTemplate(){return this.parent?this.parent.typeaheadItemTemplate:void 0}get canSelectItemsOnBlur(){return!!this.parent?.selectItemOnBlur}selectActiveMatch(e){this._active&&this.parent?.typeaheadSelectFirstItem&&this.selectMatch(this._active),!this.parent?.typeaheadSelectFirstItem&&e&&this.selectMatch(this._active)}activeChanged(){if(!this._active)return;let e=this.matches.indexOf(this._active);this.activeChangeEvent.emit(`${this.popupId}-${e}`)}prevActiveMatch(){if(!this._active)return;let e=this.matches.indexOf(this._active);this.setActive(this.matches[e-1<0?this.matches.length-1:e-1]),this._active.isHeader()&&this.prevActiveMatch(),this.typeaheadScrollable&&this.scrollPrevious(e)}nextActiveMatch(){let e=this._active?this.matches.indexOf(this._active):-1;this.setActive(this.matches[e+1>this.matches.length-1?0:e+1]),this._active?.isHeader()&&this.nextActiveMatch(),this.typeaheadScrollable&&this.scrollNext(e)}selectActive(e){this.isFocused=!0,this.setActive(e)}highlight(e,t){let i=e.value,r=(this.parent&&this.parent.typeaheadLatinize?Y(i):i).toLowerCase(),o,c;if(typeof t=="object"){let f=t.length,me="\u2063",gt=17;for(let q=0;q<f;q+=1)o=r.indexOf(t[q]),c=t[q].length,o>=0&&c>0&&(i=`${i.substring(0,o)}<strong>${i.substring(o,o+c)}</strong>${i.substring(o+c)}`,r=`${r.substring(0,o)}${me.repeat(gt+c)}${r.substring(o+c)}`)}else t&&(o=r.indexOf(t),c=t.length,o>=0&&c>0&&(i=`${i.substring(0,o)}<strong>${i.substring(o,o+c)}</strong>${i.substring(o+c)}`));return i}focusLost(){this.isFocused=!1,this.canSelectItemsOnBlur||this.setActive(void 0)}isActive(e){return this.active===e}selectMatch(e,t){return t&&(t.stopPropagation(),t.preventDefault()),this.parent?.changeModel(e),setTimeout(()=>this.parent?.typeaheadOnSelect.emit(e),0),!1}setScrollableMode(){if(this.ulElement||(this.ulElement=this.element),this.liElements?.first){let e=Se.getStyles(this.ulElement.nativeElement),t=Se.getStyles(this.liElements.first.nativeElement),i=parseFloat((e["padding-bottom"]?e["padding-bottom"]:"").replace("px","")),r=parseFloat((e["padding-top"]?e["padding-top"]:"0").replace("px","")),o=parseFloat((t.height?t.height:"0").replace("px","")),c=this.typeaheadOptionsInScrollableView*o;this.guiHeight=`${c+r+i}px`}this.renderer.setStyle(this.element.nativeElement,"visibility","visible")}scrollPrevious(e){if(e===0){this.scrollToBottom();return}if(this.liElements&&this.ulElement){let t=this.liElements.toArray()[e-1];t&&!this.isScrolledIntoView(t.nativeElement)&&(this.ulElement.nativeElement.scrollTop=t.nativeElement.offsetTop)}}scrollNext(e){if(e+1>this.matches.length-1){this.scrollToTop();return}if(this.liElements&&this.ulElement){let t=this.liElements.toArray()[e+1];t&&!this.isScrolledIntoView(t.nativeElement)&&(this.ulElement.nativeElement.scrollTop=t.nativeElement.offsetTop-Number(this.ulElement.nativeElement.offsetHeight)+Number(t.nativeElement.offsetHeight))}}ngOnDestroy(){this.positionServiceSubscription.unsubscribe()}setActive(e){this._active=e;let t;this._active==null||this._active.isHeader()||(t=e),this.parent?.typeaheadOnPreview.emit(t)}isScrolledIntoView(e){if(!this.ulElement)return!1;let t=this.ulElement.nativeElement.scrollTop,i=t+Number(this.ulElement.nativeElement.offsetHeight),r=e.offsetTop;return r+e.offsetHeight<=i&&r>=t}scrollToBottom(){this.ulElement?.nativeElement&&(this.ulElement.nativeElement.scrollTop=this.ulElement.nativeElement.scrollHeight)}scrollToTop(){this.ulElement?.nativeElement&&(this.ulElement.nativeElement.scrollTop=0)}};n.\u0275fac=function(t){return new(t||n)(u(Q),u(D),u(F),u(K))},n.\u0275cmp=R({type:n,selectors:[["typeahead-container"]],viewQuery:function(t,i){if(t&1&&(z(It,5),z(At,5)),t&2){let r;j(r=$())&&(i.ulElement=r.first),j(r=$())&&(i.liElements=r)}},hostAttrs:[1,"dropdown","open","bottom","dropdown-menu",2,"position","absolute","display","block"],hostVars:7,hostBindings:function(t,i){t&1&&C("mouseleave",function(){return i.focusLost()})("blur",function(){return i.focusLost()}),t&2&&(k("role","listbox"),Re("height",i.needScrollbar?i.guiHeight:"auto")("visibility","inherit"),A("dropup",i.dropup))},outputs:{activeChangeEvent:"activeChange"},features:[xe([Q])],decls:5,vars:7,consts:[["bsItemTemplate",""],["bs4Template",""],["liElements",""],[3,"ngTemplateOutlet","ngTemplateOutletContext"],[3,"innerHtml"],["ngFor","",3,"ngForOf"],["class","dropdown-header",4,"ngIf"],[3,"ngIf"],[1,"dropdown-header"],["role","option",1,"dropdown-item",3,"click","mouseenter","id"]],template:function(t,i){if(t&1&&O(0,Pt,0,0,"ng-template",3)(1,Lt,1,1,"ng-template",null,0,W)(3,Vt,1,1,"ng-template",null,1,W),t&2){let r=B(2),o=B(4);d("ngTemplateOutlet",i.optionsListTemplate||o)("ngTemplateOutletContext",Te(2,Mt,i.matches,i.itemTemplate||r,i.query,i.typeaheadTemplateMethods))}},dependencies:[Ne,oe,le],styles:[".dropdown[_nghost-%COMP%]{z-index:1000}.dropdown-menu[_nghost-%COMP%], .dropdown-menu[_ngcontent-%COMP%]{overflow-y:auto;height:100px}"],data:{animation:[Ht]}});let s=n;return s})(),ut=(()=>{let n=class n{constructor(){this.adaptivePosition=!1,this.isAnimated=!1,this.hideResultsOnBlur=!0,this.cancelRequestOnFocusLost=!1,this.selectFirstItem=!0,this.isFirstItemActive=!0,this.minLength=1,this.selectItemOnBlur=!1}};n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=te({token:n,factory:n.\u0275fac,providedIn:"root"});let s=n;return s})(),ft=(()=>{let n=class n{constructor(e,t,i,r,o,c,f){this.changeDetection=i,this.element=r,this.ngControl=o,this.renderer=c,this.typeaheadMinLength=1,this.adaptivePosition=!1,this.isAnimated=!1,this.typeaheadWaitMs=0,this.typeaheadLatinize=!0,this.typeaheadSingleWords=!0,this.typeaheadWordDelimiters=" ",this.typeaheadMultipleSearchDelimiters=",",this.typeaheadPhraseDelimiters=`'"`,this.typeaheadScrollable=!1,this.typeaheadOptionsInScrollableView=5,this.typeaheadSelectFirstItem=!0,this.typeaheadIsFirstItemActive=!0,this.typeaheadLoading=new v,this.typeaheadNoResults=new v,this.typeaheadOnSelect=new v,this.typeaheadOnPreview=new v,this.typeaheadOnBlur=new v,this.dropup=!1,this.isOpen=!1,this.list="list",this.isActiveItemChanged=!1,this.isFocused=!1,this.cancelRequestOnFocusLost=!1,this.selectItemOnBlur=!1,this.keyUpEventEmitter=new v,this.placement="bottom left",this._matches=[],this._subscriptions=[],this._outsideClickListener=()=>{},this._typeahead=e.createLoader(r,f,c).provide({provide:ut,useValue:t}),Object.assign(this,{typeaheadHideResultsOnBlur:t.hideResultsOnBlur,cancelRequestOnFocusLost:t.cancelRequestOnFocusLost,typeaheadSelectFirstItem:t.selectFirstItem,typeaheadIsFirstItemActive:t.isFirstItemActive,typeaheadMinLength:t.minLength,adaptivePosition:t.adaptivePosition,isAnimated:t.isAnimated,selectItemOnBlur:t.selectItemOnBlur})}get matches(){return this._matches}ngOnInit(){this.typeaheadOptionsLimit=this.typeaheadOptionsLimit||20,this.typeaheadMinLength=this.typeaheadMinLength===void 0?1:this.typeaheadMinLength,this.typeaheadAsync===void 0&&!J(this.typeahead)&&(this.typeaheadAsync=!1),J(this.typeahead)&&(this.typeaheadAsync=!0),this.typeaheadAsync?this.asyncActions():this.syncActions(),this.checkDelimitersConflict()}onInput(e){let t=e.target.value!==void 0?e.target.value:e.target.textContent!==void 0?e.target.textContent:e.target.innerText;t!=null&&t.trim().length>=this.typeaheadMinLength?(this.typeaheadLoading.emit(!0),this.keyUpEventEmitter.emit(e.target.value)):(this.typeaheadLoading.emit(!1),this.typeaheadNoResults.emit(!1),this.hide())}onChange(e){if(this._container){if(e.keyCode===27||e.key==="Escape"){this.hide();return}if(e.keyCode===38||e.key==="ArrowUp"){this.isActiveItemChanged=!0,this._container.prevActiveMatch();return}if(e.keyCode===40||e.key==="ArrowDown"){this.isActiveItemChanged=!0,this._container.nextActiveMatch();return}if(e.keyCode===13||e.key==="Enter"){this._container.selectActiveMatch();return}}}onFocus(){this.isFocused=!0,setTimeout(()=>{this.typeaheadMinLength===0&&(this.typeaheadLoading.emit(!0),this.keyUpEventEmitter.emit(this.element.nativeElement.value||""))},0)}onBlur(){this.isFocused=!1,this._container&&!this._container.isFocused&&this.typeaheadOnBlur.emit(this._container.active),!this.container&&this._matches?.length===0&&this.typeaheadOnBlur.emit(new H(this.element.nativeElement.value,this.element.nativeElement.value,!1))}onKeydown(e){if(this._container&&((e.keyCode===9||e.key==="Tab")&&this.onBlur(),e.keyCode===9||e.key==="Tab"||e.keyCode===13||e.key==="Enter")){if(e.preventDefault(),this.typeaheadSelectFirstItem){this._container.selectActiveMatch();return}this.typeaheadSelectFirstItem||(this._container.selectActiveMatch(this.isActiveItemChanged),this.isActiveItemChanged=!1,this.hide())}}changeModel(e){if(!e)return;let t;if(this.typeaheadMultipleSearch&&this._allEnteredValue){let i=this._allEnteredValue.split(new RegExp(`([${this.typeaheadMultipleSearchDelimiters}]+)`));this._allEnteredValue=i.slice(0,i.length-1).concat(e.value).join(""),t=this._allEnteredValue}else t=e.value;this.ngControl.viewToModelUpdate(t),this.ngControl.control?.setValue(t),this.changeDetection.markForCheck(),this.hide()}show(){if(this._typeahead.attach(zt).to(this.container).position({attachment:`${this.dropup?"top":"bottom"} left`}).show({typeaheadRef:this,placement:this.placement,animation:!1,dropup:this.dropup}),this._outsideClickListener=this.renderer.listen("document","click",t=>{this.typeaheadMinLength===0&&this.element.nativeElement.contains(t.target)||!this.typeaheadHideResultsOnBlur||this.element.nativeElement.contains(t.target)||this.onOutsideClick()}),!this._typeahead.instance||!this.ngControl.control)return;this._container=this._typeahead.instance,this._container.parent=this;let e=(this.typeaheadLatinize?Y(this.ngControl.control.value):this.ngControl.control.value).toString().toLowerCase();this._container.query=this.tokenizeQuery(e),this._container.matches=this._matches,this.element.nativeElement.focus(),this._container.activeChangeEvent.subscribe(t=>{this.activeDescendant=t,this.changeDetection.markForCheck()}),this.isOpen=!0}hide(){this._typeahead.isShown&&(this._typeahead.hide(),this._outsideClickListener(),this._container=void 0,this.isOpen=!1,this.changeDetection.markForCheck()),this.typeaheadOnPreview.emit()}onOutsideClick(){this._container&&!this._container.isFocused&&this.hide()}ngOnDestroy(){for(let e of this._subscriptions)e.unsubscribe();this._typeahead.dispose()}asyncActions(){this._subscriptions.push(this.keyUpEventEmitter.pipe(fe(this.typeaheadWaitMs),ee(e=>this._allEnteredValue=e),Pe(()=>this.typeahead?this.typeahead:ue)).subscribe(e=>{this.finalizeAsyncCall(e)}))}syncActions(){this._subscriptions.push(this.keyUpEventEmitter.pipe(fe(this.typeaheadWaitMs),X(e=>{this._allEnteredValue=e;let t=this.normalizeQuery(e);return this.typeahead?(J(this.typeahead)?this.typeahead:Ae(this.typeahead)).pipe(Me(r=>!!r&&this.testMatch(this.normalizeOption(r),t)),ke()):ue})).subscribe(e=>{this.finalizeAsyncCall(e)}))}normalizeOption(e){let t=P(e,this.typeaheadOptionField);return(this.typeaheadLatinize?Y(t):t).toLowerCase()}tokenizeQuery(e){let t=e;return this.typeaheadMultipleSearch&&this.typeaheadSingleWords?this.haveCommonCharacters(`${this.typeaheadPhraseDelimiters}${this.typeaheadWordDelimiters}`,this.typeaheadMultipleSearchDelimiters)||(t=Ee(t,this.typeaheadWordDelimiters,this.typeaheadPhraseDelimiters,this.typeaheadMultipleSearchDelimiters)):this.typeaheadSingleWords?t=Ee(t,this.typeaheadWordDelimiters,this.typeaheadPhraseDelimiters):t=Ee(t,void 0,void 0,this.typeaheadMultipleSearchDelimiters),t}normalizeQuery(e){let t=(this.typeaheadLatinize?Y(e):e).toString().toLowerCase();return t=this.tokenizeQuery(t),t}testMatch(e,t){let i;if(typeof t=="object"){i=t.length;for(let r=0;r<i;r+=1)if(t[r].length>0&&e.indexOf(t[r])<0)return!1;return!0}return e.indexOf(t)>=0}finalizeAsyncCall(e){if(this.prepareMatches(e||[]),this.typeaheadLoading.emit(!1),this.typeaheadNoResults.emit(!this.hasMatches()),!this.hasMatches()){this.hide();return}if(!(!this.isFocused&&this.cancelRequestOnFocusLost))if(this._container&&this.ngControl.control){let i=((this.typeaheadLatinize?Y(this.ngControl.control.value):this.ngControl.control.value)||"").toString().toLowerCase();this._container.query=this.tokenizeQuery(i),this._container.matches=this._matches}else this.show()}prepareMatches(e){let t=e.slice(0,this.typeaheadOptionsLimit),i=this.typeaheadOrderBy?this.orderMatches(t):t;if(this.typeaheadGroupField){let r=[];i.map(c=>P(c,this.typeaheadGroupField)).filter((c,f,me)=>me.indexOf(c)===f).forEach(c=>{r.push(new H(c,c,!0)),r=r.concat(i.filter(f=>P(f,this.typeaheadGroupField)===c).map(f=>new H(f,P(f,this.typeaheadOptionField))))}),this._matches=r}else this._matches=i.map(r=>new H(r,P(r,this.typeaheadOptionField)))}orderMatches(e){if(!e.length)return e;if(this.typeaheadOrderBy!==null&&this.typeaheadOrderBy!==void 0&&typeof this.typeaheadOrderBy=="object"&&Object.keys(this.typeaheadOrderBy).length===0)return console.error("Field and direction properties for typeaheadOrderBy have to be set according to documentation!"),e;let{field:t,direction:i}=this.typeaheadOrderBy||{};return!i||!(i==="asc"||i==="desc")?(console.error('typeaheadOrderBy direction has to equal "asc" or "desc". Please follow the documentation.'),e):typeof e[0]=="string"?i==="asc"?e.sort():e.sort().reverse():!t||typeof t!="string"?(console.error("typeaheadOrderBy field has to set according to the documentation."),e):e.sort((r,o)=>{let c=P(r,t),f=P(o,t);return c<f?i==="asc"?-1:1:c>f?i==="asc"?1:-1:0})}hasMatches(){return this._matches.length>0}checkDelimitersConflict(){if(this.typeaheadMultipleSearch&&this.typeaheadSingleWords&&this.haveCommonCharacters(`${this.typeaheadPhraseDelimiters}${this.typeaheadWordDelimiters}`,this.typeaheadMultipleSearchDelimiters))throw new Error(`Delimiters used in typeaheadMultipleSearchDelimiters must be different
2
2
  from delimiters used in typeaheadWordDelimiters (current value: ${this.typeaheadWordDelimiters}) and
3
3
  typeaheadPhraseDelimiters (current value: ${this.typeaheadPhraseDelimiters}).
4
4
  Please refer to the documentation`)}haveCommonCharacters(e,t){for(let i=0;i<e.length;i++)if(e.charAt(i).indexOf(t)>-1)return!0;return!1}};n.\u0275fac=function(t){return new(t||n)(u(pe),u(ut),u(K),u(F),u(We),u(D),u(se))},n.\u0275dir=U({type:n,selectors:[["","typeahead",""]],hostVars:4,hostBindings:function(t,i){t&1&&C("input",function(o){return i.onInput(o)})("keyup",function(o){return i.onChange(o)})("click",function(){return i.onFocus()})("focus",function(){return i.onFocus()})("blur",function(){return i.onBlur()})("keydown",function(o){return i.onKeydown(o)}),t&2&&k("aria-activedescendant",i.activeDescendant)("aria-owns",i.isOpen?i._container.popupId:null)("aria-expanded",i.isOpen)("aria-autocomplete",i.list)},inputs:{typeahead:"typeahead",typeaheadMinLength:"typeaheadMinLength",adaptivePosition:"adaptivePosition",isAnimated:"isAnimated",typeaheadWaitMs:"typeaheadWaitMs",typeaheadOptionsLimit:"typeaheadOptionsLimit",typeaheadOptionField:"typeaheadOptionField",typeaheadGroupField:"typeaheadGroupField",typeaheadOrderBy:"typeaheadOrderBy",typeaheadAsync:"typeaheadAsync",typeaheadLatinize:"typeaheadLatinize",typeaheadSingleWords:"typeaheadSingleWords",typeaheadWordDelimiters:"typeaheadWordDelimiters",typeaheadMultipleSearch:"typeaheadMultipleSearch",typeaheadMultipleSearchDelimiters:"typeaheadMultipleSearchDelimiters",typeaheadPhraseDelimiters:"typeaheadPhraseDelimiters",typeaheadItemTemplate:"typeaheadItemTemplate",optionsListTemplate:"optionsListTemplate",typeaheadScrollable:"typeaheadScrollable",typeaheadOptionsInScrollableView:"typeaheadOptionsInScrollableView",typeaheadHideResultsOnBlur:"typeaheadHideResultsOnBlur",typeaheadSelectFirstItem:"typeaheadSelectFirstItem",typeaheadIsFirstItemActive:"typeaheadIsFirstItemActive",container:"container",dropup:"dropup"},outputs:{typeaheadLoading:"typeaheadLoading",typeaheadNoResults:"typeaheadNoResults",typeaheadOnSelect:"typeaheadOnSelect",typeaheadOnPreview:"typeaheadOnPreview",typeaheadOnBlur:"typeaheadOnBlur"},exportAs:["bs-typeahead"],features:[xe([pe,Q])]});let s=n;return s})(),yt=(()=>{let n=class n{static forRoot(){return{ngModule:n,providers:[]}}};n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=ae({type:n}),n.\u0275inj=ie({imports:[ce]});let s=n;return s})();var _t=(()=>{let n=class n{transform(e,t,i=!1){if(i&&t.length<1)return e;if(t&&e){let r=t.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&");r=r.split(" ").filter(c=>c.length>0).join("|");let o=new RegExp(r,"gi");return e.replace(o,c=>`<b>${c}</b>`)}else return e}};n.\u0275fac=function(t){return new(t||n)},n.\u0275pipe=V({name:"highlight",type:n,pure:!0});let s=n;return s})();var $t=["InputTypeHead"],Wt=(s,n)=>n.mid,Kt=(s,n)=>n.key;function Gt(s,n){if(s&1&&g(0,"img",7),s&2){let a=l().item;d("src",a.avatarUrl,ye)}}function Qt(s,n){if(s&1&&g(0,"fa-icon",13),s&2){let a=l().item,e=l();re(a.isPersonalGroup?"circle-purple-icon":"circle-primary-icon"),d("icon",e.icons.GROUPS)}}function Zt(s,n){if(s&1&&(g(0,"span",10),I(1,"highlight")),s&2){let a=l().item,e=l();d("innerHTML",M(1,1,a.description,e.selection),N)}}function Yt(s,n){if(s&1&&(p(0,"div",5)(1,"div",6),S(2,Gt,1,1,"img",7)(3,Qt,1,3,"fa-icon",8),m(),p(4,"div"),g(5,"div",9),I(6,"highlight"),S(7,Zt,2,4,"span",10),m(),p(8,"div",11)(9,"span",12),b(10),m()()()),s&2){let a=n.item,e=l();h(2),E(a.isUser?2:3),h(2),re(Ue("d-flex ms-2 pe-5 ",a.description?"flex-column align-items-start":"align-items-center")),h(),d("innerHTML",M(6,7,a.name,e.selection),N),h(2),E(a.description?7:-1),h(3),T(a.type)}}function qt(s,n){if(s&1){let a=w();p(0,"input",14,1),I(2,"translate"),C("typeaheadOnSelect",function(t){y(a);let i=l();return _(i.onSelect(t))})("typeaheadLoading",function(){y(a);let t=l();return _(t.onLoading())})("typeaheadNoResults",function(){y(a);let t=l();return _(t.onNoResults())})("typeaheadOnPreview",function(){y(a);let t=l();return _(t.onPreview())}),be("ngModelChange",function(t){y(a);let i=l();return Ce(i.selection,t)||(i.selection=t),_(t)}),m()}if(s&2){let a=l(),e=B(1);ve("ngModel",a.selection),d("placeholder",M(2,10,a.placeHolder,a.locale.language))("typeaheadItemTemplate",e)("typeaheadAsync",!0)("typeaheadMinLength",0)("typeaheadSingleWords",!0)("typeaheadOptionField","name")("typeaheadWaitMs",100)("typeaheadHideResultsOnBlur",!0)("typeahead",a.asyncSearchUsersOrGroups)}}function Jt(s,n){if(s&1&&g(0,"img",7),s&2){let a=l().$implicit;d("src",a.avatarUrl,ye)}}function Xt(s,n){if(s&1&&g(0,"fa-icon",17),s&2){let a=l(2);d("icon",a.icons.LINKS)}}function ei(s,n){if(s&1&&g(0,"fa-icon",13),s&2){let a=l().$implicit,e=l();re(a.isPersonalGroup?"circle-purple-icon":"circle-primary-icon"),d("icon",e.icons.GROUPS)}}function ti(s,n){if(s&1&&(p(0,"span",21),b(1),m()),s&2){let a=l().$implicit;h(),T(a.description)}}function ii(s,n){if(s&1&&(p(0,"span",22),b(1),m()),s&2){let a=l().$implicit;h(),T(a.type)}}function ni(s,n){if(s&1){let a=w();p(0,"button",32),I(1,"translate"),be("ngModelChange",function(t){y(a);let i=l().$implicit,r=l(3).$implicit;return Ce(r.hPerms[i.key],t)||(r.hPerms[i.key]=t),_(t)}),C("ngModelChange",function(){y(a);let t=l(4).$implicit,i=l();return _(i.onPermissionChange(t))}),g(2,"fa-icon",33),m()}if(s&2){let a=l().$implicit,e=l(3).$implicit,t=l();ve("ngModel",e.hPerms[a.key]),d("tooltip",M(1,3,t.SPACES_PERMISSIONS_TEXT[a.key].text,t.locale.language)),h(2),d("icon",t.SPACES_PERMISSIONS_TEXT[a.key].icon)}}function si(s,n){if(s&1&&S(0,ni,3,6,"button",31),s&2){let a=n.$implicit,e=l(4);E(!e.filterPermissions||(e.filterPermissions&&e.allowedPermissions.indexOf(a.key))>-1?0:-1)}}function ai(s,n){if(s&1&&(_e(0,si,1,1,null,null,Kt),I(2,"keyvalue"),g(3,"div",30)),s&2){let a=l(2).$implicit,e=l();ge(M(2,0,a.hPerms,e.originalOrderKeyValue))}}function ri(s,n){if(s&1){let a=w();p(0,"button",34),I(1,"translate"),C("click",function(){y(a);let t=l(2).$implicit,i=l();return _(i.editFunction(t))}),g(2,"fa-icon",13),m()}if(s&2){let a=l(3);d("tooltip",M(1,2,"Edit",a.locale.language)),h(2),d("icon",a.icons.faPen)}}function oi(s,n){if(s&1){let a=w();p(0,"div",26),g(1,"div",27),S(2,ai,4,3),S(3,ri,3,5,"button",28),p(4,"button",29),I(5,"translate"),C("click",function(){y(a);let t=l().$implicit,i=l();return _(i.removeMember(t))}),g(6,"fa-icon",13),m()()}if(s&2){let a=l(2);h(2),E(a.withPermissions?2:-1),h(),E(a.editFunction?3:-1),h(),d("tooltip",M(5,4,"Remove",a.locale.language)),h(2),d("icon",a.icons.faTimes)}}function li(s,n){if(s&1&&(p(0,"div",4)(1,"div",15)(2,"div",16),S(3,Jt,1,1,"img",7)(4,Xt,1,1,"fa-icon",17)(5,ei,1,3,"fa-icon",8),p(6,"div",18)(7,"div",19),b(8),m(),p(9,"div",20),S(10,ti,2,1,"span",21)(11,ii,2,1,"span",22),m()()(),p(12,"div",23)(13,"div",24),b(14),m(),p(15,"div",25),b(16),I(17,"amTimeAgo"),m()(),S(18,oi,7,7,"div",26),m()()),s&2){let a=n.$implicit,e=l();h(3),E(a.isUser?3:a.isLink?4:5),h(5),T(a.name),h(2),E(a.description?10:a.linkId?-1:11),h(4),T(a.isLink?e.MEMBER_TYPE.LINK:a.type),h(2),T(Be(17,6,a.createdAt)),h(2),E(e.editMode?18:-1)}}var vn=(()=>{let n=class n{constructor(){this.members=[],this.membersChange=new v,this.withPermissions=!1,this.filterPermissions=!1,this.allowedPermissions=[],this.editMode=!0,this.hideInput=!1,this.editFunction=null,this.locale=L(Ze),this.MEMBER_TYPE=ot,this.originalOrderKeyValue=st,this.SPACES_PERMISSIONS_TEXT=rt,this.icons={GROUPS:it.GROUPS,LINKS:at.LINKS,faTimes:et,faPen:tt},this.selection="",this.ngZone=L(ne),this.defaultPlaceholder="Type to search for users or groups to add",this.placeHolder=this.defaultPlaceholder,this.lastResults=[],this.asyncSearchUsersOrGroups=new Ie(e=>e.next(this.selection)).pipe(X(e=>this.searchFunction(e||"").pipe(ee(t=>this.lastResults=t))))}ngOnInit(){this.setDefaultPlaceHolder()}onSelect(e){this.ngZone.run(()=>{this.selection="",this.inputTypeHead.nativeElement.value=""});let t=e.item;t.createdAt||(t.createdAt=new Date),this.members.unshift(e.item),this.membersChange.emit(this.members),this.lastResults=this.lastResults.filter(i=>i.mid!==t.mid)}onPermissionChange(e){e.permissions=lt(e.hPerms)}removeMember(e){this.members=this.members.filter(t=>t.mid!==e.mid),this.membersChange.emit(this.members),this.lastResults.push(e)}onLoading(){this.placeHolder="Loading..."}onNoResults(){this.placeHolder="No results"}onPreview(){this.setDefaultPlaceHolder()}setDefaultPlaceHolder(){this.placeHolder=this.customPlaceholder||this.defaultPlaceholder}};n.\u0275fac=function(t){return new(t||n)},n.\u0275cmp=R({type:n,selectors:[["app-user-search"]],viewQuery:function(t,i){if(t&1&&z($t,5),t&2){let r;j(r=$())&&(i.inputTypeHead=r.first)}},inputs:{members:"members",withPermissions:"withPermissions",filterPermissions:"filterPermissions",allowedPermissions:"allowedPermissions",editMode:"editMode",hideInput:"hideInput",searchFunction:"searchFunction",editFunction:"editFunction",customPlaceholder:"customPlaceholder"},outputs:{membersChange:"membersChange"},decls:6,vars:1,consts:[["searchMembers",""],["InputTypeHead",""],[1,"form-control","form-control-sm","mb-2",3,"ngModel","placeholder","typeaheadItemTemplate","typeaheadAsync","typeaheadMinLength","typeaheadSingleWords","typeaheadOptionField","typeaheadWaitMs","typeaheadHideResultsOnBlur","typeahead"],[1,"col-12","mt-1"],[1,"bg-theme","mb-1","p-2",2,"border-radius","4px"],["role","button",1,"d-flex"],[1,"d-flex","align-items-center","text-truncate"],["alt","","height","30","width","30",1,"avatar-base-img",3,"src"],[3,"icon","class"],[3,"innerHTML"],[1,"fs-xxxs","me-4",3,"innerHTML"],[1,"ms-auto","ps-5","me-1","text-muted","d-none","d-lg-block","fs-xxxs","align-self-center"],["l10nTranslate",""],[3,"icon"],[1,"form-control","form-control-sm","mb-2",3,"typeaheadOnSelect","typeaheadLoading","typeaheadNoResults","typeaheadOnPreview","ngModelChange","ngModel","placeholder","typeaheadItemTemplate","typeaheadAsync","typeaheadMinLength","typeaheadSingleWords","typeaheadOptionField","typeaheadWaitMs","typeaheadHideResultsOnBlur","typeahead"],[1,"d-flex","align-items-center","text-truncate","no-select","fs-xs",2,"height","32px"],[1,"d-flex","align-items-center","text-truncate","me-auto"],[1,"circle-primary-icon",3,"icon"],[1,"d-flex","flex-column","text-truncate","ms-2"],[1,"text-truncate"],[1,"fs-xxxs","text-truncate"],[1,"fs-xxxs"],["l10nTranslate","",1,"fs-xxxs"],[1,"d-flex","flex-column","fs-xxxs","text-muted","d-none","d-lg-block","ms-3"],["l10nTranslate","",1,"d-flex","justify-content-end"],[1,"d-flex","justify-content-end"],[1,"d-flex","no-select"],[1,"vr","mx-2"],["type","button",1,"btn","btn-sm","btn-custom","me-2",3,"tooltip"],["type","button",1,"btn","btn-sm","btn-danger",3,"click","tooltip"],[1,"vr","ms-1","me-2"],["btnCheckbox","","type","button",1,"btn","btn-sm","btn-custom",3,"ngModel","tooltip"],["btnCheckbox","","type","button",1,"btn","btn-sm","btn-custom",3,"ngModelChange","ngModel","tooltip"],["size","lg",3,"icon"],["type","button",1,"btn","btn-sm","btn-custom","me-2",3,"click","tooltip"]],template:function(t,i){t&1&&(O(0,Yt,11,10,"ng-template",null,0,W),S(2,qt,3,13,"input",2),p(3,"div",3),_e(4,li,19,8,"div",4,Wt),m()),t&2&&(h(2),E(i.hideInput?-1:2),h(2),ge(i.members))},dependencies:[yt,ft,Qe,$e,Ke,Ge,nt,qe,ht,ct,Xe,Je,Ye,dt,_t,ze],encapsulation:2});let s=n;return s})();export{hi as a,St as b,Et as c,bi as d,xi as e,_t as f,dt as g,vn as h};
@@ -1 +1 @@
1
- import{Ub as fe,_a as de,yb as pe}from"./chunk-GUGNR5TF.js";import{$a as x,Ab as _,Cd as ce,Db as D,Fb as O,Gb as ee,Hb as te,J as E,Jb as T,Kb as S,La as X,Lb as y,N as z,Na as w,Pa as C,Qa as P,T as N,Va as G,X as V,Z as A,_c as ne,bb as Z,cb as j,cd as oe,dg as ue,ec as ie,f as B,gc as se,ia as u,kb as K,kd as re,kf as me,lb as $,na as H,oa as I,p as L,qb as R,rb as k,sb as M,td as le,ua as Q,ub as q,vb as U,wa as Y,wb as J,wd as he,xd as ae,za as v}from"./chunk-C36MW4ME.js";var be=["iFilter"];function Ce(r,i){if(r&1){let d=_();k(0,"span",3)(1,"fa-icon",4),D("click",function(){H(d);let t=O();return I(t.clear())}),M()()}if(r&2){let d=O();w(),R("icon",d.faTimes)}}var _e=(()=>{let i=class i{constructor(){this.search=Q(""),this.locale=u(ae),this.faTimes=me,this.fb=u(le),this.searchControl=this.fb.control(""),this.subscription=this.searchControl.valueChanges.pipe(E(300),z()).subscribe(e=>this.onType(e))}ngOnDestroy(){this.subscription.unsubscribe()}onKeyPress(e){(e.ctrlKey||e.metaKey)&&e.keyCode===70?(e.preventDefault(),e.stopPropagation(),this.iFilter.nativeElement.focus()):e.keyCode===27&&e.preventDefault()}clear(){this.searchControl&&(this.searchControl.reset(),this.iFilter.nativeElement.value="")}onType(e){this.search.set(e)}};i.\u0275fac=function(t){return new(t||i)},i.\u0275cmp=x({type:i,selectors:[["app-input-filter"]],viewQuery:function(t,s){if(t&1&&T(be,7),t&2){let n;S(n=y())&&(s.iFilter=n.first)}},hostBindings:function(t,s){t&1&&D("keydown",function(h){return s.onKeyPress(h)},X)},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(t,s){if(t&1){let n=_();k(0,"div",1)(1,"input",2,0),ie(3,"translate"),D("keyup.escape",function(){return H(n),I(s.clear())}),M(),K(4,Ce,2,1,"span",3),M()}t&2&&(w(),R("placeholder",se(3,3,"Filter",s.locale.language)+" (Ctrl/\u2318+F)")("formControl",s.searchControl),w(3),$(s.search()?4:-1))},dependencies:[he,ne,oe,re,ue,ce],encapsulation:2});let r=i;return r})();var Te=["content"],Se=["shim"],ye=["*"],Ye=(()=>{let i=class i{constructor(){this.isScrollBottom=new C,this.isScrollTop=new C,this.resizeOffset=130,this.galleryMode=!1,this.selectedChat=null,this.items=[],this.childHeight=35,this.bufferAmount=0,this.viewPortItems=[],this.element=u(v),this.renderer=u(G),this.ngZone=u(P),this.layout=u(pe),this.subscriptions=[],this.scrollbarWidth=0,this._scrollChat=new B,this.scrollChat=this._scrollChat.asObservable().pipe(E(50)),this.startupLoop=!0,this.scrollTimer=null,this.lastScrollHeight=-1,this.lastTopPadding=-1,this.toggleLeftSidebar=this.layout.toggleLeftSideBar.pipe(V(1),A(e=>L(e).pipe(N({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(e=>e.unsubscribe())}ngOnChanges(e){if(this.previousStart=void 0,this.previousEnd=void 0,this.galleryMode)this.startupLoop=!0;else{let t=e.items||void 0;(e.items!==void 0&&t.previousValue===void 0||t.previousValue!==void 0&&t.previousValue.length===0)&&(this.startupLoop=!0)}this.refresh(!0),this.checkChangesOnChat(e)}refresh(e=!1){this.ngZone.runOutsideAngular(()=>{(e||!this.dimensionsView)&&this.calculateDimensions(),requestAnimationFrame(()=>this.calculateItems())}),this.resizeTableHeader()}scrollInto(e){if(e===-1){this.element.nativeElement.scrollTo({left:0,top:0,behavior:"auto"});return}else if(e===-2){this.element.nativeElement.scrollTo({left:0,top:this.element.nativeElement.scrollHeight,behavior:"smooth"});return}else if(e===0){this.refresh();return}let t=(this.items||[]).indexOf(e);if(t<0||t>=(this.items||[]).length)return;let s=this.dimensionsView,n=Math.floor(t/s.itemsPerRow)*s.childHeight-s.childHeight*Math.min(t,this.bufferAmount);this.element.nativeElement.scrollTo({left:0,top:n,behavior:"smooth"}),this.refresh()}checkChangesOnChat(e){this.selectedChat&&(e.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 e=this.chatIsScrolledToBottom(),t=this.chatIsScrolledToTop();t?this.saveChatScrollPosition(this.element.nativeElement.scrollHeight-this.element.nativeElement.scrollTop):e?this.saveChatScrollPosition(this.element.nativeElement.scrollHeight):this.saveChatScrollPosition(),this.ngZone.run(()=>{this.isScrollBottom.next(e),this.isScrollTop.next(t)})}saveChatScrollPosition(e=null){this.selectedChat.lastScrollPosition=e||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(e=!1){let t=window.innerHeight-this.resizeOffset;(e||this.element.nativeElement.offsetHeight!==t)&&this.renderer.setStyle(this.element.nativeElement,"height",`${t-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 e,t,s=this.contentElementRef.nativeElement.children;for(s[0]&&(s=s[0].children),t=0;t<s.length&&!(e!==void 0&&e!==s[t].offsetTop);t++)e=s[t].offsetTop;return t}else return 1}calculateDimensions(){let e=this.element.nativeElement,t=e.offsetWidth-e.clientWidth;this.scrollbarWidth!=t&&(this.resizeTableHeader(),this.scrollbarWidth=t);let n=(this.items||[]).length,h=e.clientWidth-this.scrollbarWidth,p=e.clientHeight,c;if(this.childWidth===void 0||this.childHeight===void 0){let F=this.contentElementRef.nativeElement;c=F.children[0]?F.children[0].getBoundingClientRect():{width:h,height:p}}let o=this.childWidth||c.width,m=this.childHeight||c.height,a=this.countItemsPerRow(),f=Math.max(1,Math.floor(h/o));this.galleryMode&&a===0?a=f:a=Math.max(1,a);let l=Math.max(1,Math.floor(p/m)),g=e.scrollTop,ve=Math.max(0,g),b=m*Math.ceil(n/a);l===1&&Math.floor(ve/b*n)+f>=n&&(a=f),b!==this.lastScrollHeight&&(this.renderer.setStyle(this.shimElementRef.nativeElement,"height",`${b}px`),this.lastScrollHeight=b),this.dimensionsView={itemCount:n,viewWidth:h,viewHeight:p,childWidth:o,childHeight:m,itemsPerRow:a,itemsPerCol:l,itemsPerRowByCalc:f,scrollHeight:b}}calculateItems(){let e=this.element.nativeElement,t=this.dimensionsView,s=this.items||[],n=this.galleryMode?this.bufferAmount*t.itemsPerRowByCalc:this.bufferAmount,h=e.scrollTop;h>t.scrollHeight&&(h=t.scrollHeight);let c=Math.max(0,h)/t.scrollHeight*t.itemCount/t.itemsPerRow,o=Math.min(t.itemCount,Math.ceil(c)*t.itemsPerRow+t.itemsPerRow*(t.itemsPerCol+1)),m=o,a=o%t.itemsPerRow;a&&(m=o+t.itemsPerRow-a);let f=Math.max(0,m-t.itemsPerCol*t.itemsPerRow-t.itemsPerRow),l=Math.min(f,Math.floor(c)*t.itemsPerRow),g=s==null||s.length===0?0:t.childHeight*Math.ceil(l/t.itemsPerRow)-t.childHeight*Math.min(l,this.bufferAmount);g!==this.lastTopPadding&&(this.renderer.setStyle(this.contentElementRef.nativeElement,"transform",`translateY(${g}px)`),this.renderer.setStyle(this.contentElementRef.nativeElement,"webkitTransform",`translateY(${g}px)`),this.lastTopPadding=g),l=isNaN(l)?-1:l,o=isNaN(o)?-1:o,l-=n,l=Math.max(0,l),o+=n,o=Math.min(s.length,o),l!==this.previousStart||o!==this.previousEnd?(this.ngZone.run(()=>{this.viewPortItems=s.slice(l,o>=0?o:0)}),this.previousStart=l,this.previousEnd=o,this.startupLoop===!0&&this.refresh()):this.startupLoop===!0&&(this.startupLoop=!1,this.refresh(!0))}};i.\u0275fac=function(t){return new(t||i)},i.\u0275cmp=x({type:i,selectors:[["app-virtual-scroll"]],viewQuery:function(t,s){if(t&1&&(T(Te,7,v),T(Se,7,v)),t&2){let n;S(n=y())&&(s.contentElementRef=n.first),S(n=y())&&(s.shimElementRef=n.first)}},inputs:{resizeOffset:"resizeOffset",galleryMode:"galleryMode",selectedChat:"selectedChat",items:"items",childHeight:"childHeight",childWidth:"childWidth",bufferAmount:"bufferAmount"},outputs:{isScrollBottom:"isScrollBottom",isScrollTop:"isScrollTop"},features:[Y],ngContentSelectors:ye,decls:5,vars:0,consts:[["shim",""],["content",""],[1,"total-padding"],[1,"scrollable-content"]],template:function(t,s){t&1&&(ee(),J(0,"div",2,0),q(2,"div",3,1),te(4),U())},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 $e=(()=>{let i=class i{constructor(){this.maxMove=10,this.maxDuration=350,this.doubleTapInterval=600,this.doubleTapSlop=24,this.enableDoubleTap=!0,this.emitSingleWhenNoDouble=!1,this.preventGhostClick=!0,this.preventDefault=!1,this.disabled=!1,this.appTap=new C,this.elRef=u(v),this.zone=u(P),this.removeFns=[],this.active=!1,this.pointerId=null,this.startX=0,this.startY=0,this.startTime=0,this.moved=!1,this.lastEmitTs=0,this.pendingSingle=null,this.singleTimer=null,this.onDown=e=>{this.disabled||e.button!==0||this.active||(this.active=!0,this.pointerId=e.pointerId,this.startX=e.clientX,this.startY=e.clientY,this.startTime=e.timeStamp,this.moved=!1,e.target.setPointerCapture?.(e.pointerId))},this.onMove=e=>{if(!(!this.active||e.pointerId!==this.pointerId)&&!this.moved){let t=Math.abs(e.clientX-this.startX),s=Math.abs(e.clientY-this.startY);(t>this.maxMove||s>this.maxMove)&&(this.moved=!0)}},this.onUp=e=>{if(!this.active||e.pointerId!==this.pointerId)return;let t=e.timeStamp-this.startTime,s=Math.abs(e.clientX-this.startX),n=Math.abs(e.clientY-this.startY),h=!this.moved&&s<=this.maxMove&&n<=this.maxMove&&t<=this.maxDuration;if(this.resetGesture(),!h)return;this.preventDefault&&e.preventDefault();let p=performance.now(),c=e.clientX,o=e.clientY;if(!this.enableDoubleTap){this.emit("single",c,o,e);return}if(this.pendingSingle){let m=p-this.pendingSingle.t,a=Math.hypot(c-this.pendingSingle.x,o-this.pendingSingle.y);if(m<=this.doubleTapInterval&&a<=this.doubleTapSlop){clearTimeout(this.singleTimer),this.singleTimer=null,this.pendingSingle=null,this.emit("double",c,o,e);return}}this.pendingSingle={x:c,y:o,t:p},clearTimeout(this.singleTimer),this.singleTimer=setTimeout(()=>{if(this.emitSingleWhenNoDouble){let m=this.pendingSingle;this.emit("single",m.x,m.y)}this.pendingSingle=null,this.singleTimer=null},this.doubleTapInterval)},this.onCancel=()=>this.resetGesture(),this.onKey=e=>{if(this.disabled)return;let t=e.key.toLowerCase();if(t==="enter"||t===" "){if(e.preventDefault(),this.enableDoubleTap&&!this.emitSingleWhenNoDouble)return;this.emit("single",0,0,e)}},this.onContextMenu=e=>{this.preventDefault&&e.preventDefault()},this.onNativeClick=e=>{this.preventGhostClick&&performance.now()-this.lastEmitTs<350&&(e.stopImmediatePropagation(),e.stopPropagation(),e.preventDefault())},this.el=this.elRef.nativeElement,this.zone.runOutsideAngular(()=>{this.add("pointerdown",this.onDown,{passive:!0}),this.add("pointermove",this.onMove,{passive:!0}),this.add("pointerup",this.onUp,{passive:!1}),this.add("pointercancel",this.onCancel,{passive:!0}),this.add("pointerleave",this.onCancel,{passive:!0}),this.add("keydown",this.onKey,{passive:!1}),this.add("contextmenu",this.onContextMenu,{passive:!1}),this.add("click",this.onNativeClick,{passive:!1,capture:!0})})}ngOnDestroy(){for(let e of this.removeFns)e();this.removeFns=[],clearTimeout(this.singleTimer)}emit(e,t,s,n){this.lastEmitTs=performance.now(),this.zone.run(()=>this.appTap.emit({x:t,y:s,type:e,sourceEvent:n}))}add(e,t,s){this.el.addEventListener(e,t,s),this.removeFns.push(()=>this.el.removeEventListener(e,t,s))}resetGesture(){this.active=!1,this.pointerId=null,this.startTime=0}};i.\u0275fac=function(t){return new(t||i)},i.\u0275dir=Z({type:i,selectors:[["","appTap",""]],hostAttrs:[2,"touch-action","manipulation","-webkit-tap-highlight-color","transparent"],inputs:{maxMove:"maxMove",maxDuration:"maxDuration",doubleTapInterval:"doubleTapInterval",doubleTapSlop:"doubleTapSlop",enableDoubleTap:"enableDoubleTap",emitSingleWhenNoDouble:"emitSingleWhenNoDouble",preventGhostClick:"preventGhostClick",preventDefault:"preventDefault",disabled:"disabled"},outputs:{appTap:"appTap"}});let r=i;return r})();var Je=(()=>{let i=class i{transform(e,t,s){return!e?.length||!t?e:de(t,e,s)}};i.\u0275fac=function(t){return new(t||i)},i.\u0275pipe=j({name:"searchFilter",type:i,pure:!0});let r=i;return r})();var ge=class{constructor(i,d){this.defaultId="default",this.keyStore=`sortBy${i}`,this.sortSettings=d,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,d=!0,e){if(!(i in this.sortSettings))return e;d&&(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 t of this.sortSettings[i])fe(t.type,e,t.prop,i===this.defaultId?!1:this.sortParam.asc);return[...e]}};export{_e as a,Ye as b,$e as c,Je as d,ge as e};
1
+ import{Ub as fe,_a as de,yb as pe}from"./chunk-XDZGW64M.js";import{$a as x,$c as ne,Ab as _,Db as D,Dd as ce,Fb as O,Gb as ee,Hb as te,J as E,Jb as T,Kb as S,La as X,Lb as y,N as z,Na as w,Pa as C,Qa as P,T as N,Va as G,X as V,Z as A,bb as Z,cb as j,dd as oe,ec as ie,eg as ue,f as B,gc as se,ia as u,kb as K,lb as $,ld as re,lf as me,na as H,oa as I,p as L,qb as R,rb as k,sb as M,ua as Q,ub as q,ud as le,vb as U,wa as Y,wb as J,xd as he,yd as ae,za as v}from"./chunk-DIT6W7VM.js";var be=["iFilter"];function Ce(r,i){if(r&1){let d=_();k(0,"span",3)(1,"fa-icon",4),D("click",function(){H(d);let t=O();return I(t.clear())}),M()()}if(r&2){let d=O();w(),R("icon",d.faTimes)}}var _e=(()=>{let i=class i{constructor(){this.search=Q(""),this.locale=u(ae),this.faTimes=me,this.fb=u(le),this.searchControl=this.fb.control(""),this.subscription=this.searchControl.valueChanges.pipe(E(300),z()).subscribe(e=>this.onType(e))}ngOnDestroy(){this.subscription.unsubscribe()}onKeyPress(e){(e.ctrlKey||e.metaKey)&&e.keyCode===70?(e.preventDefault(),e.stopPropagation(),this.iFilter.nativeElement.focus()):e.keyCode===27&&e.preventDefault()}clear(){this.searchControl&&(this.searchControl.reset(),this.iFilter.nativeElement.value="")}onType(e){this.search.set(e)}};i.\u0275fac=function(t){return new(t||i)},i.\u0275cmp=x({type:i,selectors:[["app-input-filter"]],viewQuery:function(t,s){if(t&1&&T(be,7),t&2){let n;S(n=y())&&(s.iFilter=n.first)}},hostBindings:function(t,s){t&1&&D("keydown",function(h){return s.onKeyPress(h)},X)},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(t,s){if(t&1){let n=_();k(0,"div",1)(1,"input",2,0),ie(3,"translate"),D("keyup.escape",function(){return H(n),I(s.clear())}),M(),K(4,Ce,2,1,"span",3),M()}t&2&&(w(),R("placeholder",se(3,3,"Filter",s.locale.language)+" (Ctrl/\u2318+F)")("formControl",s.searchControl),w(3),$(s.search()?4:-1))},dependencies:[he,ne,oe,re,ue,ce],encapsulation:2});let r=i;return r})();var Te=["content"],Se=["shim"],ye=["*"],Ye=(()=>{let i=class i{constructor(){this.isScrollBottom=new C,this.isScrollTop=new C,this.resizeOffset=130,this.galleryMode=!1,this.selectedChat=null,this.items=[],this.childHeight=35,this.bufferAmount=0,this.viewPortItems=[],this.element=u(v),this.renderer=u(G),this.ngZone=u(P),this.layout=u(pe),this.subscriptions=[],this.scrollbarWidth=0,this._scrollChat=new B,this.scrollChat=this._scrollChat.asObservable().pipe(E(50)),this.startupLoop=!0,this.scrollTimer=null,this.lastScrollHeight=-1,this.lastTopPadding=-1,this.toggleLeftSidebar=this.layout.toggleLeftSideBar.pipe(V(1),A(e=>L(e).pipe(N({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(e=>e.unsubscribe())}ngOnChanges(e){if(this.previousStart=void 0,this.previousEnd=void 0,this.galleryMode)this.startupLoop=!0;else{let t=e.items||void 0;(e.items!==void 0&&t.previousValue===void 0||t.previousValue!==void 0&&t.previousValue.length===0)&&(this.startupLoop=!0)}this.refresh(!0),this.checkChangesOnChat(e)}refresh(e=!1){this.ngZone.runOutsideAngular(()=>{(e||!this.dimensionsView)&&this.calculateDimensions(),requestAnimationFrame(()=>this.calculateItems())}),this.resizeTableHeader()}scrollInto(e){if(e===-1){this.element.nativeElement.scrollTo({left:0,top:0,behavior:"auto"});return}else if(e===-2){this.element.nativeElement.scrollTo({left:0,top:this.element.nativeElement.scrollHeight,behavior:"smooth"});return}else if(e===0){this.refresh();return}let t=(this.items||[]).indexOf(e);if(t<0||t>=(this.items||[]).length)return;let s=this.dimensionsView,n=Math.floor(t/s.itemsPerRow)*s.childHeight-s.childHeight*Math.min(t,this.bufferAmount);this.element.nativeElement.scrollTo({left:0,top:n,behavior:"smooth"}),this.refresh()}checkChangesOnChat(e){this.selectedChat&&(e.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 e=this.chatIsScrolledToBottom(),t=this.chatIsScrolledToTop();t?this.saveChatScrollPosition(this.element.nativeElement.scrollHeight-this.element.nativeElement.scrollTop):e?this.saveChatScrollPosition(this.element.nativeElement.scrollHeight):this.saveChatScrollPosition(),this.ngZone.run(()=>{this.isScrollBottom.next(e),this.isScrollTop.next(t)})}saveChatScrollPosition(e=null){this.selectedChat.lastScrollPosition=e||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(e=!1){let t=window.innerHeight-this.resizeOffset;(e||this.element.nativeElement.offsetHeight!==t)&&this.renderer.setStyle(this.element.nativeElement,"height",`${t-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 e,t,s=this.contentElementRef.nativeElement.children;for(s[0]&&(s=s[0].children),t=0;t<s.length&&!(e!==void 0&&e!==s[t].offsetTop);t++)e=s[t].offsetTop;return t}else return 1}calculateDimensions(){let e=this.element.nativeElement,t=e.offsetWidth-e.clientWidth;this.scrollbarWidth!=t&&(this.resizeTableHeader(),this.scrollbarWidth=t);let n=(this.items||[]).length,h=e.clientWidth-this.scrollbarWidth,p=e.clientHeight,c;if(this.childWidth===void 0||this.childHeight===void 0){let F=this.contentElementRef.nativeElement;c=F.children[0]?F.children[0].getBoundingClientRect():{width:h,height:p}}let o=this.childWidth||c.width,m=this.childHeight||c.height,a=this.countItemsPerRow(),f=Math.max(1,Math.floor(h/o));this.galleryMode&&a===0?a=f:a=Math.max(1,a);let l=Math.max(1,Math.floor(p/m)),g=e.scrollTop,ve=Math.max(0,g),b=m*Math.ceil(n/a);l===1&&Math.floor(ve/b*n)+f>=n&&(a=f),b!==this.lastScrollHeight&&(this.renderer.setStyle(this.shimElementRef.nativeElement,"height",`${b}px`),this.lastScrollHeight=b),this.dimensionsView={itemCount:n,viewWidth:h,viewHeight:p,childWidth:o,childHeight:m,itemsPerRow:a,itemsPerCol:l,itemsPerRowByCalc:f,scrollHeight:b}}calculateItems(){let e=this.element.nativeElement,t=this.dimensionsView,s=this.items||[],n=this.galleryMode?this.bufferAmount*t.itemsPerRowByCalc:this.bufferAmount,h=e.scrollTop;h>t.scrollHeight&&(h=t.scrollHeight);let c=Math.max(0,h)/t.scrollHeight*t.itemCount/t.itemsPerRow,o=Math.min(t.itemCount,Math.ceil(c)*t.itemsPerRow+t.itemsPerRow*(t.itemsPerCol+1)),m=o,a=o%t.itemsPerRow;a&&(m=o+t.itemsPerRow-a);let f=Math.max(0,m-t.itemsPerCol*t.itemsPerRow-t.itemsPerRow),l=Math.min(f,Math.floor(c)*t.itemsPerRow),g=s==null||s.length===0?0:t.childHeight*Math.ceil(l/t.itemsPerRow)-t.childHeight*Math.min(l,this.bufferAmount);g!==this.lastTopPadding&&(this.renderer.setStyle(this.contentElementRef.nativeElement,"transform",`translateY(${g}px)`),this.renderer.setStyle(this.contentElementRef.nativeElement,"webkitTransform",`translateY(${g}px)`),this.lastTopPadding=g),l=isNaN(l)?-1:l,o=isNaN(o)?-1:o,l-=n,l=Math.max(0,l),o+=n,o=Math.min(s.length,o),l!==this.previousStart||o!==this.previousEnd?(this.ngZone.run(()=>{this.viewPortItems=s.slice(l,o>=0?o:0)}),this.previousStart=l,this.previousEnd=o,this.startupLoop===!0&&this.refresh()):this.startupLoop===!0&&(this.startupLoop=!1,this.refresh(!0))}};i.\u0275fac=function(t){return new(t||i)},i.\u0275cmp=x({type:i,selectors:[["app-virtual-scroll"]],viewQuery:function(t,s){if(t&1&&(T(Te,7,v),T(Se,7,v)),t&2){let n;S(n=y())&&(s.contentElementRef=n.first),S(n=y())&&(s.shimElementRef=n.first)}},inputs:{resizeOffset:"resizeOffset",galleryMode:"galleryMode",selectedChat:"selectedChat",items:"items",childHeight:"childHeight",childWidth:"childWidth",bufferAmount:"bufferAmount"},outputs:{isScrollBottom:"isScrollBottom",isScrollTop:"isScrollTop"},features:[Y],ngContentSelectors:ye,decls:5,vars:0,consts:[["shim",""],["content",""],[1,"total-padding"],[1,"scrollable-content"]],template:function(t,s){t&1&&(ee(),J(0,"div",2,0),q(2,"div",3,1),te(4),U())},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 $e=(()=>{let i=class i{constructor(){this.maxMove=10,this.maxDuration=350,this.doubleTapInterval=600,this.doubleTapSlop=24,this.enableDoubleTap=!0,this.emitSingleWhenNoDouble=!1,this.preventGhostClick=!0,this.preventDefault=!1,this.disabled=!1,this.appTap=new C,this.elRef=u(v),this.zone=u(P),this.removeFns=[],this.active=!1,this.pointerId=null,this.startX=0,this.startY=0,this.startTime=0,this.moved=!1,this.lastEmitTs=0,this.pendingSingle=null,this.singleTimer=null,this.onDown=e=>{this.disabled||e.button!==0||this.active||(this.active=!0,this.pointerId=e.pointerId,this.startX=e.clientX,this.startY=e.clientY,this.startTime=e.timeStamp,this.moved=!1,e.target.setPointerCapture?.(e.pointerId))},this.onMove=e=>{if(!(!this.active||e.pointerId!==this.pointerId)&&!this.moved){let t=Math.abs(e.clientX-this.startX),s=Math.abs(e.clientY-this.startY);(t>this.maxMove||s>this.maxMove)&&(this.moved=!0)}},this.onUp=e=>{if(!this.active||e.pointerId!==this.pointerId)return;let t=e.timeStamp-this.startTime,s=Math.abs(e.clientX-this.startX),n=Math.abs(e.clientY-this.startY),h=!this.moved&&s<=this.maxMove&&n<=this.maxMove&&t<=this.maxDuration;if(this.resetGesture(),!h)return;this.preventDefault&&e.preventDefault();let p=performance.now(),c=e.clientX,o=e.clientY;if(!this.enableDoubleTap){this.emit("single",c,o,e);return}if(this.pendingSingle){let m=p-this.pendingSingle.t,a=Math.hypot(c-this.pendingSingle.x,o-this.pendingSingle.y);if(m<=this.doubleTapInterval&&a<=this.doubleTapSlop){clearTimeout(this.singleTimer),this.singleTimer=null,this.pendingSingle=null,this.emit("double",c,o,e);return}}this.pendingSingle={x:c,y:o,t:p},clearTimeout(this.singleTimer),this.singleTimer=setTimeout(()=>{if(this.emitSingleWhenNoDouble){let m=this.pendingSingle;this.emit("single",m.x,m.y)}this.pendingSingle=null,this.singleTimer=null},this.doubleTapInterval)},this.onCancel=()=>this.resetGesture(),this.onKey=e=>{if(this.disabled)return;let t=e.key.toLowerCase();if(t==="enter"||t===" "){if(e.preventDefault(),this.enableDoubleTap&&!this.emitSingleWhenNoDouble)return;this.emit("single",0,0,e)}},this.onContextMenu=e=>{this.preventDefault&&e.preventDefault()},this.onNativeClick=e=>{this.preventGhostClick&&performance.now()-this.lastEmitTs<350&&(e.stopImmediatePropagation(),e.stopPropagation(),e.preventDefault())},this.el=this.elRef.nativeElement,this.zone.runOutsideAngular(()=>{this.add("pointerdown",this.onDown,{passive:!0}),this.add("pointermove",this.onMove,{passive:!0}),this.add("pointerup",this.onUp,{passive:!1}),this.add("pointercancel",this.onCancel,{passive:!0}),this.add("pointerleave",this.onCancel,{passive:!0}),this.add("keydown",this.onKey,{passive:!1}),this.add("contextmenu",this.onContextMenu,{passive:!1}),this.add("click",this.onNativeClick,{passive:!1,capture:!0})})}ngOnDestroy(){for(let e of this.removeFns)e();this.removeFns=[],clearTimeout(this.singleTimer)}emit(e,t,s,n){this.lastEmitTs=performance.now(),this.zone.run(()=>this.appTap.emit({x:t,y:s,type:e,sourceEvent:n}))}add(e,t,s){this.el.addEventListener(e,t,s),this.removeFns.push(()=>this.el.removeEventListener(e,t,s))}resetGesture(){this.active=!1,this.pointerId=null,this.startTime=0}};i.\u0275fac=function(t){return new(t||i)},i.\u0275dir=Z({type:i,selectors:[["","appTap",""]],hostAttrs:[2,"touch-action","manipulation","-webkit-tap-highlight-color","transparent"],inputs:{maxMove:"maxMove",maxDuration:"maxDuration",doubleTapInterval:"doubleTapInterval",doubleTapSlop:"doubleTapSlop",enableDoubleTap:"enableDoubleTap",emitSingleWhenNoDouble:"emitSingleWhenNoDouble",preventGhostClick:"preventGhostClick",preventDefault:"preventDefault",disabled:"disabled"},outputs:{appTap:"appTap"}});let r=i;return r})();var Je=(()=>{let i=class i{transform(e,t,s){return!e?.length||!t?e:de(t,e,s)}};i.\u0275fac=function(t){return new(t||i)},i.\u0275pipe=j({name:"searchFilter",type:i,pure:!0});let r=i;return r})();var ge=class{constructor(i,d){this.defaultId="default",this.keyStore=`sortBy${i}`,this.sortSettings=d,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,d=!0,e){if(!(i in this.sortSettings))return e;d&&(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 t of this.sortSettings[i])fe(t.type,e,t.prop,i===this.defaultId?!1:this.sortParam.asc);return[...e]}};export{_e as a,Ye as b,$e as c,Je as d,ge as e};
@@ -1 +1 @@
1
- import{k as b}from"./chunk-3XVM35O2.js";import{b as u,e as h}from"./chunk-UJPPR4MX.js";import{$a as f,Dd as g,Ha as d,Na as o,Ne as x,Qb as s,Rb as v,dg as R,hg as E,ia as p,qb as c,rb as t,sb as i,tb as r}from"./chunk-C36MW4ME.js";import"./chunk-N3U6637P.js";var A=(()=>{let e=class e{constructor(){this.logoUrl=b,this.icons={faExclamationCircle:x},this.activatedRoute=p(u),this.activatedRoute.params.subscribe(l=>this.error=E[l.error])}};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=f({type:e,selectors:[["app-public-link-error"]],decls:14,vars:3,consts:[[1,"link-page"],[1,"header"],["routerLink",""],["alt","","height","40",3,"src"],["size","4x",1,"text-white",3,"icon"],["l10nTranslate","",1,"error-code","mt-2",2,"font-size","24px"],[1,"error-text"],[1,"hr"],["l10nTranslate",""]],template:function(n,m){n&1&&(t(0,"div",0)(1,"div",1)(2,"a",2),r(3,"img",3),i()(),r(4,"fa-icon",4),t(5,"div",5),s(6,"Link error"),i(),t(7,"div",6),r(8,"span",7)(9,"br"),t(10,"span",8),s(11),i(),r(12,"br")(13,"br"),i()()),n&2&&(o(3),c("src",m.logoUrl,d),o(),c("icon",m.icons.faExclamationCircle),o(7),v(m.error))},dependencies:[h,g,R],encapsulation:2});let a=e;return a})();export{A as PublicLinkErrorComponent};
1
+ import{k as b}from"./chunk-3XVM35O2.js";import{b as u,e as h}from"./chunk-RV3VZJPZ.js";import{$a as f,Ed as g,Ha as d,Na as o,Oe as x,Qb as s,Rb as v,eg as R,ia as p,ig as E,qb as c,rb as t,sb as i,tb as r}from"./chunk-DIT6W7VM.js";import"./chunk-N3U6637P.js";var A=(()=>{let e=class e{constructor(){this.logoUrl=b,this.icons={faExclamationCircle:x},this.activatedRoute=p(u),this.activatedRoute.params.subscribe(l=>this.error=E[l.error])}};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=f({type:e,selectors:[["app-public-link-error"]],decls:14,vars:3,consts:[[1,"link-page"],[1,"header"],["routerLink",""],["alt","","height","40",3,"src"],["size","4x",1,"text-white",3,"icon"],["l10nTranslate","",1,"error-code","mt-2",2,"font-size","24px"],[1,"error-text"],[1,"hr"],["l10nTranslate",""]],template:function(n,m){n&1&&(t(0,"div",0)(1,"div",1)(2,"a",2),r(3,"img",3),i()(),r(4,"fa-icon",4),t(5,"div",5),s(6,"Link error"),i(),t(7,"div",6),r(8,"span",7)(9,"br"),t(10,"span",8),s(11),i(),r(12,"br")(13,"br"),i()()),n&2&&(o(3),c("src",m.logoUrl,d),o(),c("icon",m.icons.faExclamationCircle),o(7),v(m.error))},dependencies:[h,g,R],encapsulation:2});let a=e;return a})();export{A as PublicLinkErrorComponent};
@@ -1 +1 @@
1
- import{e as B}from"./chunk-V3AT2BKP.js";import"./chunk-VKK5BSLX.js";import{c as I,d as M,h as R,k as j,m as z}from"./chunk-3XVM35O2.js";import"./chunk-BIKLW4YS.js";import"./chunk-SHIVUDP3.js";import{b as P,e as w}from"./chunk-UJPPR4MX.js";import"./chunk-HNQRZALS.js";import{Jb as A}from"./chunk-GUGNR5TF.js";import{$a as L,Ab as U,Cd as E,Db as _,Dd as T,Fb as c,Ha as h,Na as a,Qb as m,Rb as v,Tb as b,dg as D,ec as x,gc as C,ia as u,kb as f,lb as k,na as g,oa as S,qb as p,rb as o,sb as r,tb as d,xd as y}from"./chunk-C36MW4ME.js";import"./chunk-DM4NXKEP.js";import"./chunk-ZIJQRARU.js";import"./chunk-N3U6637P.js";function N(e,i){if(e&1){let t=U();o(0,"img",14),_("error",function(){g(t);let s=c();return S(s.fallBackMimeUrl())}),r()}if(e&2){let t=c();p("src",t.mimeUrl,h)}}function V(e,i){if(e&1&&d(0,"fa-icon",7),e&2){let t=c();p("icon",t.icons.SPACES)("fixedWidth",!1)}}function F(e,i){if(e&1&&(d(0,"img",15),o(1,"span",16),m(2),r()),e&2){let t=c();p("src",t.link.owner.avatar,h),a(2),v(t.link.owner.fullName)}}function O(e,i){e&1&&(o(0,"span",13),m(1,"You have been invited to join this space"),r())}function W(e,i){if(e&1&&(o(0,"span"),m(1),x(2,"translate"),x(3,"translate"),r()),e&2){let t=c();a(),b("",C(2,2,"share with you this",t.locale.language)," ",C(3,5,t.link.share.isDir?"directory":"file",t.locale.language))}}function Y(e,i){e&1&&(o(0,"span",13),m(1,"You have been invited to join this share"),r())}var ie=(()=>{let i=class i{constructor(){this.locale=u(y),this.icons={SPACES:A.SPACES},this.logoUrl=j,this.mimeUrl=null,this.activatedRoute=u(P),this.linksService=u(B),this.activatedRoute.params.subscribe(n=>this.linkUUID=n.uuid),this.activatedRoute.data.subscribe(n=>this.setLink(n.link))}setLink(n){n.space||(this.mimeUrl=R(n.share.isDir?n.share.hasParent?M:I:n.share.mime)),this.link=n}followLink(){this.linksService.linkAccess(this.linkUUID,this.link)}fallBackMimeUrl(){this.mimeUrl=z}};i.\u0275fac=function(s){return new(s||i)},i.\u0275cmp=L({type:i,selectors:[["app-public-link"]],decls:18,vars:5,consts:[[1,"link-page"],[1,"header"],["routerLink",""],["alt","","height","40",3,"src"],[1,"d-flex","flex-column","align-content-center"],[1,"resource","d-flex","flex-column","align-items-center","mt-3","mx-auto","cursor-pointer",3,"click"],["alt","","height","96",1,"no-select-pointer",3,"src"],[1,"circle-primary-icon",2,"min-width","128px","min-height","128px","font-size","64px",3,"icon","fixedWidth"],[1,"error-code"],[1,"error-text","no-select"],[1,"hr"],[1,"d-flex","justify-content-center","align-items-center"],[1,"solve"],["l10nTranslate",""],["alt","","height","96",1,"no-select-pointer",3,"error","src"],["alt","","width","42","height","42",1,"avatar-base-img","me-3",3,"src"],[1,"oops","me-2"]],template:function(s,l){s&1&&(o(0,"div",0)(1,"div",1)(2,"a",2),d(3,"img",3),r()(),o(4,"div",4)(5,"div",5),_("click",function(){return l.followLink()}),f(6,N,1,1,"img",6)(7,V,1,2,"fa-icon",7),o(8,"span",8),m(9),r()()(),o(10,"div",9),d(11,"span",10),o(12,"div",11),f(13,F,3,2),o(14,"span",12),f(15,O,2,0,"span",13)(16,W,4,8,"span")(17,Y,2,0,"span",13),r()()()()),s&2&&(a(3),p("src",l.logoUrl,h),a(3),k(l.mimeUrl?6:7),a(3),v((l.link.share==null?null:l.link.share.name)||(l.link.space==null?null:l.link.space.name)),a(4),k(l.link.owner?13:-1),a(2),k(l.link.space?15:l.link.owner?16:17))},dependencies:[w,D,T,E],encapsulation:2});let e=i;return e})();export{ie as PublicLinkComponent};
1
+ import{e as B}from"./chunk-O6FYXVHI.js";import"./chunk-SJR5R3Y4.js";import{c as I,d as M,h as R,k as j,m as z}from"./chunk-3XVM35O2.js";import"./chunk-LVSNIS5P.js";import"./chunk-PNR6M34W.js";import{b as P,e as w}from"./chunk-RV3VZJPZ.js";import"./chunk-VQQKMY2C.js";import{Jb as A}from"./chunk-XDZGW64M.js";import{$a as L,Ab as U,Db as _,Dd as E,Ed as T,Fb as c,Ha as h,Na as a,Qb as m,Rb as v,Tb as b,ec as x,eg as D,gc as C,ia as u,kb as f,lb as k,na as g,oa as S,qb as p,rb as o,sb as r,tb as d,yd as y}from"./chunk-DIT6W7VM.js";import"./chunk-DM4NXKEP.js";import"./chunk-ZIJQRARU.js";import"./chunk-N3U6637P.js";function N(e,i){if(e&1){let t=U();o(0,"img",14),_("error",function(){g(t);let s=c();return S(s.fallBackMimeUrl())}),r()}if(e&2){let t=c();p("src",t.mimeUrl,h)}}function V(e,i){if(e&1&&d(0,"fa-icon",7),e&2){let t=c();p("icon",t.icons.SPACES)("fixedWidth",!1)}}function F(e,i){if(e&1&&(d(0,"img",15),o(1,"span",16),m(2),r()),e&2){let t=c();p("src",t.link.owner.avatar,h),a(2),v(t.link.owner.fullName)}}function O(e,i){e&1&&(o(0,"span",13),m(1,"You have been invited to join this space"),r())}function W(e,i){if(e&1&&(o(0,"span"),m(1),x(2,"translate"),x(3,"translate"),r()),e&2){let t=c();a(),b("",C(2,2,"share with you this",t.locale.language)," ",C(3,5,t.link.share.isDir?"directory":"file",t.locale.language))}}function Y(e,i){e&1&&(o(0,"span",13),m(1,"You have been invited to join this share"),r())}var ie=(()=>{let i=class i{constructor(){this.locale=u(y),this.icons={SPACES:A.SPACES},this.logoUrl=j,this.mimeUrl=null,this.activatedRoute=u(P),this.linksService=u(B),this.activatedRoute.params.subscribe(n=>this.linkUUID=n.uuid),this.activatedRoute.data.subscribe(n=>this.setLink(n.link))}setLink(n){n.space||(this.mimeUrl=R(n.share.isDir?n.share.hasParent?M:I:n.share.mime)),this.link=n}followLink(){this.linksService.linkAccess(this.linkUUID,this.link)}fallBackMimeUrl(){this.mimeUrl=z}};i.\u0275fac=function(s){return new(s||i)},i.\u0275cmp=L({type:i,selectors:[["app-public-link"]],decls:18,vars:5,consts:[[1,"link-page"],[1,"header"],["routerLink",""],["alt","","height","40",3,"src"],[1,"d-flex","flex-column","align-content-center"],[1,"resource","d-flex","flex-column","align-items-center","mt-3","mx-auto","cursor-pointer",3,"click"],["alt","","height","96",1,"no-select-pointer",3,"src"],[1,"circle-primary-icon",2,"min-width","128px","min-height","128px","font-size","64px",3,"icon","fixedWidth"],[1,"error-code"],[1,"error-text","no-select"],[1,"hr"],[1,"d-flex","justify-content-center","align-items-center"],[1,"solve"],["l10nTranslate",""],["alt","","height","96",1,"no-select-pointer",3,"error","src"],["alt","","width","42","height","42",1,"avatar-base-img","me-3",3,"src"],[1,"oops","me-2"]],template:function(s,l){s&1&&(o(0,"div",0)(1,"div",1)(2,"a",2),d(3,"img",3),r()(),o(4,"div",4)(5,"div",5),_("click",function(){return l.followLink()}),f(6,N,1,1,"img",6)(7,V,1,2,"fa-icon",7),o(8,"span",8),m(9),r()()(),o(10,"div",9),d(11,"span",10),o(12,"div",11),f(13,F,3,2),o(14,"span",12),f(15,O,2,0,"span",13)(16,W,4,8,"span")(17,Y,2,0,"span",13),r()()()()),s&2&&(a(3),p("src",l.logoUrl,h),a(3),k(l.mimeUrl?6:7),a(3),v((l.link.share==null?null:l.link.share.name)||(l.link.space==null?null:l.link.space.name)),a(4),k(l.link.owner?13:-1),a(2),k(l.link.space?15:l.link.owner?16:17))},dependencies:[w,D,T,E],encapsulation:2});let e=i;return e})();export{ie as PublicLinkComponent};