@sync-in/server 1.3.8 → 1.3.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +13 -0
- package/migrations/0001_square_mauler.sql +4 -0
- package/migrations/meta/0001_snapshot.json +2417 -0
- package/migrations/meta/_journal.json +7 -0
- package/package.json +19 -1
- package/server/app.service.spec.js +4 -4
- package/server/app.service.spec.js.map +1 -1
- package/server/applications/sync/schemas/sync-clients.schema.js +4 -4
- package/server/applications/sync/schemas/sync-clients.schema.js.map +1 -1
- package/server/applications/users/schemas/users.schema.js +4 -4
- package/server/applications/users/schemas/users.schema.js.map +1 -1
- package/server/configuration/config.constants.js +0 -4
- package/server/configuration/config.constants.js.map +1 -1
- package/server/configuration/config.loader.js +2 -2
- package/server/configuration/config.loader.js.map +1 -1
- package/server/infrastructure/database/configuration.js +1 -1
- package/server/infrastructure/database/configuration.js.map +1 -1
- package/server/infrastructure/database/constants.js +19 -5
- package/server/infrastructure/database/constants.js.map +1 -1
- package/static/{chunk-LATG3ZVP.js → chunk-3FX6ISDY.js} +1 -1
- package/static/chunk-3S4WNZ2T.js +7 -0
- package/static/chunk-4KESSWTF.js +1 -0
- package/static/{chunk-3PB73RWL.js → chunk-4TEHM3AS.js} +1 -1
- package/static/chunk-AY2GOSJ2.js +24 -0
- package/static/chunk-BW5PQAKK.js +4 -0
- package/static/{chunk-UEN7RH33.js → chunk-CLSVDV7J.js} +1 -1
- package/static/chunk-FJFNDK67.js +1 -0
- package/static/{chunk-VO5W2VKC.js → chunk-HUWQHCUX.js} +1 -1
- package/static/{chunk-EVYNK2XG.js → chunk-KFM544CA.js} +1 -1
- package/static/{chunk-6A5R4OPV.js → chunk-LB7B5RIV.js} +1 -1
- package/static/{chunk-JM5PB2NQ.js → chunk-LYTD6AJE.js} +1 -1
- package/static/{chunk-Z6S7RFGN.js → chunk-MK7WZG3F.js} +1 -1
- package/static/{chunk-3UFSZ24R.js → chunk-MTRNPGS4.js} +1 -1
- package/static/{chunk-XN4TXQKE.js → chunk-MWFRZBJD.js} +1 -1
- package/static/{chunk-BEC2WQVF.js → chunk-N3T57OCA.js} +1 -1
- package/static/{chunk-L4F2K2VQ.js → chunk-NV2MEIWP.js} +1 -1
- package/static/{chunk-FNO4KAYG.js → chunk-O4AQBQBF.js} +1 -1
- package/static/{chunk-6E5YHOWA.js → chunk-O67RFAWU.js} +1 -1
- package/static/{chunk-YTROXGRM.js → chunk-PYSFXLMV.js} +1 -1
- package/static/{chunk-BEJ62KA7.js → chunk-QTW62OKJ.js} +1 -1
- package/static/chunk-RSNLYAN6.js +560 -0
- package/static/{chunk-BLRDUWOI.js → chunk-S5WXHO6D.js} +1 -1
- package/static/{chunk-VCXIQZT4.js → chunk-SH5EVL4E.js} +4 -4
- package/static/{chunk-F2KKCIDO.js → chunk-SKDQM65G.js} +1 -1
- package/static/{chunk-WSVE6EWB.js → chunk-SRLMFJ7C.js} +1 -1
- package/static/{chunk-OWYD7F64.js → chunk-TTQ37MUV.js} +1 -1
- package/static/chunk-WL65GYD5.js +4 -0
- package/static/{chunk-I6ACCGIM.js → chunk-WLPYIJFI.js} +1 -1
- package/static/chunk-XE5YHU5J.js +1 -0
- package/static/{chunk-VSBD6246.js → chunk-XUZSYWRF.js} +1 -1
- package/static/{chunk-4YWOE6HM.js → chunk-Z5X7LVMZ.js} +1 -1
- package/static/{chunk-MWPC5XQW.js → chunk-ZFKCGL6X.js} +1 -1
- package/static/chunk-ZTXJC5IC.js +1 -0
- package/static/index.html +1 -1
- package/static/main-RREKR34B.js +10 -0
- package/static/{polyfills-GNKGQMRJ.js → polyfills-IA5XWQYN.js} +1 -1
- package/static/{scripts-263WP5VB.js → scripts-VZVAP2P4.js} +4 -4
- package/sync-in-server.js +1 -1
- package/static/chunk-CIGVDQPA.js +0 -1
- package/static/chunk-CY3GGCEX.js +0 -7
- package/static/chunk-DJRILQTU.js +0 -1
- package/static/chunk-EDLO4Y5E.js +0 -4
- package/static/chunk-ENDRPUCI.js +0 -4
- package/static/chunk-HXRRMHEX.js +0 -1
- package/static/chunk-IJDFKCZM.js +0 -24
- package/static/chunk-J6YSVODR.js +0 -1
- package/static/chunk-JQOMI5VI.js +0 -560
- package/static/main-7LVJ2JSP.js +0 -10
package/static/chunk-ENDRPUCI.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{g as lt,h as ct}from"./chunk-DJRILQTU.js";import{B as x,Ib as st,Kb as at,Mb as rt,Qb as ot,Xa as nt,e as Te,g as Z,j as qe,k as he,m as Y,n as Oe,o as de,t as pe,ua as it,v as Je,w as Xe}from"./chunk-EDLO4Y5E.js";import{$ as ee,$b as Ue,Ac as le,Cb as C,Dc as He,E as Me,Eb as l,Ed as Ze,Fa as j,Fb as Pe,Fd as Ye,Ga as fe,Gb as Le,Gc as Ne,H as Ae,Hc as ce,Ib as $,J as ue,Jb as W,Kb as K,Lb as H,Ma as h,Mb as De,Na as Fe,Nb as F,Ob as re,Pb as b,Qa as U,Qb as T,Ra as u,Sa as ne,Tb as ge,Ub as ve,Vb as Ce,Xa as V,Xb as Re,Ya as se,Z as ke,Za as k,Zb as be,Zc as ze,_a as B,a as Ee,ab as O,ad as je,bb as v,c as we,ca as te,cb as ae,cc as xe,da as ie,dc as I,dd as $e,ec as Ve,ed as We,fc as P,ha as M,hc as G,ib as L,jb as S,jd as Ke,k as me,kb as E,kf as et,ma as y,na as _,nb as ye,o as Ie,ob as _e,of as tt,pb as d,qb as p,qc as Q,r as J,rb as m,sb as g,wd as Ge,x as X,xc as Be,ya as A,yd as Qe,zb as w,zc as oe}from"./chunk-JQOMI5VI.js";var li=(()=>{let n=class n{transform(e,t="L HH:mm:ss"){return e?(0,x.default)(e).format(t):""}};n.\u0275fac=function(t){return new(t||n)},n.\u0275pipe=B({name:"amDateFormat",type:n,pure:!0});let s=n;return s})();var _t=["*"],gt=s=>["nav-item",s];function vt(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 Ct(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,vt,2,0,"span",6),m()()}if(s&2){let a=n.$implicit;F("active",a.active)("disabled",a.disabled),d("ngClass",Ue(15,gt,a.customClass||"")),h(),F("active",a.active)("disabled",a.disabled),L("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 bt=(()=>{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(ne))},n.\u0275dir=k({type:n,selectors:[["","ngTransclude",""]],inputs:{ngTransclude:"ngTransclude"}});let s=n;return s})(),xt=(()=>{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})(),Tt=(()=>{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,Object.assign(this,e)}ngOnDestroy(){this.isDestroyed=!0}addTab(e){e.tabOrder!==void 0?this.insertTabByOrder(e):this.tabs.push(e),e.active=this.tabs.length===1&&!e.active}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(xt),u(U),u(A))},n.\u0275cmp=V({type:n,selectors:[["tabset"]],hostVars:2,hostBindings:function(t,i){t&2&&F("tab-container",i.clazz)},inputs:{vertical:"vertical",justified:"justified",type:"type"},ngContentSelectors:_t,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&&(Pe(),p(0,"ul",0),C("click",function(o){return o.preventDefault()}),O(1,Ct,5,17,"li",1),m(),p(2,"div",2),Le(3),m()),t&2&&(d("ngClass",i.classMap),L("aria-label",i.ariaLabel),h(),d("ngForOf",i.tabs))},dependencies:[Be,oe,bt,le],styles:["[_nghost-%COMP%] .nav-tabs[_ngcontent-%COMP%] .nav-item.disabled[_ngcontent-%COMP%] a.disabled[_ngcontent-%COMP%]{cursor:default}"]});let s=n;return s})(),Ot=(()=>{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(Tt),u(A),u(U))},n.\u0275dir=k({type:n,selectors:[["tab"],["","tab",""]],hostVars:7,hostBindings:function(t,i){t&2&&(L("id",i.id)("role",i.role)("aria-labelledby",i.ariaLabelledby),F("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})(),vi=(()=>{let n=class n{constructor(e,t){t.headingRef=e}};n.\u0275fac=function(t){return new(t||n)(u(Fe),u(Ot))},n.\u0275dir=k({type:n,selectors:[["","tabHeading",""]]});let s=n;return s})(),Ci=(()=>{let n=class n{static forRoot(){return{ngModule:n,providers:[]}}};n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=se({type:n}),n.\u0275inj=ie({imports:[ce]});let s=n;return s})();var Si=(()=>{let n=class n{constructor(){this.autoFocus=!0,this.autoSelect=!0,this.elementRef=M(A)}ngOnInit(){setTimeout(()=>{this.autoFocus&&this.elementRef.nativeElement.focus(),this.autoSelect&&this.elementRef.nativeElement.select()},0)}};n.\u0275fac=function(t){return new(t||n)},n.\u0275dir=k({type:n,selectors:[["","appAutofocus",""]],inputs:{autoFocus:"autoFocus",autoSelect:"autoSelect"}});let s=n;return s})();var ht=(()=>{let n=class n{constructor(){this.cdRef=M(Q),this.ngZone=M(ae)}format(e){return e.from((0,x.default)(),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((0,x.default)(e))):this.createTimer(),this.lastText}ngOnDestroy(){this.removeTimer()}createTimer(){if(this.currentTimer)return;let e=(0,x.default)(this.lastValue),t=this.getSecondsUntilUpdate(e)*1e3;this.currentTimer=this.ngZone.runOutsideAngular(()=>typeof window<"u"?window.setTimeout(()=>{this.lastText=this.formatFn((0,x.default)(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((0,x.default)().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.default.isDayjs(e)?e.valueOf():(0,x.default)(e).valueOf()}getLocale(e){return x.default.isDayjs(e)?e.locale():x.default.locale()}};n.\u0275fac=function(t){return new(t||n)},n.\u0275pipe=B({name:"amTimeAgo",type:n,pure:!1});let s=n;return s})();var Et=["ulElement"],wt=["liElements"],It=(s,n,a,e)=>({matches:s,itemTemplate:n,query:a,$implicit:e}),Mt=(s,n,a,e)=>({item:s,index:n,match:a,query:e});function At(s,n){}function kt(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),j)}}function Ft(s,n){if(s&1&&(p(0,"h6",8),b(1),m()),s&2){let a=l().$implicit;h(),T(a)}}function Pt(s,n){}function Lt(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,Pt,0,0,"ng-template",3),m()}if(s&2){let a=l(),e=a.$implicit,t=a.index,i=l(2),r=H(2);F("active",i.isActive(e)),d("id",i.popupId+"-"+t)("@typeaheadAnimation",i.animationState),h(2),d("ngTemplateOutlet",i.itemTemplate||r)("ngTemplateOutletContext",xe(6,Mt,e.item,t,e,i.query))}}function Dt(s,n){if(s&1&&O(0,Ft,2,1,"h6",6)(1,Lt,3,11,"ng-template",7),s&2){let a=n.$implicit;d("ngIf",a.isHeader()),h(),d("ngIf",!a.isHeader())}}function Rt(s,n){if(s&1&&O(0,Dt,2,2,"ng-template",5),s&2){let a=l();d("ngForOf",a.matches)}}var Ut={\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 z=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 q(s){return s?s.replace(/[^A-Za-z0-9[\] ]/g,function(n){return Ut[n]||n}):""}function Se(s,n=" ",a="",e){let t=[];if(!e)t=dt(s,n,a);else{let i=`([${e}]+)`,r=s.split(new RegExp(i,"g")),o=r[r.length-1];o>""&&(n&&a?t=dt(o,n,a):t.push(o))}return t}function dt(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 D(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 pt="220ms cubic-bezier(0, 0, 0.2, 1)",Vt=qe("typeaheadAnimation",[Oe("animated-down",Y({height:"*",overflow:"hidden"})),de("* => animated-down",[Y({height:0,overflow:"hidden"}),he(pt)]),Oe("animated-up",Y({height:"*",overflow:"hidden"})),de("* => animated-up",[Y({height:"*",overflow:"hidden"}),he(pt)]),de("* => unanimated",he("0s"))]),Bt=0,Ht=(()=>{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 Ee,this.height=0,this.popupId=`ngb-typeahead-${Bt++}`,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?q(i):i).toLowerCase(),o,c;if(typeof t=="object"){let f=t.length;for(let R=0;R<f;R+=1)o=r.indexOf(t[R]),c=t[R].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)}????????${"??".repeat(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=Te.getStyles(this.ulElement.nativeElement),t=Te.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(Z),u(U),u(A),u(Q))},n.\u0275cmp=V({type:n,selectors:[["typeahead-container"]],viewQuery:function(t,i){if(t&1&&($(Et,5),$(wt,5)),t&2){let r;W(r=K())&&(i.ulElement=r.first),W(r=K())&&(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&&(L("role","listbox"),De("height",i.needScrollbar?i.guiHeight:"auto")("visibility","inherit"),F("dropup",i.dropup))},outputs:{activeChangeEvent:"activeChange"},features:[be([Z])],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,At,0,0,"ng-template",3)(1,kt,1,1,"ng-template",null,0,G)(3,Rt,1,1,"ng-template",null,1,G),t&2){let r=H(2),o=H(4);d("ngTemplateOutlet",i.optionsListTemplate||o)("ngTemplateOutletContext",xe(2,It,i.matches,i.itemTemplate||r,i.query,i.typeaheadTemplateMethods))}},dependencies:[He,oe,le],styles:[".dropdown[_nghost-%COMP%]{z-index:1000}.dropdown-menu[_nghost-%COMP%], .dropdown-menu[_ngcontent-%COMP%]{overflow-y:auto;height:100px}"],data:{animation:[Vt]}});let s=n;return s})(),mt=(()=>{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})(),ut=(()=>{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:mt,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 z(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(Ht).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?q(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(ue(this.typeaheadWaitMs),ee(e=>this._allEnteredValue=e),ke(()=>this.typeahead?this.typeahead:me)).subscribe(e=>{this.finalizeAsyncCall(e)}))}syncActions(){this._subscriptions.push(this.keyUpEventEmitter.pipe(ue(this.typeaheadWaitMs),X(e=>{this._allEnteredValue=e;let t=this.normalizeQuery(e);return this.typeahead?(J(this.typeahead)?this.typeahead:Ie(this.typeahead)).pipe(Me(r=>!!r&&this.testMatch(this.normalizeOption(r),t)),Ae()):me})).subscribe(e=>{this.finalizeAsyncCall(e)}))}normalizeOption(e){let t=D(e,this.typeaheadOptionField);return(this.typeaheadLatinize?q(t):t).toLowerCase()}tokenizeQuery(e){let t=e;return this.typeaheadMultipleSearch&&this.typeaheadSingleWords?this.haveCommonCharacters(`${this.typeaheadPhraseDelimiters}${this.typeaheadWordDelimiters}`,this.typeaheadMultipleSearchDelimiters)||(t=Se(t,this.typeaheadWordDelimiters,this.typeaheadPhraseDelimiters,this.typeaheadMultipleSearchDelimiters)):this.typeaheadSingleWords?t=Se(t,this.typeaheadWordDelimiters,this.typeaheadPhraseDelimiters):t=Se(t,void 0,void 0,this.typeaheadMultipleSearchDelimiters),t}normalizeQuery(e){let t=(this.typeaheadLatinize?q(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?q(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=>D(c,this.typeaheadGroupField)).filter((c,f,R)=>R.indexOf(c)===f).forEach(c=>{r.push(new z(c,c,!0)),r=r.concat(i.filter(f=>D(f,this.typeaheadGroupField)===c).map(f=>new z(f,D(f,this.typeaheadOptionField))))}),this._matches=r}else this._matches=i.map(r=>new z(r,D(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=D(r,t),f=D(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
|
-
from delimiters used in typeaheadWordDelimiters (current value: ${this.typeaheadWordDelimiters}) and
|
|
3
|
-
typeaheadPhraseDelimiters (current value: ${this.typeaheadPhraseDelimiters}).
|
|
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(mt),u(Q),u(A),u($e),u(U),u(ne))},n.\u0275dir=k({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&&L("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:[be([pe,Z])]});let s=n;return s})(),ft=(()=>{let n=class n{static forRoot(){return{ngModule:n,providers:[]}}};n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=se({type:n}),n.\u0275inj=ie({imports:[ce]});let s=n;return s})();var yt=(()=>{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=B({name:"highlight",type:n,pure:!0});let s=n;return s})();var zt=["InputTypeHead"],jt=(s,n)=>n.mid,$t=(s,n)=>n.key;function Wt(s,n){if(s&1&&g(0,"img",7),s&2){let a=l().item;d("src",a.avatarUrl,fe)}}function Kt(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 Gt(s,n){if(s&1&&(g(0,"span",10),I(1,"highlight")),s&2){let a=l().item,e=l();d("innerHTML",P(1,1,a.description,e.selection),j)}}function Qt(s,n){if(s&1&&(p(0,"div",5)(1,"div",6),S(2,Wt,1,1,"img",7)(3,Kt,1,3,"fa-icon",8),m(),p(4,"div"),g(5,"div",9),I(6,"highlight"),S(7,Gt,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(Re("d-flex ms-2 pe-5 ",a.description?"flex-column align-items-start":"align-items-center")),h(),d("innerHTML",P(6,7,a.name,e.selection),j),h(2),E(a.description?7:-1),h(3),T(a.type)}}function Zt(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())}),Ce("ngModelChange",function(t){y(a);let i=l();return ve(i.selection,t)||(i.selection=t),_(t)}),m()}if(s&2){let a=l(),e=H(1);ge("ngModel",a.selection),d("placeholder",P(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 Yt(s,n){if(s&1&&g(0,"img",7),s&2){let a=l().$implicit;d("src",a.avatarUrl,fe)}}function qt(s,n){if(s&1&&g(0,"fa-icon",17),s&2){let a=l(2);d("icon",a.icons.LINKS)}}function Jt(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 Xt(s,n){if(s&1&&(p(0,"span",21),b(1),m()),s&2){let a=l().$implicit;h(),T(a.description)}}function ei(s,n){if(s&1&&(p(0,"span",22),b(1),m()),s&2){let a=l().$implicit;h(),T(a.type)}}function ti(s,n){if(s&1){let a=w();p(0,"button",32),I(1,"translate"),Ce("ngModelChange",function(t){y(a);let i=l().$implicit,r=l(3).$implicit;return ve(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();ge("ngModel",e.hPerms[a.key]),d("tooltip",P(1,3,t.SPACES_PERMISSIONS_TEXT[a.key].text,t.locale.language)),h(2),d("icon",t.SPACES_PERMISSIONS_TEXT[a.key].icon)}}function ii(s,n){if(s&1&&S(0,ti,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 ni(s,n){if(s&1&&(ye(0,ii,1,1,null,null,$t),I(2,"keyvalue"),g(3,"div",30)),s&2){let a=l(2).$implicit,e=l();_e(P(2,0,a.hPerms,e.originalOrderKeyValue))}}function si(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",P(1,2,"Edit",a.locale.language)),h(2),d("icon",a.icons.faPen)}}function ai(s,n){if(s&1){let a=w();p(0,"div",26),g(1,"div",27),S(2,ni,4,3),S(3,si,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",P(5,4,"Remove",a.locale.language)),h(2),d("icon",a.icons.faTimes)}}function ri(s,n){if(s&1&&(p(0,"div",4)(1,"div",15)(2,"div",16),S(3,Yt,1,1,"img",7)(4,qt,1,1,"fa-icon",17)(5,Jt,1,3,"fa-icon",8),p(6,"div",18)(7,"div",19),b(8),m(),p(9,"div",20),S(10,Xt,2,1,"span",21)(11,ei,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,ai,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(Ve(17,6,a.createdAt)),h(2),E(e.editMode?18:-1)}}var xn=(()=>{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=M(Qe),this.MEMBER_TYPE=rt,this.originalOrderKeyValue=nt,this.SPACES_PERMISSIONS_TEXT=at,this.icons={GROUPS:it.GROUPS,LINKS:st.LINKS,faTimes:et,faPen:tt},this.selection="",this.ngZone=M(ae),this.defaultPlaceholder="Type to search for users or groups to add",this.placeHolder=this.defaultPlaceholder,this.lastResults=[],this.asyncSearchUsersOrGroups=new we(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=ot(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=V({type:n,selectors:[["app-user-search"]],viewQuery:function(t,i){if(t&1&&$(zt,5),t&2){let r;W(r=K())&&(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,Qt,11,10,"ng-template",null,0,G),S(2,Zt,3,13,"input",2),p(3,"div",3),ye(4,ri,19,8,"div",4,jt),m()),t&2&&(h(2),E(i.hideInput?-1:2),h(2),_e(i.members))},dependencies:[ft,ut,Ge,je,We,Ke,ze,Ye,ct,lt,Xe,Je,Ze,ht,yt,Ne],encapsulation:2});let s=n;return s})();export{li as a,Tt as b,Ot as c,vi as d,Ci as e,Si as f,yt as g,ht as h,xn as i};
|
package/static/chunk-HXRRMHEX.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{f as P}from"./chunk-DJRILQTU.js";import{Ba as d,U as g,Va as C,X as N,cb as E,kb as H,oa as O,sa as f,wb as k,xb as F}from"./chunk-EDLO4Y5E.js";import{d as T}from"./chunk-J6YSVODR.js";import{$ as I,G as h,O as m,Oc as R,Z as x,ca as A,ha as n,p as c,q as _,v as p}from"./chunk-JQOMI5VI.js";var a=function(r){return r.ACCESS="access",r.REFRESH="refresh",r.WS="ws",r.CSRF="csrf",r}(a||{});var s=function(r){return r.BASE="/api/auth",r.LOGIN="login",r.LOGOUT="logout",r.REFRESH="refresh",r.TOKEN="token",r.TOKEN_REFRESH="token/refresh",r.WS="socket.io",r}(s||{}),U=`${s.BASE}/${s.LOGIN}`,K=`${s.BASE}/${s.LOGOUT}`,l=`${s.BASE}/${s.REFRESH}`,M=`${s.BASE}/${s.TOKEN}`,W=`${s.BASE}/${s.TOKEN_REFRESH}`,b=`/${s.WS}`;var u="sync-in-csrf";var y=[a.REFRESH,a.ACCESS,a.WS,a.CSRF];var L="Client token is expired";var S={BASE:"auth",LOGIN:"login"};var fe=(()=>{let o=class o{constructor(){this.http=n(R),this.router=n(T),this.store=n(H),this.userService=n(P),this.layout=n(F),this.electron=n(k),this._refreshExpiration=parseInt(localStorage.getItem("refresh_expiration")||"0",10)||0,this._accessExpiration=parseInt(localStorage.getItem("access_expiration")||"0",10)||0}get refreshExpiration(){return this._refreshExpiration}set refreshExpiration(e){this._refreshExpiration=e!==0?e+60:e,localStorage.setItem("refresh_expiration",e.toString())}get accessExpiration(){return this._accessExpiration}set accessExpiration(e){this._accessExpiration=e!==0?e+60:e,localStorage.setItem("access_expiration",e.toString())}login(e,t){return this.http.post(U,{login:e,password:t}).pipe(p(i=>(this.accessExpiration=i.token.access_expiration,this.refreshExpiration=i.token.refresh_expiration,this.userService.initUser(i.user),{success:!0,message:null})),h(i=>(console.warn(i),c({success:!1,message:i.error.message||i.message}))))}loginElectron(){return this.electron.authenticate().pipe(x(e=>this.http.post(g,e).pipe(p(t=>(this.accessExpiration=t.token.access_expiration,this.refreshExpiration=t.token.refresh_expiration,this.userService.initUser(t.user),t?.client_token_update&&this.electron.send(E.SERVER.AUTHENTICATION_TOKEN_UPDATE,t.client_token_update),!0)),h(t=>(console.warn(t),t.error.message===L?this.electron.send(E.SERVER.AUTHENTICATION_TOKEN_EXPIRED):this.electron.send(E.SERVER.AUTHENTICATION_FAILED),c(!1))))))}logout(e=!0,t=!1){if((e||t)&&this.store.userImpersonate()){this.logoutImpersonateUser();return}this.userService.disconnectWebSocket(),this.clearCookies().pipe(m(()=>{this.accessExpiration=0,this.refreshExpiration=0,this.layout.clean(),this.store.clean(),e&&this.router.navigate([S.BASE,S.LOGIN]).catch(console.error),t&&this.layout.sendNotification("warning","Session has expired","Please sign in")})).subscribe()}logoutImpersonateUser(){this.http.post(O,null).subscribe({next:e=>{this.userService.disconnectWebSocket(),this.initUserFromResponse(e),this.router.navigate([f.BASE,f.ACCOUNT]).catch(console.error)},error:e=>{console.error(e),this.layout.sendNotification("error","Impersonate identity","logout",e)}})}initUserFromResponse(e,t=!1){e!==null&&(this.accessExpiration=e.token.access_expiration,this.refreshExpiration=e.token.refresh_expiration,this.userService.initUser(e.user,t))}isLogged(){return!this.refreshTokenHasExpired()}refreshToken(){return this.http.post(l,null).pipe(p(e=>(this.accessExpiration=e.access_expiration,this.refreshExpiration=e.refresh_expiration,console.debug("refresh token done"),!0)),h(e=>(console.debug("token has expired"),this.electron.enabled?(console.debug("login with app"),this.loginElectron()):(this.logout(!0,!0),_(()=>e)))))}checkUserAuthAndLoad(e){return this.refreshTokenHasExpired()?this.electron.enabled?this.loginElectron():(this.returnUrl=e.length>1?e:null,this.logout(),c(!1)):this.store.user.getValue()?c(!0):this.http.get(N).pipe(I(t=>this.userService.initUser(t.user)),p(()=>!0),h(t=>(t.status===401?this.logout():console.warn(t),c(!1))))}checkCSRF(e){return e.headers.has(u)?e.clone({headers:e.headers.set(u,C(u))}):e}refreshTokenHasExpired(){return this.refreshExpiration===0||d()>=this.refreshExpiration}clearCookies(){return this.http.post(K,null)}};o.\u0275fac=function(t){return new(t||o)},o.\u0275prov=A({token:o,factory:o.\u0275fac,providedIn:"root"});let r=o;return r})();export{U as a,K as b,l as c,u as d,S as e,fe as f};
|
package/static/chunk-IJDFKCZM.js
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import{a as m1}from"./chunk-MWPC5XQW.js";import{c as d1}from"./chunk-JXZCNFW7.js";import{a as r1}from"./chunk-6A5R4OPV.js";import{a as n1,b as o1,c as a1,d as s1,e as l1,f as Qt,i as c1}from"./chunk-ENDRPUCI.js";import{b as u1,c as Jt,d as h1,e as Zt}from"./chunk-3PB73RWL.js";import{a as f1,d as Et,g as ct}from"./chunk-CIGVDQPA.js";import{f as Xt}from"./chunk-DJRILQTU.js";import{Aa as Yn,Ab as t1,Ba as Xn,Hb as Yt,Ib as W,Ja as nt,Jb as st,La as rt,Ma as Qn,O as Ve,Za as Ii,f as Rn,ib as Jn,kb as ot,mb as at,nb as Z,ob as Me,qb as Zn,xb as U,yb as e1,za as Kn}from"./chunk-EDLO4Y5E.js";import{c as Ne,d as p1,h as He,m as lt}from"./chunk-ZZ3LHYOY.js";import{d as An}from"./chunk-J6YSVODR.js";import{$ as gn,$b as St,$c as Dn,Ab as xn,Ac as Ee,C as mn,Cb as b,Db as En,Dc as ke,Eb as u,Ed as In,Fb as Mn,Fd as ae,Ga as kt,Gb as Nn,Gf as Gn,Hb as yt,Hc as Ln,Ib as Vt,If as $n,Jb as _e,Jd as Pn,Je as Hn,Kb as xe,L as Ke,La as Mi,Lb as Ai,Ma as l,Mb as Pe,Mc as Ti,Na as Ni,Nb as q,Ob as Qe,Oc as jt,Pb as p,Qa as Xe,Qb as k,Rb as J,Re as Bn,Rf as qn,Sa as wi,Tb as Je,Ub as Ze,Vb as et,Wf as Wn,X as vn,Xa as D,Xb as tt,Xc as On,Ya as Cn,Za as Te,Zb as Di,Zc as oe,_a as yn,_b as Fe,_e as jn,ab as z,ad as Ut,bb as j,bc as wn,bf as Kt,ca as ye,cb as zi,cc as Ht,cg as i1,da as bn,dc as fe,ec as Bt,ed as Gt,f as pn,fc as _t,ha as h,hc as xt,jb as L,jd as $t,kb as O,ke as Fn,kf as Un,ma as _,na as x,nb as Sn,ob as _n,pb as f,pe as kn,qb as c,rb as d,sb as g,se as Vn,tb as Li,td as qt,u as hn,ub as Oi,v as Ei,va as Ft,wb as Ie,wd as Wt,xb as Re,xd as Tn,ya as Ye,yb as Se,yd as it,zb as F,zc as zn}from"./chunk-JQOMI5VI.js";import{a as Q,b as De}from"./chunk-RTRJ3KFH.js";var C0={prefix:"far",iconName:"bell",icon:[448,512,[128276,61602],"f0f3","M224 0c-13.3 0-24 10.7-24 24l0 9.7C118.6 45.3 56 115.4 56 200l0 14.5c0 37.7-10 74.7-29 107.3L5.1 359.2C1.8 365 0 371.5 0 378.2 0 399.1 16.9 416 37.8 416l372.4 0c20.9 0 37.8-16.9 37.8-37.8 0-6.7-1.8-13.3-5.1-19L421 321.7c-19-32.6-29-69.6-29-107.3l0-14.5c0-84.6-62.6-154.7-144-166.3l0-9.7c0-13.3-10.7-24-24-24zM392.4 368l-336.9 0 12.9-22.1C91.7 306 104 260.6 104 214.5l0-14.5c0-66.3 53.7-120 120-120s120 53.7 120 120l0 14.5c0 46.2 12.3 91.5 35.5 131.4L392.4 368zM156.1 464c9.9 28 36.6 48 67.9 48s58-20 67.9-48l-135.8 0z"]};var Ar={prefix:"far",iconName:"file-zipper",icon:[384,512,["file-archive"],"f1c6","M64 48l112 0 0 88c0 39.8 32.2 72 72 72l88 0 0 240c0 8.8-7.2 16-16 16L64 464c-8.8 0-16-7.2-16-16L48 64c0-8.8 7.2-16 16-16zM224 67.9l92.1 92.1-68.1 0c-13.3 0-24-10.7-24-24l0-68.1zM64 0C28.7 0 0 28.7 0 64L0 448c0 35.3 28.7 64 64 64l256 0c35.3 0 64-28.7 64-64l0-261.5c0-17-6.7-33.3-18.7-45.3L242.7 18.7C230.7 6.7 214.5 0 197.5 0L64 0zM80 104c0 13.3 10.7 24 24 24l16 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-16 0c-13.3 0-24 10.7-24 24zm0 80c0 13.3 10.7 24 24 24l32 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-32 0c-13.3 0-24 10.7-24 24zm64 56l-32 0c-17.7 0-32 14.3-32 32l0 48c0 26.5 21.5 48 48 48s48-21.5 48-48l0-48c0-17.7-14.3-32-32-32zm-16 64a16 16 0 1 1 0 32 16 16 0 1 1 0-32z"]},y0=Ar;var S0={prefix:"far",iconName:"clock",icon:[512,512,[128339,"clock-four"],"f017","M464 256a208 208 0 1 1 -416 0 208 208 0 1 1 416 0zM0 256a256 256 0 1 0 512 0 256 256 0 1 0 -512 0zM232 120l0 136c0 8 4 15.5 10.7 20l96 64c11 7.4 25.9 4.4 33.3-6.7s4.4-25.9-6.7-33.3L280 243.2 280 120c0-13.3-10.7-24-24-24s-24 10.7-24 24z"]};var ei={prefix:"far",iconName:"file",icon:[384,512,[128196,128459,61462],"f15b","M176 48L64 48c-8.8 0-16 7.2-16 16l0 384c0 8.8 7.2 16 16 16l256 0c8.8 0 16-7.2 16-16l0-240-88 0c-39.8 0-72-32.2-72-72l0-88zM316.1 160L224 67.9 224 136c0 13.3 10.7 24 24 24l68.1 0zM0 64C0 28.7 28.7 0 64 0L197.5 0c17 0 33.3 6.7 45.3 18.7L365.3 141.3c12 12 18.7 28.3 18.7 45.3L384 448c0 35.3-28.7 64-64 64L64 512c-35.3 0-64-28.7-64-64L0 64z"]};var _0={prefix:"far",iconName:"trash-can",icon:[448,512,[61460,"trash-alt"],"f2ed","M166.2-16c-13.3 0-25.3 8.3-30 20.8L120 48 24 48C10.7 48 0 58.7 0 72S10.7 96 24 96l400 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-96 0-16.2-43.2C307.1-7.7 295.2-16 281.8-16L166.2-16zM32 144l0 304c0 35.3 28.7 64 64 64l256 0c35.3 0 64-28.7 64-64l0-304-48 0 0 304c0 8.8-7.2 16-16 16L96 464c-8.8 0-16-7.2-16-16l0-304-48 0zm160 72c0-13.3-10.7-24-24-24s-24 10.7-24 24l0 176c0 13.3 10.7 24 24 24s24-10.7 24-24l0-176zm112 0c0-13.3-10.7-24-24-24s-24 10.7-24 24l0 176c0 13.3 10.7 24 24 24s24-10.7 24-24l0-176z"]};var x0={prefix:"far",iconName:"user",icon:[448,512,[128100,62144,62470,"user-alt","user-large"],"f007","M144 128a80 80 0 1 1 160 0 80 80 0 1 1 -160 0zm208 0a128 128 0 1 0 -256 0 128 128 0 1 0 256 0zM48 480c0-70.7 57.3-128 128-128l96 0c70.7 0 128 57.3 128 128l0 8c0 13.3 10.7 24 24 24s24-10.7 24-24l0-8c0-97.2-78.8-176-176-176l-96 0C78.8 304 0 382.8 0 480l0 8c0 13.3 10.7 24 24 24s24-10.7 24-24l0-8z"]};var E0={prefix:"far",iconName:"file-lines",icon:[384,512,[128441,128462,61686,"file-alt","file-text"],"f15c","M64 48l112 0 0 88c0 39.8 32.2 72 72 72l88 0 0 240c0 8.8-7.2 16-16 16L64 464c-8.8 0-16-7.2-16-16L48 64c0-8.8 7.2-16 16-16zM224 67.9l92.1 92.1-68.1 0c-13.3 0-24-10.7-24-24l0-68.1zM64 0C28.7 0 0 28.7 0 64L0 448c0 35.3 28.7 64 64 64l256 0c35.3 0 64-28.7 64-64l0-261.5c0-17-6.7-33.3-18.7-45.3L242.7 18.7C230.7 6.7 214.5 0 197.5 0L64 0zm56 256c-13.3 0-24 10.7-24 24s10.7 24 24 24l144 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-144 0zm0 96c-13.3 0-24 10.7-24 24s10.7 24 24 24l144 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-144 0z"]};var M0={prefix:"far",iconName:"comment-dots",icon:[512,512,[128172,62075,"commenting"],"f4ad","M0 240c0 54.4 19.3 104.6 51.9 144.9L3.1 474.3c-2 3.7-3.1 7.9-3.1 12.2 0 14.1 11.4 25.5 25.5 25.5 4 0 7.8-.6 11.5-2.1L153.4 460c31.4 12.9 66.1 20 102.6 20 141.4 0 256-107.5 256-240S397.4 0 256 0 0 107.5 0 240zM94 407.9c9.3-17.1 7.4-38.1-4.8-53.2-26.1-32.3-41.2-71.9-41.2-114.7 0-103.2 90.2-192 208-192s208 88.8 208 192-90.2 192-208 192c-30.2 0-58.7-5.9-84.3-16.4-11.9-4.9-25.3-4.8-37.1 .3L76 440.9 94 407.9zM144 272a32 32 0 1 0 0-64 32 32 0 1 0 0 64zm144-32a32 32 0 1 0 -64 0 32 32 0 1 0 64 0zm80 32a32 32 0 1 0 0-64 32 32 0 1 0 0 64z"]};var N0={prefix:"far",iconName:"flag",icon:[448,512,[127988,61725],"f024","M48 24C48 10.7 37.3 0 24 0S0 10.7 0 24L0 488c0 13.3 10.7 24 24 24s24-10.7 24-24l0-100 80.3-20.1c41.1-10.3 84.6-5.5 122.5 13.4 44.2 22.1 95.5 24.8 141.7 7.4l34.7-13c12.5-4.7 20.8-16.6 20.8-30l0-279.7c0-23-24.2-38-44.8-27.7l-9.6 4.8c-46.3 23.2-100.8 23.2-147.1 0-35.1-17.6-75.4-22-113.5-12.5L48 52 48 24zm0 77.5l96.6-24.2c27-6.7 55.5-3.6 80.4 8.8 54.9 27.4 118.7 29.7 175 6.8l0 241.8-24.4 9.1c-33.7 12.6-71.2 10.7-103.4-5.4-48.2-24.1-103.3-30.1-155.6-17.1l-68.6 17.2 0-237z"]};var w0={prefix:"far",iconName:"window-restore",icon:[576,512,[],"f2d2","M512 80L224 80c-8.8 0-16 7.2-16 16l0 16-48 0 0-16c0-35.3 28.7-64 64-64l288 0c35.3 0 64 28.7 64 64l0 192c0 35.3-28.7 64-64 64l-48 0 0-48 48 0c8.8 0 16-7.2 16-16l0-192c0-8.8-7.2-16-16-16zM368 288l-320 0 0 128c0 8.8 7.2 16 16 16l288 0c8.8 0 16-7.2 16-16l0-128zM64 160l288 0c35.3 0 64 28.7 64 64l0 192c0 35.3-28.7 64-64 64L64 480c-35.3 0-64-28.7-64-64L0 224c0-35.3 28.7-64 64-64z"]};var v1={prefix:"far",iconName:"folder-closed",icon:[512,512,[],"e185","M448 400L64 400c-8.8 0-16-7.2-16-16l0-144 416 0 0 144c0 8.8-7.2 16-16 16zm16-208l-416 0 0-96c0-8.8 7.2-16 16-16l138.7 0c3.5 0 6.8 1.1 9.6 3.2L250.7 112c13.8 10.4 30.7 16 48 16L448 128c8.8 0 16 7.2 16 16l0 48zM64 448l384 0c35.3 0 64-28.7 64-64l0-240c0-35.3-28.7-64-64-64L298.7 80c-6.9 0-13.7-2.2-19.2-6.4L241.1 44.8C230 36.5 216.5 32 202.7 32L64 32C28.7 32 0 60.7 0 96L0 384c0 35.3 28.7 64 64 64z"]};var g1=(()=>{let e=class e{transform(i,r=0,o=void 0){return rt(i,r,o)}};e.\u0275fac=function(r){return new(r||e)},e.\u0275pipe=yn({name:"pathSlice",type:e,pure:!0});let t=e;return t})();var ki=function(t,e){return ki=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var r in i)i.hasOwnProperty(r)&&(n[r]=i[r])},ki(t,e)};function z1(t,e){ki(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}var K=function(){return K=Object.assign||function(e){for(var n,i=1,r=arguments.length;i<r;i++){n=arguments[i];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},K.apply(this,arguments)};function L1(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var i=n.call(t),r,o=[],a;try{for(;(e===void 0||e-- >0)&&!(r=i.next()).done;)o.push(r.value)}catch(s){a={error:s}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(a)throw a.error}}return o}function Vi(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(L1(arguments[e]));return t}var Dr="An invariant failed, however the error is obfuscated because this is an production build.",ni=[];Object.freeze(ni);var $i={};Object.freeze($i);var Tr={};function Hi(){return typeof window<"u"?window:typeof global<"u"?global:Tr}function Y(){return++v.mobxGuid}function T(t){throw Nt(!1,t),"X"}function Nt(t,e){if(!t)throw new Error("[mobx] "+(e||Dr))}var b1=[];function he(t,e){return!1}function qi(t){var e=!1;return function(){if(!e)return e=!0,t.apply(this,arguments)}}var C1=function(){};function Ir(t){var e=[];return t.forEach(function(n){e.indexOf(n)===-1&&e.push(n)}),e}function Wi(t){return t!==null&&typeof t=="object"}function pt(t){if(t===null||typeof t!="object")return!1;var e=Object.getPrototypeOf(t);return e===Object.prototype||e===null}function Rr(t){return ht(t)||qe(t)?t:Array.isArray(t)?new Map(t):pt(t)?new Map(Object.entries(t)):T("Cannot convert to map from '"+t+"'")}function Pr(t,e){for(var n=0;n<e.length;n++)Ge(t,e[n],t[e[n]])}function Ge(t,e,n){Object.defineProperty(t,e,{enumerable:!1,writable:!0,configurable:!0,value:n})}function Ot(t,e,n){Object.defineProperty(t,e,{enumerable:!1,writable:!1,configurable:!0,value:n})}function Oe(t,e){var n="isMobX"+t;return e.prototype[n]=!0,function(i){return Wi(i)&&i[n]===!0}}function Fr(t,e){return typeof t=="number"&&typeof e=="number"&&isNaN(t)&&isNaN(e)}function ht(t){return Hi().Map!==void 0&&t instanceof Hi().Map}function At(t){return t instanceof Set}function ft(t){for(var e=[];;){var n=t.next();if(n.done)break;e.push(n.value)}return e}function O1(){return typeof Symbol=="function"&&Symbol.toPrimitive||"@@toPrimitive"}function A1(t){return t===null?null:typeof t=="object"?""+t:t}function Ki(){return typeof Symbol=="function"&&Symbol.iterator||"@@iterator"}function Yi(t,e){Ot(t,Ki(),e)}function wt(t){return t[Ki()]=kr,t}function Xi(){return typeof Symbol=="function"&&Symbol.toStringTag||"@@toStringTag"}function kr(){return this}var ci=function(){function t(e){e===void 0&&(e="Atom@"+Y()),this.name=e,this.isPendingUnobservation=!1,this.isBeingObserved=!1,this.observers=[],this.observersIndexes={},this.diffValue=0,this.lastAccessedBy=0,this.lowestObserverState=w.NOT_TRACKING}return t.prototype.onBecomeUnobserved=function(){},t.prototype.onBecomeObserved=function(){},t.prototype.reportObserved=function(){return $1(this)},t.prototype.reportChanged=function(){me(),s2(this),ve()},t.prototype.toString=function(){return this.name},t}(),Qi=Oe("Atom",ci);function Vr(t,e,n){e===void 0&&(e=C1),n===void 0&&(n=C1);var i=new ci(t);return C2(i,e),X1(i,n),i}function D1(t,e){return t===e}function Hr(t,e){return tn(t,e)}function Br(t,e){return tn(t,e,1)}function jr(t,e){return Fr(t,e)||D1(t,e)}var ut={identity:D1,structural:Hr,default:jr,shallow:Br},Ur={},Gr={};function $r(t,e){var n=e?Ur:Gr;return n[t]||(n[t]={configurable:!0,enumerable:e,get:function(){return je(this),this[t]},set:function(i){je(this),this[t]=i}})}function je(t){if(t.__mobxDidRunLazyInitializers!==!0){var e=t.__mobxDecorators;if(e){Ge(t,"__mobxDidRunLazyInitializers",!0);for(var n in e){var i=e[n];i.propertyCreator(t,i.prop,i.descriptor,i.decoratorTarget,i.decoratorArguments)}}}}function T1(t,e){return function(){var i,r=function(a,s,m,C){if(C===!0)return e(a,s,m,a,i),null;if(!Object.prototype.hasOwnProperty.call(a,"__mobxDecorators")){var A=a.__mobxDecorators;Ge(a,"__mobxDecorators",K({},A))}return a.__mobxDecorators[s]={prop:s,propertyCreator:e,descriptor:m,decoratorTarget:a,decoratorArguments:i},$r(s,t)};return qr(arguments)?(i=ni,r.apply(null,arguments)):(i=Array.prototype.slice.call(arguments),r)}}function qr(t){return(t.length===2||t.length===3)&&typeof t[1]=="string"||t.length===4&&t[3]===!0}function Dt(t,e,n){return Z1(t)?t:Array.isArray(t)?E.array(t,{name:n}):pt(t)?E.object(t,void 0,{name:n}):ht(t)?E.map(t,{name:n}):At(t)?E.set(t,{name:n}):t}function Wr(t,e,n){return t==null||Lt(t)||pi(t)||qe(t)||vt(t)?t:Array.isArray(t)?E.array(t,{name:n,deep:!1}):pt(t)?E.object(t,void 0,{name:n,deep:!1}):ht(t)?E.map(t,{name:n,deep:!1}):At(t)?E.set(t,{name:n,deep:!1}):T(!1)}function zt(t){return t}function Kr(t,e,n){return tn(t,e)?e:t}function di(t){var e=T1(!0,function(i,r,o,a,s){var m=o?o.initializer?o.initializer.call(i):o.value:void 0;T2(i,r,m,t)}),n=(typeof process<"u"&&process.env,e);return n.enhancer=t,n}var I1={deep:!0,name:void 0,defaultDecorator:void 0},Yr={deep:!1,name:void 0,defaultDecorator:void 0};Object.freeze(I1);Object.freeze(Yr);function dt(t){return t==null?I1:typeof t=="string"?{name:t,deep:!0}:t}function ti(t){return t.defaultDecorator?t.defaultDecorator.enhancer:t.deep===!1?zt:Dt}var Ji=di(Dt),Xr=di(Wr),R1=di(zt),Qr=di(Kr);function Jr(t,e,n){if(typeof arguments[1]=="string")return Ji.apply(null,arguments);if(Z1(t))return t;var i=pt(t)?E.object(t,e,n):Array.isArray(t)?E.array(t,e):ht(t)?E.map(t,e):At(t)?E.set(t,e):t;if(i!==t)return i;T(!1)}var y1={box:function(t,e){arguments.length>2&&ue("box");var n=dt(e);return new ze(t,ti(n),n.name,!0,n.equals)},shallowBox:function(t,e){return arguments.length>2&&ue("shallowBox"),he("observable.shallowBox","observable.box(value, { deep: false })"),E.box(t,{name:e,deep:!1})},array:function(t,e){arguments.length>2&&ue("array");var n=dt(e);return new be(t,ti(n),n.name)},shallowArray:function(t,e){return arguments.length>2&&ue("shallowArray"),he("observable.shallowArray","observable.array(values, { deep: false })"),E.array(t,{name:e,deep:!1})},map:function(t,e){arguments.length>2&&ue("map");var n=dt(e);return new hi(t,ti(n),n.name)},shallowMap:function(t,e){return arguments.length>2&&ue("shallowMap"),he("observable.shallowMap","observable.map(values, { deep: false })"),E.map(t,{name:e,deep:!1})},set:function(t,e){arguments.length>2&&ue("set");var n=dt(e);return new mi(t,ti(n),n.name)},object:function(t,e,n){typeof arguments[1]=="string"&&ue("object");var i=dt(n);return y2({},t,e,i)},shallowObject:function(t,e){return typeof arguments[1]=="string"&&ue("shallowObject"),he("observable.shallowObject","observable.object(values, {}, { deep: false })"),E.object(t,{},{name:e,deep:!1})},ref:R1,shallow:Xr,deep:Ji,struct:Qr},E=Jr;Object.keys(y1).forEach(function(t){return E[t]=y1[t]});function ue(t){T("Expected one or two arguments to observable."+t+". Did you accidentally try to use observable."+t+" as decorator?")}var ri=T1(!1,function(t,e,n,i,r){var o=n.get,a=n.set,s=r[0]||{};I2(t,e,K({get:o,set:a},s))}),Zr=ri({equals:ut.structural}),R=function(e,n,i){if(typeof n=="string"||e!==null&&typeof e=="object"&&arguments.length===1)return ri.apply(null,arguments);var r=typeof n=="object"?n:{};return r.get=e,r.set=typeof n=="function"?n:r.set,r.name=r.name||e.name||"",new Le(r)};R.struct=Zr;var w=function(t){return t[t.NOT_TRACKING=-1]="NOT_TRACKING",t[t.UP_TO_DATE=0]="UP_TO_DATE",t[t.POSSIBLY_STALE=1]="POSSIBLY_STALE",t[t.STALE=2]="STALE",t}(w||{}),le=function(t){return t[t.NONE=0]="NONE",t[t.LOG=1]="LOG",t[t.BREAK=2]="BREAK",t}(le||{}),oi=function(){function t(e){this.cause=e}return t}();function Mt(t){return t instanceof oi}function Bi(t){switch(t.dependenciesState){case w.UP_TO_DATE:return!1;case w.NOT_TRACKING:case w.STALE:return!0;case w.POSSIBLY_STALE:{for(var e=mt(),n=t.observing,i=n.length,r=0;r<i;r++){var o=n[r];if(ui(o)){if(v.disableErrorBoundaries)o.get();else try{o.get()}catch{return we(e),!0}if(t.dependenciesState===w.STALE)return we(e),!0}}return H1(t),we(e),!1}}}function fi(t){var e=t.observers.length>0;v.computationDepth>0&&e&&T(!1),!v.allowStateChanges&&(e||v.enforceActions==="strict")&&T(!1)}function P1(t,e,n){var i=k1(!0);H1(t),t.newObserving=new Array(t.observing.length+100),t.unboundDepsCount=0,t.runId=++v.runId;var r=v.trackingDerivation;v.trackingDerivation=t;var o;if(v.disableErrorBoundaries===!0)o=e.call(n);else try{o=e.call(n)}catch(a){o=new oi(a)}return v.trackingDerivation=r,e2(t),t.observing.length===0&&void 0,V1(i),o}function e2(t){for(var e=t.observing,n=t.observing=t.newObserving,i=w.UP_TO_DATE,r=0,o=t.unboundDepsCount,a=0;a<o;a++){var s=n[a];s.diffValue===0&&(s.diffValue=1,r!==a&&(n[r]=s),r++),s.dependenciesState>i&&(i=s.dependenciesState)}for(n.length=r,t.newObserving=null,o=e.length;o--;){var s=e[o];s.diffValue===0&&U1(s,t),s.diffValue=0}for(;r--;){var s=n[r];s.diffValue===1&&(s.diffValue=0,a2(s,t))}i!==w.UP_TO_DATE&&(t.dependenciesState=i,t.onBecomeStale())}function ji(t){var e=t.observing;t.observing=[];for(var n=e.length;n--;)U1(e[n],t);t.dependenciesState=w.NOT_TRACKING}function F1(t){var e=mt(),n=t();return we(e),n}function mt(){var t=v.trackingDerivation;return v.trackingDerivation=null,t}function we(t){v.trackingDerivation=t}function k1(t){var e=v.allowStateReads;return v.allowStateReads=t,e}function V1(t){v.allowStateReads=t}function H1(t){if(t.dependenciesState!==w.UP_TO_DATE){t.dependenciesState=w.UP_TO_DATE;for(var e=t.observing,n=e.length;n--;)e[n].lowestObserverState=w.UP_TO_DATE}}var ai=0,t2=1;function Be(t,e){var n=function(){return i2(t,e,this,arguments)};return n.isMobxAction=!0,n}function i2(t,e,n,i){var r=n2(t,n,i);try{return e.apply(n,i)}catch(o){throw r.error=o,o}finally{r2(r)}}function n2(t,e,n){var i=B()&&!!t,r=0;if(i){r=Date.now();var o=n&&n.length||0,a=new Array(o);if(o>0)for(var s=0;s<o;s++)a[s]=n[s];ee({type:"action",name:t,object:e,arguments:a})}var m=mt();me();var C=B1(!0),A=k1(!0),X={prevDerivation:m,prevAllowStateChanges:C,prevAllowStateReads:A,notifySpy:i,startTime:r,actionId:t2++,parentActionId:ai};return ai=X.actionId,X}function r2(t){ai!==t.actionId&&T("invalid action stack. did you forget to finish an action?"),ai=t.parentActionId,t.error!==void 0&&(v.suppressReactionErrors=!0),j1(t.prevAllowStateChanges),V1(t.prevAllowStateReads),ve(),we(t.prevDerivation),t.notifySpy&&te({time:Date.now()-t.startTime}),v.suppressReactionErrors=!1}function B1(t){var e=v.allowStateChanges;return v.allowStateChanges=t,e}function j1(t){v.allowStateChanges=t}var ze=function(t){z1(e,t);function e(n,i,r,o,a){r===void 0&&(r="ObservableValue@"+Y()),o===void 0&&(o=!0),a===void 0&&(a=ut.default);var s=t.call(this,r)||this;return s.enhancer=i,s.name=r,s.equals=a,s.hasUnreportedChange=!1,s.value=i(n,void 0,r),o&&B()&&Ue({type:"create",name:s.name,newValue:""+s.value}),s}return e.prototype.dehanceValue=function(n){return this.dehancer!==void 0?this.dehancer(n):n},e.prototype.set=function(n){var i=this.value;if(n=this.prepareNewValue(n),n!==v.UNCHANGED){var r=B();r&&ee({type:"update",name:this.name,newValue:n,oldValue:i}),this.setNewValue(n),r&&te()}},e.prototype.prepareNewValue=function(n){if(fi(this),ce(this)){var i=de(this,{object:this,type:"update",newValue:n});if(!i)return v.UNCHANGED;n=i.newValue}return n=this.enhancer(n,this.value,this.name),this.equals(this.value,n)?v.UNCHANGED:n},e.prototype.setNewValue=function(n){var i=this.value;this.value=n,this.reportChanged(),ie(this)&&ne(this,{type:"update",object:this,newValue:n,oldValue:i})},e.prototype.get=function(){return this.reportObserved(),this.dehanceValue(this.value)},e.prototype.intercept=function(n){return It(this,n)},e.prototype.observe=function(n,i){return i&&n({object:this,type:"update",newValue:this.value,oldValue:void 0}),Rt(this,n)},e.prototype.toJSON=function(){return this.get()},e.prototype.toString=function(){return this.name+"["+this.value+"]"},e.prototype.valueOf=function(){return A1(this.get())},e}(ci);ze.prototype[O1()]=ze.prototype.valueOf;var A0=Oe("ObservableValue",ze),Le=function(){function t(e){this.dependenciesState=w.NOT_TRACKING,this.observing=[],this.newObserving=null,this.isBeingObserved=!1,this.isPendingUnobservation=!1,this.observers=[],this.observersIndexes={},this.diffValue=0,this.runId=0,this.lastAccessedBy=0,this.lowestObserverState=w.UP_TO_DATE,this.unboundDepsCount=0,this.__mapid="#"+Y(),this.value=new oi(null),this.isComputing=!1,this.isRunningSetter=!1,this.isTracing=le.NONE,this.derivation=e.get,this.name=e.name||"ComputedValue@"+Y(),e.set&&(this.setter=Be(this.name+"-setter",e.set)),this.equals=e.equals||(e.compareStructural||e.struct?ut.structural:ut.default),this.scope=e.context,this.requiresReaction=!!e.requiresReaction,this.keepAlive=!!e.keepAlive}return t.prototype.onBecomeStale=function(){c2(this)},t.prototype.onBecomeUnobserved=function(){},t.prototype.onBecomeObserved=function(){},t.prototype.get=function(){this.isComputing&&T("Cycle detected in computation "+this.name+": "+this.derivation),v.inBatch===0&&this.observers.length===0&&!this.keepAlive?Bi(this)&&(this.warnAboutUntrackedRead(),me(),this.value=this.computeValue(!1),ve()):($1(this),Bi(this)&&this.trackAndCompute()&&l2(this));var e=this.value;if(Mt(e))throw e.cause;return e},t.prototype.peek=function(){var e=this.computeValue(!1);if(Mt(e))throw e.cause;return e},t.prototype.set=function(e){if(this.setter){Nt(!this.isRunningSetter,"The setter of computed value '"+this.name+"' is trying to update itself. Did you intend to update an _observable_ value, instead of the computed property?"),this.isRunningSetter=!0;try{this.setter.call(this.scope,e)}finally{this.isRunningSetter=!1}}else Nt(!1,!1)},t.prototype.trackAndCompute=function(){B()&&Ue({object:this.scope,type:"compute",name:this.name});var e=this.value,n=this.dependenciesState===w.NOT_TRACKING,i=this.computeValue(!0),r=n||Mt(e)||Mt(i)||!this.equals(e,i);return r&&(this.value=i),r},t.prototype.computeValue=function(e){this.isComputing=!0,v.computationDepth++;var n;if(e)n=P1(this,this.derivation,this.scope);else if(v.disableErrorBoundaries===!0)n=this.derivation.call(this.scope);else try{n=this.derivation.call(this.scope)}catch(i){n=new oi(i)}return v.computationDepth--,this.isComputing=!1,n},t.prototype.suspend=function(){this.keepAlive||(ji(this),this.value=void 0)},t.prototype.observe=function(e,n){var i=this,r=!0,o=void 0;return Tt(function(){var a=i.get();if(!r||n){var s=mt();e({type:"update",object:i,newValue:a,oldValue:o}),we(s)}r=!1,o=a})},t.prototype.warnAboutUntrackedRead=function(){},t.prototype.toJSON=function(){return this.get()},t.prototype.toString=function(){return this.name+"["+this.derivation.toString()+"]"},t.prototype.valueOf=function(){return A1(this.get())},t}();Le.prototype[O1()]=Le.prototype.valueOf;var ui=Oe("ComputedValue",Le);var Ri=function(){function t(){this.version=5,this.UNCHANGED={},this.trackingDerivation=null,this.computationDepth=0,this.runId=0,this.mobxGuid=0,this.inBatch=0,this.pendingUnobservations=[],this.pendingReactions=[],this.isRunningReactions=!1,this.allowStateChanges=!0,this.allowStateReads=!0,this.enforceActions=!1,this.spyListeners=[],this.globalReactionErrorHandlers=[],this.computedRequiresReaction=!1,this.reactionRequiresObservable=!1,this.observableRequiresReaction=!1,this.computedConfigurable=!1,this.disableErrorBoundaries=!1,this.suppressReactionErrors=!1}return t}(),Pi=!0,o2=!1,v=function(){var t=Hi();return t.__mobxInstanceCount>0&&!t.__mobxGlobals&&(Pi=!1),t.__mobxGlobals&&t.__mobxGlobals.version!==new Ri().version&&(Pi=!1),Pi?t.__mobxGlobals?(t.__mobxInstanceCount+=1,t.__mobxGlobals.UNCHANGED||(t.__mobxGlobals.UNCHANGED={}),t.__mobxGlobals):(t.__mobxInstanceCount=1,t.__mobxGlobals=new Ri):(setTimeout(function(){o2||T("There are multiple, different versions of MobX active. Make sure MobX is loaded only once or use `configure({ isolateGlobalState: true })`")},1),new Ri)}();function a2(t,e){var n=t.observers.length;n&&(t.observersIndexes[e.__mapid]=n),t.observers[n]=e,t.lowestObserverState>e.dependenciesState&&(t.lowestObserverState=e.dependenciesState)}function U1(t,e){if(t.observers.length===1)t.observers.length=0,G1(t);else{var n=t.observers,i=t.observersIndexes,r=n.pop();if(r!==e){var o=i[e.__mapid]||0;o?i[r.__mapid]=o:delete i[r.__mapid],n[o]=r}delete i[e.__mapid]}}function G1(t){t.isPendingUnobservation===!1&&(t.isPendingUnobservation=!0,v.pendingUnobservations.push(t))}function me(){v.inBatch++}function ve(){if(--v.inBatch===0){K1();for(var t=v.pendingUnobservations,e=0;e<t.length;e++){var n=t[e];n.isPendingUnobservation=!1,n.observers.length===0&&(n.isBeingObserved&&(n.isBeingObserved=!1,n.onBecomeUnobserved()),n instanceof Le&&n.suspend())}v.pendingUnobservations=[]}}function $1(t){var e=v.trackingDerivation;return e!==null?(e.runId!==t.lastAccessedBy&&(t.lastAccessedBy=e.runId,e.newObserving[e.unboundDepsCount++]=t,t.isBeingObserved||(t.isBeingObserved=!0,t.onBecomeObserved())),!0):(t.observers.length===0&&v.inBatch>0&&G1(t),!1)}function s2(t){if(t.lowestObserverState!==w.STALE){t.lowestObserverState=w.STALE;for(var e=t.observers,n=e.length;n--;){var i=e[n];i.dependenciesState===w.UP_TO_DATE&&(i.isTracing!==le.NONE&&q1(i,t),i.onBecomeStale()),i.dependenciesState=w.STALE}}}function l2(t){if(t.lowestObserverState!==w.STALE){t.lowestObserverState=w.STALE;for(var e=t.observers,n=e.length;n--;){var i=e[n];i.dependenciesState===w.POSSIBLY_STALE?i.dependenciesState=w.STALE:i.dependenciesState===w.UP_TO_DATE&&(t.lowestObserverState=w.UP_TO_DATE)}}}function c2(t){if(t.lowestObserverState===w.UP_TO_DATE){t.lowestObserverState=w.POSSIBLY_STALE;for(var e=t.observers,n=e.length;n--;){var i=e[n];i.dependenciesState===w.UP_TO_DATE&&(i.dependenciesState=w.POSSIBLY_STALE,i.isTracing!==le.NONE&&q1(i,t),i.onBecomeStale())}}}function q1(t,e){if(console.log("[mobx.trace] '"+t.name+"' is invalidated due to a change in: '"+e.name+"'"),t.isTracing===le.BREAK){var n=[];W1(S2(t),n,1),new Function(`debugger;
|
|
2
|
-
/*
|
|
3
|
-
Tracing '`+t.name+`'
|
|
4
|
-
|
|
5
|
-
You are entering this break point because derivation '`+t.name+"' is being traced and '"+e.name+`' is now forcing it to update.
|
|
6
|
-
Just follow the stacktrace you should now see in the devtools to see precisely what piece of your code is causing this update
|
|
7
|
-
The stackframe you are looking for is at least ~6-8 stack-frames up.
|
|
8
|
-
|
|
9
|
-
`+(t instanceof Le?t.derivation.toString().replace(/[*]\//g,"/"):"")+`
|
|
10
|
-
|
|
11
|
-
The dependencies for this derivation are:
|
|
12
|
-
|
|
13
|
-
`+n.join(`
|
|
14
|
-
`)+`
|
|
15
|
-
*/
|
|
16
|
-
`)()}}function W1(t,e,n){if(e.length>=1e3){e.push("(and many more)");return}e.push(""+new Array(n).join(" ")+t.name),t.dependencies&&t.dependencies.forEach(function(i){return W1(i,e,n+1)})}var si=function(){function t(e,n,i,r){e===void 0&&(e="Reaction@"+Y()),r===void 0&&(r=!1),this.name=e,this.onInvalidate=n,this.errorHandler=i,this.requiresObservable=r,this.observing=[],this.newObserving=[],this.dependenciesState=w.NOT_TRACKING,this.diffValue=0,this.runId=0,this.unboundDepsCount=0,this.__mapid="#"+Y(),this.isDisposed=!1,this._isScheduled=!1,this._isTrackPending=!1,this._isRunning=!1,this.isTracing=le.NONE}return t.prototype.onBecomeStale=function(){this.schedule()},t.prototype.schedule=function(){this._isScheduled||(this._isScheduled=!0,v.pendingReactions.push(this),K1())},t.prototype.isScheduled=function(){return this._isScheduled},t.prototype.runReaction=function(){if(!this.isDisposed){if(me(),this._isScheduled=!1,Bi(this)){this._isTrackPending=!0;try{this.onInvalidate(),this._isTrackPending&&B()&&Ue({name:this.name,type:"scheduled-reaction"})}catch(e){this.reportExceptionInDerivation(e)}}ve()}},t.prototype.track=function(e){me();var n=B(),i;n&&(i=Date.now(),ee({name:this.name,type:"reaction"})),this._isRunning=!0;var r=P1(this,e,void 0);this._isRunning=!1,this._isTrackPending=!1,this.isDisposed&&ji(this),Mt(r)&&this.reportExceptionInDerivation(r.cause),n&&te({time:Date.now()-i}),ve()},t.prototype.reportExceptionInDerivation=function(e){var n=this;if(this.errorHandler){this.errorHandler(e,this);return}if(v.disableErrorBoundaries)throw e;var i="[mobx] Encountered an uncaught exception that was thrown by a reaction or observer component, in: '"+this+"'";v.suppressReactionErrors?console.warn("[mobx] (error in reaction '"+this.name+"' suppressed, fix error of causing action below)"):console.error(i,e),B()&&Ue({type:"error",name:this.name,message:i,error:""+e}),v.globalReactionErrorHandlers.forEach(function(r){return r(e,n)})},t.prototype.dispose=function(){this.isDisposed||(this.isDisposed=!0,this._isRunning||(me(),ji(this),ve()))},t.prototype.getDisposer=function(){var e=this.dispose.bind(this);return e.$mobx=this,e},t.prototype.toString=function(){return"Reaction["+this.name+"]"},t.prototype.trace=function(e){e===void 0&&(e=!1),x2(this,e)},t}();var S1=100,d2=function(t){return t()};function K1(){v.inBatch>0||v.isRunningReactions||d2(f2)}function f2(){v.isRunningReactions=!0;for(var t=v.pendingReactions,e=0;t.length>0;){++e===S1&&(console.error("Reaction doesn't converge to a stable state after "+S1+" iterations."+(" Probably there is a cycle in the reactive function: "+t[0])),t.splice(0));for(var n=t.splice(0),i=0,r=n.length;i<r;i++)n[i].runReaction()}v.isRunningReactions=!1}var li=Oe("Reaction",si);function B(){return!!v.spyListeners.length}function Ue(t){if(v.spyListeners.length)for(var e=v.spyListeners,n=0,i=e.length;n<i;n++)e[n](t)}function ee(t){var e=K({},t,{spyReportStart:!0});Ue(e)}var u2={spyReportEnd:!0};function te(t){Ue(t?K({},t,{spyReportEnd:!0}):u2)}function p2(t){return v.spyListeners.push(t),qi(function(){v.spyListeners=v.spyListeners.filter(function(e){return e!==t})})}function h2(){T(!1)}function _1(t){return function(e,n,i){if(i){if(i.value)return{value:Be(t,i.value),enumerable:!1,configurable:!0,writable:!0};var r=i.initializer;return{enumerable:!1,configurable:!0,writable:!0,initializer:function(){return Be(t,r.call(this))}}}return m2(t).apply(this,arguments)}}function m2(t){return function(e,n,i){Object.defineProperty(e,n,{configurable:!0,enumerable:!1,get:function(){},set:function(r){Ge(this,n,M(t,r))}})}}function v2(t,e,n,i){return i===!0?(Fi(t,e,n.value),null):n?{configurable:!0,enumerable:!1,get:function(){return Fi(this,e,n.value||n.initializer.call(this)),this[e]},set:h2}:{enumerable:!1,configurable:!0,set:function(r){Fi(this,e,r)},get:function(){}}}var M=function(e,n,i,r){if(arguments.length===1&&typeof e=="function")return Be(e.name||"<unnamed action>",e);if(arguments.length===2&&typeof n=="function")return Be(e,n);if(arguments.length===1&&typeof e=="string")return _1(e);if(r===!0)e[n]=Be(e.name||n,i.value);else return _1(n).apply(null,arguments)};M.bound=v2;function Fi(t,e,n){Ge(t,e,Be(e,n.bind(t)))}function Tt(t,e){e===void 0&&(e=$i);var n=e&&e.name||t.name||"Autorun@"+Y(),i=!e.scheduler&&!e.delay,r;if(i)r=new si(n,function(){this.track(s)},e.onError,e.requiresObservable);else{var o=Y1(e),a=!1;r=new si(n,function(){a||(a=!0,o(function(){a=!1,r.isDisposed||r.track(s)}))},e.onError,e.requiresObservable)}function s(){t(r)}return r.schedule(),r.getDisposer()}var g2=function(t){return t()};function Y1(t){return t.scheduler?t.scheduler:t.delay?function(e){return setTimeout(e,t.delay)}:g2}function $e(t,e,n){n===void 0&&(n=$i),typeof n=="boolean"&&(n={fireImmediately:n},he("Using fireImmediately as argument is deprecated. Use '{ fireImmediately: true }' instead"));var i=n.name||"Reaction@"+Y(),r=M(i,n.onError?b2(n.onError,e):e),o=!n.scheduler&&!n.delay,a=Y1(n),s=!0,m=!1,C,A=n.compareStructural?ut.structural:n.equals||ut.default,X=new si(i,function(){s||o?Ae():m||(m=!0,a(Ae))},n.onError,n.requiresObservable);function Ae(){if(m=!1,!X.isDisposed){var fn=!1;X.track(function(){var un=t(X);fn=s||!A(C,un),C=un}),s&&n.fireImmediately&&r(C,X),!s&&fn===!0&&r(C,X),s&&(s=!1)}}return X.schedule(),X.getDisposer()}function b2(t,e){return function(){try{return e.apply(this,arguments)}catch(n){t.call(this,n)}}}function C2(t,e,n){return Q1("onBecomeObserved",t,e,n)}function X1(t,e,n){return Q1("onBecomeUnobserved",t,e,n)}function Q1(t,e,n,i){var r=typeof i=="function"?ge(e,n):ge(e),o=typeof i=="function"?i:n,a=r[t];return typeof a!="function"?T(!1):(r[t]=function(){a.call(this),o.call(this)},function(){r[t]=a})}function y2(t,e,n,i){if(0&&n)for(var r in n);i=dt(i);var o=i.defaultDecorator||(i.deep===!1?R1:Ji);je(t),en(t,i.name,o.enhancer),me();try{for(var r in e){var a=Object.getOwnPropertyDescriptor(e,r),s=n&&r in n?n[r]:a.get?ri:o,m=s(t,r,a,!0);m&&Object.defineProperty(t,r,m)}}finally{ve()}return t}function S2(t,e){return J1(ge(t,e))}function J1(t){var e={name:t.name};return t.observing&&t.observing.length>0&&(e.dependencies=Ir(t.observing).map(J1)),e}function _2(t,e){if(t==null)return!1;if(e!==void 0){if(Lt(t)){var n=t.$mobx;return n.values&&!!n.values[e]}return!1}return Lt(t)||!!t.$mobx||Qi(t)||li(t)||ui(t)}function Z1(t){return arguments.length!==1&&T(!1),_2(t)}function x2(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=!1;typeof t[t.length-1]=="boolean"&&(n=t.pop());var i=E2(t);if(!i)return T(!1);i.isTracing===le.NONE&&console.log("[mobx.trace] '"+i.name+"' tracing enabled"),i.isTracing=n?le.BREAK:le.LOG}function E2(t){switch(t.length){case 0:return v.trackingDerivation;case 1:return ge(t[0]);case 2:return ge(t[0],t[1])}}function pe(t,e){e===void 0&&(e=void 0),me();try{return t.apply(e)}finally{ve()}}function ce(t){return t.interceptors!==void 0&&t.interceptors.length>0}function It(t,e){var n=t.interceptors||(t.interceptors=[]);return n.push(e),qi(function(){var i=n.indexOf(e);i!==-1&&n.splice(i,1)})}function de(t,e){var n=mt();try{var i=t.interceptors;if(i)for(var r=0,o=i.length;r<o&&(e=i[r](e),Nt(!e||e.type,"Intercept handlers should return nothing or a change object"),!!e);r++);return e}finally{we(n)}}function ie(t){return t.changeListeners!==void 0&&t.changeListeners.length>0}function Rt(t,e){var n=t.changeListeners||(t.changeListeners=[]);return n.push(e),qi(function(){var i=n.indexOf(e);i!==-1&&n.splice(i,1)})}function ne(t,e){var n=mt(),i=t.changeListeners;if(i){i=i.slice();for(var r=0,o=i.length;r<o;r++)i[r](e);we(n)}}var M2=1e4,N2=function(){var t=!1,e={};return Object.defineProperty(e,"0",{set:function(){t=!0}}),Object.create(e)[0]=1,t===!1}(),Ui=0,Zi=function(){function t(){}return t}();function w2(t,e){typeof Object.setPrototypeOf<"u"?Object.setPrototypeOf(t.prototype,e):typeof t.prototype.__proto__<"u"?t.prototype.__proto__=e:t.prototype=e}w2(Zi,Array.prototype);Object.isFrozen(Array)&&["constructor","push","shift","concat","pop","unshift","replace","find","findIndex","splice","reverse","sort"].forEach(function(t){Object.defineProperty(Zi.prototype,t,{configurable:!0,writable:!0,value:Array.prototype[t]})});var er=function(){function t(e,n,i,r){this.array=i,this.owned=r,this.values=[],this.lastKnownLength=0,this.atom=new ci(e||"ObservableArray@"+Y()),this.enhancer=function(o,a){return n(o,a,e+"[..]")}}return t.prototype.dehanceValue=function(e){return this.dehancer!==void 0?this.dehancer(e):e},t.prototype.dehanceValues=function(e){return this.dehancer!==void 0&&e.length>0?e.map(this.dehancer):e},t.prototype.intercept=function(e){return It(this,e)},t.prototype.observe=function(e,n){return n===void 0&&(n=!1),n&&e({object:this.array,type:"splice",index:0,added:this.values.slice(),addedCount:this.values.length,removed:[],removedCount:0}),Rt(this,e)},t.prototype.getArrayLength=function(){return this.atom.reportObserved(),this.values.length},t.prototype.setArrayLength=function(e){if(typeof e!="number"||e<0)throw new Error("[mobx.array] Out of range: "+e);var n=this.values.length;if(e!==n)if(e>n){for(var i=new Array(e-n),r=0;r<e-n;r++)i[r]=void 0;this.spliceWithArray(n,0,i)}else this.spliceWithArray(e,n-e)},t.prototype.updateArrayLength=function(e,n){if(e!==this.lastKnownLength)throw new Error("[mobx] Modification exception: the internal structure of an observable array was changed. Did you use peek() to change it?");this.lastKnownLength+=n,n>0&&e+n+1>Ui&&ir(e+n+1)},t.prototype.spliceWithArray=function(e,n,i){var r=this;fi(this.atom);var o=this.values.length;if(e===void 0?e=0:e>o?e=o:e<0&&(e=Math.max(0,o+e)),arguments.length===1?n=o-e:n==null?n=0:n=Math.max(0,Math.min(n,o-e)),i===void 0&&(i=ni),ce(this)){var a=de(this,{object:this.array,type:"splice",index:e,removedCount:n,added:i});if(!a)return ni;n=a.removedCount,i=a.added}i=i.length===0?i:i.map(function(C){return r.enhancer(C,void 0)});var s=i.length-n;this.updateArrayLength(o,s);var m=this.spliceItemsIntoValues(e,n,i);return(n!==0||i.length!==0)&&this.notifyArraySplice(e,i,m),this.dehanceValues(m)},t.prototype.spliceItemsIntoValues=function(e,n,i){var r;if(i.length<M2)return(r=this.values).splice.apply(r,Vi([e,n],i));var o=this.values.slice(e,e+n);return this.values=this.values.slice(0,e).concat(i,this.values.slice(e+n)),o},t.prototype.notifyArrayChildUpdate=function(e,n,i){var r=!this.owned&&B(),o=ie(this),a=o||r?{object:this.array,type:"update",index:e,newValue:n,oldValue:i}:null;r&&ee(K({},a,{name:this.atom.name})),this.atom.reportChanged(),o&&ne(this,a),r&&te()},t.prototype.notifyArraySplice=function(e,n,i){var r=!this.owned&&B(),o=ie(this),a=o||r?{object:this.array,type:"splice",index:e,removed:i,added:n,removedCount:i.length,addedCount:n.length}:null;r&&ee(K({},a,{name:this.atom.name})),this.atom.reportChanged(),o&&ne(this,a),r&&te()},t}(),be=function(t){z1(e,t);function e(n,i,r,o){r===void 0&&(r="ObservableArray@"+Y()),o===void 0&&(o=!1);var a=t.call(this)||this,s=new er(r,i,a,o);if(Ot(a,"$mobx",s),n&&n.length){var m=B1(!0);a.spliceWithArray(0,0,n),j1(m)}return N2&&Object.defineProperty(s.array,"0",z2),a}return e.prototype.intercept=function(n){return this.$mobx.intercept(n)},e.prototype.observe=function(n,i){return i===void 0&&(i=!1),this.$mobx.observe(n,i)},e.prototype.clear=function(){return this.splice(0)},e.prototype.concat=function(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];return this.$mobx.atom.reportObserved(),Array.prototype.concat.apply(this.peek(),n.map(function(r){return pi(r)?r.peek():r}))},e.prototype.replace=function(n){return this.$mobx.spliceWithArray(0,this.$mobx.values.length,n)},e.prototype.toJS=function(){return this.slice()},e.prototype.toJSON=function(){return this.toJS()},e.prototype.peek=function(){return this.$mobx.atom.reportObserved(),this.$mobx.dehanceValues(this.$mobx.values)},e.prototype.find=function(n,i,r){r===void 0&&(r=0),arguments.length===3&&he("The array.find fromIndex argument to find will not be supported anymore in the next major");var o=this.findIndex.apply(this,arguments);return o===-1?void 0:this.get(o)},e.prototype.findIndex=function(n,i,r){r===void 0&&(r=0),arguments.length===3&&he("The array.findIndex fromIndex argument to find will not be supported anymore in the next major");for(var o=this.peek(),a=o.length,s=r;s<a;s++)if(n.call(i,o[s],s,this))return s;return-1},e.prototype.splice=function(n,i){for(var r=[],o=2;o<arguments.length;o++)r[o-2]=arguments[o];switch(arguments.length){case 0:return[];case 1:return this.$mobx.spliceWithArray(n);case 2:return this.$mobx.spliceWithArray(n,i)}return this.$mobx.spliceWithArray(n,i,r)},e.prototype.spliceWithArray=function(n,i,r){return this.$mobx.spliceWithArray(n,i,r)},e.prototype.push=function(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];var r=this.$mobx;return r.spliceWithArray(r.values.length,0,n),r.values.length},e.prototype.pop=function(){return this.splice(Math.max(this.$mobx.values.length-1,0),1)[0]},e.prototype.shift=function(){return this.splice(0,1)[0]},e.prototype.unshift=function(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];var r=this.$mobx;return r.spliceWithArray(0,0,n),r.values.length},e.prototype.reverse=function(){var n=this.slice();return n.reverse.apply(n,arguments)},e.prototype.sort=function(n){var i=this.slice();return i.sort.apply(i,arguments)},e.prototype.remove=function(n){var i=this.$mobx.dehanceValues(this.$mobx.values).indexOf(n);return i>-1?(this.splice(i,1),!0):!1},e.prototype.move=function(n,i){he("observableArray.move is deprecated, use .slice() & .replace() instead");function r(s){if(s<0)throw new Error("[mobx.array] Index out of bounds: "+s+" is negative");var m=this.$mobx.values.length;if(s>=m)throw new Error("[mobx.array] Index out of bounds: "+s+" is not smaller than "+m)}if(r.call(this,n),r.call(this,i),n!==i){var o=this.$mobx.values,a;n<i?a=Vi(o.slice(0,n),o.slice(n+1,i+1),[o[n]],o.slice(i+1)):a=Vi(o.slice(0,i),[o[n]],o.slice(i,n),o.slice(n+1)),this.replace(a)}},e.prototype.get=function(n){var i=this.$mobx;if(i){if(n<i.values.length)return i.atom.reportObserved(),i.dehanceValue(i.values[n]);console.warn("[mobx.array] Attempt to read an array index ("+n+") that is out of bounds ("+i.values.length+"). Please check length first. Out of bound indices will not be tracked by MobX")}},e.prototype.set=function(n,i){var r=this.$mobx,o=r.values;if(n<o.length){fi(r.atom);var a=o[n];if(ce(r)){var s=de(r,{type:"update",object:this,index:n,newValue:i});if(!s)return;i=s.newValue}i=r.enhancer(i,a);var m=i!==a;m&&(o[n]=i,r.notifyArrayChildUpdate(n,i,a))}else if(n===o.length)r.spliceWithArray(n,0,[i]);else throw new Error("[mobx.array] Index out of bounds, "+n+" is larger than "+o.length)},e}(Zi);Yi(be.prototype,function(){this.$mobx.atom.reportObserved();var t=this,e=0;return wt({next:function(){return e<t.length?{value:t[e++],done:!1}:{done:!0,value:void 0}}})});Object.defineProperty(be.prototype,"length",{enumerable:!1,configurable:!0,get:function(){return this.$mobx.getArrayLength()},set:function(t){this.$mobx.setArrayLength(t)}});Ge(be.prototype,Xi(),"Array");["every","filter","forEach","indexOf","join","lastIndexOf","map","reduce","reduceRight","slice","some","toString","toLocaleString"].forEach(function(t){var e=Array.prototype[t];Nt(typeof e=="function","Base function not defined on Array prototype: '"+t+"'"),Ge(be.prototype,t,function(){return e.apply(this.peek(),arguments)})});Pr(be.prototype,["constructor","intercept","observe","clear","concat","get","replace","toJS","toJSON","peek","find","findIndex","splice","spliceWithArray","push","pop","set","shift","unshift","reverse","sort","remove","move","toString","toLocaleString"]);var z2=tr(0);function tr(t){return{enumerable:!1,configurable:!1,get:function(){return this.get(t)},set:function(e){this.set(t,e)}}}function L2(t){Object.defineProperty(be.prototype,""+t,tr(t))}function ir(t){for(var e=Ui;e<t;e++)L2(e);Ui=t}ir(1e3);var O2=Oe("ObservableArrayAdministration",er);function pi(t){return Wi(t)&&O2(t.$mobx)}var A2={},hi=function(){function t(e,n,i){if(n===void 0&&(n=Dt),i===void 0&&(i="ObservableMap@"+Y()),this.enhancer=n,this.name=i,this.$mobx=A2,this._keys=new be(void 0,zt,this.name+".keys()",!0),typeof Map!="function")throw new Error("mobx.map requires Map polyfill for the current browser. Check babel-polyfill or core-js/es6/map.js");this._data=new Map,this._hasMap=new Map,this.merge(e)}return t.prototype._has=function(e){return this._data.has(e)},t.prototype.has=function(e){var n=this;if(!v.trackingDerivation)return this._has(e);var i=this._hasMap.get(e);if(!i){var r=i=new ze(this._has(e),zt,this.name+"."+ii(e)+"?",!1);this._hasMap.set(e,r),X1(r,function(){return n._hasMap.delete(e)})}return i.get()},t.prototype.set=function(e,n){var i=this._has(e);if(ce(this)){var r=de(this,{type:i?"update":"add",object:this,newValue:n,name:e});if(!r)return this;n=r.newValue}return i?this._updateValue(e,n):this._addValue(e,n),this},t.prototype.delete=function(e){var n=this;if(ce(this)){var i=de(this,{type:"delete",object:this,name:e});if(!i)return!1}if(this._has(e)){var r=B(),o=ie(this),i=o||r?{type:"delete",object:this,oldValue:this._data.get(e).value,name:e}:null;return r&&ee(K({},i,{name:this.name,key:e})),pe(function(){n._keys.remove(e),n._updateHasMapEntry(e,!1);var s=n._data.get(e);s.setNewValue(void 0),n._data.delete(e)}),o&&ne(this,i),r&&te(),!0}return!1},t.prototype._updateHasMapEntry=function(e,n){var i=this._hasMap.get(e);i&&i.setNewValue(n)},t.prototype._updateValue=function(e,n){var i=this._data.get(e);if(n=i.prepareNewValue(n),n!==v.UNCHANGED){var r=B(),o=ie(this),a=o||r?{type:"update",object:this,oldValue:i.value,name:e,newValue:n}:null;r&&ee(K({},a,{name:this.name,key:e})),i.setNewValue(n),o&&ne(this,a),r&&te()}},t.prototype._addValue=function(e,n){var i=this;pe(function(){var s=new ze(n,i.enhancer,i.name+"."+ii(e),!1);i._data.set(e,s),n=s.value,i._updateHasMapEntry(e,!0),i._keys.push(e)});var r=B(),o=ie(this),a=o||r?{type:"add",object:this,name:e,newValue:n}:null;r&&ee(K({},a,{name:this.name,key:e})),o&&ne(this,a),r&&te()},t.prototype.get=function(e){return this.has(e)?this.dehanceValue(this._data.get(e).get()):this.dehanceValue(void 0)},t.prototype.dehanceValue=function(e){return this.dehancer!==void 0?this.dehancer(e):e},t.prototype.keys=function(){return this._keys[Ki()]()},t.prototype.values=function(){var e=this,n=0;return wt({next:function(){return n<e._keys.length?{value:e.get(e._keys[n++]),done:!1}:{value:void 0,done:!0}}})},t.prototype.entries=function(){var e=this,n=0;return wt({next:function(){if(n<e._keys.length){var i=e._keys[n++];return{value:[i,e.get(i)],done:!1}}return{done:!0}}})},t.prototype.forEach=function(e,n){var i=this;this._keys.forEach(function(r){return e.call(n,i.get(r),r,i)})},t.prototype.merge=function(e){var n=this;return qe(e)&&(e=e.toJS()),pe(function(){pt(e)?Object.keys(e).forEach(function(i){return n.set(i,e[i])}):Array.isArray(e)?e.forEach(function(i){var r=L1(i,2),o=r[0],a=r[1];return n.set(o,a)}):ht(e)?e.constructor!==Map?T("Cannot initialize from classes that inherit from Map: "+e.constructor.name):e.forEach(function(i,r){return n.set(r,i)}):e!=null&&T("Cannot initialize map from "+e)}),this},t.prototype.clear=function(){var e=this;pe(function(){F1(function(){e._keys.slice().forEach(function(n){return e.delete(n)})})})},t.prototype.replace=function(e){var n=this;return pe(function(){for(var i=Rr(e),r=n._keys,o=Array.from(i.keys()),a=!1,s=0;s<r.length;s++){var m=r[s];r.length===o.length&&m!==o[s]&&(a=!0),i.has(m)||(a=!0,n.delete(m))}i.forEach(function(C,A){n._data.has(A)||(a=!0),n.set(A,C)}),a&&n._keys.replace(o)}),this},Object.defineProperty(t.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),t.prototype.toPOJO=function(){var e=this,n={};return this._keys.forEach(function(i){return n[typeof i=="symbol"?i:ii(i)]=e.get(i)}),n},t.prototype.toJS=function(){var e=this,n=new Map;return this._keys.forEach(function(i){return n.set(i,e.get(i))}),n},t.prototype.toJSON=function(){return this.toPOJO()},t.prototype.toString=function(){var e=this;return this.name+"[{ "+this._keys.map(function(n){return ii(n)+": "+(""+e.get(n))}).join(", ")+" }]"},t.prototype.observe=function(e,n){return Rt(this,e)},t.prototype.intercept=function(e){return It(this,e)},t}();function ii(t){return t&&t.toString?t.toString():new String(t).toString()}Yi(hi.prototype,function(){return this.entries()});Ot(hi.prototype,Xi(),"Map");var qe=Oe("ObservableMap",hi),D2={},mi=function(){function t(e,n,i){if(n===void 0&&(n=Dt),i===void 0&&(i="ObservableSet@"+Y()),this.name=i,this.$mobx=D2,this._data=new Set,this._atom=Vr(this.name),typeof Set!="function")throw new Error("mobx.set requires Set polyfill for the current browser. Check babel-polyfill or core-js/es6/set.js");this.enhancer=function(r,o){return n(r,o,i)},e&&this.replace(e)}return t.prototype.dehanceValue=function(e){return this.dehancer!==void 0?this.dehancer(e):e},t.prototype.clear=function(){var e=this;pe(function(){F1(function(){e._data.forEach(function(n){e.delete(n)})})})},t.prototype.forEach=function(e,n){var i=this;this._data.forEach(function(r){e.call(n,r,r,i)})},Object.defineProperty(t.prototype,"size",{get:function(){return this._atom.reportObserved(),this._data.size},enumerable:!0,configurable:!0}),t.prototype.add=function(e){var n=this;if(fi(this._atom),ce(this)){var i=de(this,{type:"add",object:this,newValue:e});if(!i)return this}if(!this.has(e)){pe(function(){n._data.add(n.enhancer(e,void 0)),n._atom.reportChanged()});var r=B(),o=ie(this),i=o||r?{type:"add",object:this,newValue:e}:null;o&&ne(this,i)}return this},t.prototype.delete=function(e){var n=this;if(ce(this)){var i=de(this,{type:"delete",object:this,oldValue:e});if(!i)return!1}if(this.has(e)){var r=B(),o=ie(this),i=o||r?{type:"delete",object:this,oldValue:e}:null;return pe(function(){n._atom.reportChanged(),n._data.delete(e)}),o&&ne(this,i),!0}return!1},t.prototype.has=function(e){return this._atom.reportObserved(),this._data.has(this.dehanceValue(e))},t.prototype.entries=function(){var e=0,n=ft(this.keys()),i=ft(this.values());return wt({next:function(){var r=e;return e+=1,r<i.length?{value:[n[r],i[r]],done:!1}:{done:!0}}})},t.prototype.keys=function(){return this.values()},t.prototype.values=function(){this._atom.reportObserved();var e=this,n=0,i;return this._data.values!==void 0?i=ft(this._data.values()):(i=[],this._data.forEach(function(r){return i.push(r)})),wt({next:function(){return n<i.length?{value:e.dehanceValue(i[n++]),done:!1}:{done:!0}}})},t.prototype.replace=function(e){var n=this;return vt(e)&&(e=e.toJS()),pe(function(){Array.isArray(e)?(n.clear(),e.forEach(function(i){return n.add(i)})):At(e)?(n.clear(),e.forEach(function(i){return n.add(i)})):e!=null&&T("Cannot initialize set from "+e)}),this},t.prototype.observe=function(e,n){return Rt(this,e)},t.prototype.intercept=function(e){return It(this,e)},t.prototype.toJS=function(){return new Set(this)},t.prototype.toString=function(){return this.name+"[ "+ft(this.keys()).join(", ")+" ]"},t}();Yi(mi.prototype,function(){return this.values()});Ot(mi.prototype,Xi(),"Set");var vt=Oe("ObservableSet",mi),nr=function(){function t(e,n,i){this.target=e,this.name=n,this.defaultEnhancer=i,this.values={}}return t.prototype.read=function(e,n){if(!(this.target!==e&&(this.illegalAccess(e,n),!this.values[n])))return this.values[n].get()},t.prototype.write=function(e,n,i){var r=this.target;r!==e&&this.illegalAccess(e,n);var o=this.values[n];if(o instanceof Le){o.set(i);return}if(ce(this)){var a=de(this,{type:"update",object:r,name:n,newValue:i});if(!a)return;i=a.newValue}if(i=o.prepareNewValue(i),i!==v.UNCHANGED){var s=ie(this),m=B(),a=s||m?{type:"update",object:r,oldValue:o.value,name:n,newValue:i}:null;m&&ee(K({},a,{name:this.name,key:n})),o.setNewValue(i),s&&ne(this,a),m&&te()}},t.prototype.remove=function(e){if(this.values[e]){var n=this.target;if(ce(this)){var i=de(this,{object:n,name:e,type:"remove"});if(!i)return}try{me();var r=ie(this),o=B(),a=this.values[e].get();this.keys&&this.keys.remove(e),delete this.values[e],delete this.target[e];var i=r||o?{type:"remove",object:n,oldValue:a,name:e}:null;o&&ee(K({},i,{name:this.name,key:e})),r&&ne(this,i),o&&te()}finally{ve()}}},t.prototype.illegalAccess=function(e,n){console.warn("Property '"+n+"' of '"+e+"' was accessed through the prototype chain. Use 'decorate' instead to declare the prop or access it statically through it's owner")},t.prototype.observe=function(e,n){return Rt(this,e)},t.prototype.intercept=function(e){return It(this,e)},t.prototype.getKeys=function(){var e=this;return this.keys===void 0&&(this.keys=new be(Object.keys(this.values).filter(function(n){return e.values[n]instanceof ze}),zt,"keys("+this.name+")",!0)),this.keys.slice()},t}();function en(t,e,n){e===void 0&&(e=""),n===void 0&&(n=Dt);var i=t.$mobx;return i||(pt(t)||(e=(t.constructor.name||"ObservableObject")+"@"+Y()),e||(e="ObservableObject@"+Y()),i=new nr(t,e,n),Ot(t,"$mobx",i),i)}function T2(t,e,n,i){var r=en(t);if(ce(r)){var o=de(r,{object:t,name:e,type:"add",newValue:n});if(!o)return;n=o.newValue}var a=r.values[e]=new ze(n,i,r.name+"."+e,!1);n=a.value,Object.defineProperty(t,e,R2(e)),r.keys&&r.keys.push(e),F2(r,t,e,n)}function I2(t,e,n){var i=en(t);n.name=i.name+"."+e,n.context=t,i.values[e]=new Le(n),Object.defineProperty(t,e,P2(e))}var x1=Object.create(null),E1=Object.create(null);function R2(t){return x1[t]||(x1[t]={configurable:!0,enumerable:!0,get:function(){return this.$mobx.read(this,t)},set:function(e){this.$mobx.write(this,t,e)}})}function M1(t){var e=t.$mobx;return e||(je(t),t.$mobx)}function P2(t){return E1[t]||(E1[t]={configurable:v.computedConfigurable,enumerable:!1,get:function(){return M1(this).read(this,t)},set:function(e){M1(this).write(this,t,e)}})}function F2(t,e,n,i){var r=ie(t),o=B(),a=r||o?{type:"add",object:e,name:n,newValue:i}:null;o&&ee(K({},a,{name:t.name,key:n})),r&&ne(t,a),o&&te()}var k2=Oe("ObservableObjectAdministration",nr);function Lt(t){return Wi(t)?(je(t),k2(t.$mobx)):!1}function ge(t,e){if(typeof t=="object"&&t!==null){if(pi(t))return e!==void 0&&T(!1),t.$mobx.atom;if(vt(t))return t.$mobx;if(qe(t)){var n=t;if(e===void 0)return ge(n._keys);var i=n._data.get(e)||n._hasMap.get(e);return i||T(!1),i}if(je(t),e&&!t.$mobx&&t[e],Lt(t)){if(!e)return T(!1);var i=t.$mobx.values[e];return i||T(!1),i}if(Qi(t)||ui(t)||li(t))return t}else if(typeof t=="function"&&li(t.$mobx))return t.$mobx;return T(!1)}function rr(t,e){if(t||T("Expecting some object"),e!==void 0)return rr(ge(t,e));if(Qi(t)||ui(t)||li(t)||qe(t)||vt(t))return t;if(je(t),t.$mobx)return t.$mobx;T(!1)}function V2(t,e){var n;return e!==void 0?n=ge(t,e):Lt(t)||qe(t)||vt(t)?n=rr(t):n=ge(t),n.name}var N1=Object.prototype.toString;function tn(t,e,n){return n===void 0&&(n=-1),Gi(t,e,n)}function Gi(t,e,n,i,r){if(t===e)return t!==0||1/t===1/e;if(t==null||e==null)return!1;if(t!==t)return e!==e;var o=typeof t;if(o!=="function"&&o!=="object"&&typeof e!="object")return!1;t=w1(t),e=w1(e);var a=N1.call(t);if(a!==N1.call(e))return!1;switch(a){case"[object RegExp]":case"[object String]":return""+t==""+e;case"[object Number]":return+t!=+t?+e!=+e:+t==0?1/+t===1/e:+t==+e;case"[object Date]":case"[object Boolean]":return+t==+e;case"[object Symbol]":return typeof Symbol<"u"&&Symbol.valueOf.call(t)===Symbol.valueOf.call(e)}var s=a==="[object Array]";if(!s){if(typeof t!="object"||typeof e!="object")return!1;var m=t.constructor,C=e.constructor;if(m!==C&&!(typeof m=="function"&&m instanceof m&&typeof C=="function"&&C instanceof C)&&"constructor"in t&&"constructor"in e)return!1}if(n===0)return!1;n<0&&(n=-1),i=i||[],r=r||[];for(var A=i.length;A--;)if(i[A]===t)return r[A]===e;if(i.push(t),r.push(e),s){if(A=t.length,A!==e.length)return!1;for(;A--;)if(!Gi(t[A],e[A],n-1,i,r))return!1}else{var X=Object.keys(t),Ae=void 0;if(A=X.length,Object.keys(e).length!==A)return!1;for(;A--;)if(Ae=X[A],!(H2(e,Ae)&&Gi(t[Ae],e[Ae],n-1,i,r)))return!1}return i.pop(),r.pop(),!0}function w1(t){return pi(t)?t.peek():ht(t)||qe(t)||At(t)||vt(t)?ft(t.entries()):t}function H2(t,e){return Object.prototype.hasOwnProperty.call(t,e)}(function(){function t(){}if(t.name!=="testCodeMinification"&&!1)var e})();var B2="$mobx";typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__=="object"&&__MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx({spy:p2,extras:{getDebugName:V2},$mobx:B2});var j2=t=>({$implicit:t});function U2(t,e){t&1&&(c(0,"span"),p(1,"loading..."),d())}var G2=["*"],bt=()=>({dontDetach:!0});function $2(t,e){if(t&1&&(Ie(0),c(1,"div"),Nn(2),d(),Re()),t&2){let n=u();l(),Pe("height",n.getTotalHeight())}}function q2(t,e){if(t&1){let n=F();Ie(0),c(1,"input",1),b("click",function(r){_(n);let o=u();return x(o.node.mouseAction("checkboxClick",r))}),d(),Re()}if(t&2){let n=u();l(),f("checked",n.node.isSelected)("indeterminate",n.node.isPartiallySelected)}}function W2(t,e){if(t&1){let n=F();c(0,"span",3),b("click",function(r){_(n);let o=u(2);return x(o.node.mouseAction("expanderClick",r))}),g(1,"span",4),d()}if(t&2){let n=u(2);q("toggle-children-wrapper-expanded",n.node.isExpanded)("toggle-children-wrapper-collapsed",n.node.isCollapsed)}}function K2(t,e){t&1&&g(0,"span",5)}function Y2(t,e){if(t&1&&(Ie(0),z(1,W2,2,4,"span",1)(2,K2,1,0,"span",2),Re()),t&2){let n=u();l(),f("ngIf",n.node.hasChildren),l(),f("ngIf",!n.node.hasChildren)}}var X2=(t,e,n)=>({$implicit:t,node:e,index:n});function Q2(t,e){if(t&1&&(c(0,"span"),p(1),d()),t&2){let n=u();l(),k(n.node.displayField)}}var fr=(t,e,n,i)=>({$implicit:t,node:e,index:n,templates:i});function J2(t,e){if(t&1&&g(0,"tree-node-checkbox",4),t&2){let n=u(2);f("node",n.node)}}function Z2(t,e){if(t&1){let n=F();c(0,"div",2),z(1,J2,1,1,"tree-node-checkbox",3),g(2,"tree-node-expander",4),c(3,"div",5),b("click",function(r){_(n);let o=u();return x(o.node.mouseAction("click",r))})("dblclick",function(r){_(n);let o=u();return x(o.node.mouseAction("dblClick",r))})("mouseover",function(r){_(n);let o=u();return x(o.node.mouseAction("mouseOver",r))})("mouseout",function(r){_(n);let o=u();return x(o.node.mouseAction("mouseOut",r))})("contextmenu",function(r){_(n);let o=u();return x(o.node.mouseAction("contextMenu",r))})("treeDrop",function(r){_(n);let o=u();return x(o.node.onDrop(r))})("treeDropDragOver",function(r){_(n);let o=u();return x(o.node.mouseAction("dragOver",r))})("treeDropDragLeave",function(r){_(n);let o=u();return x(o.node.mouseAction("dragLeave",r))})("treeDropDragEnter",function(r){_(n);let o=u();return x(o.node.mouseAction("dragEnter",r))}),g(4,"tree-node-content",6),d()()}if(t&2){let n=u();Pe("padding-left",n.node.getNodePadding()),l(),f("ngIf",n.node.options.useCheckbox),l(),f("node",n.node),l(),q("node-content-wrapper-active",n.node.isActive)("node-content-wrapper-focused",n.node.isFocused),f("treeAllowDrop",n.node.allowDrop)("allowDragoverStyling",n.node.allowDragoverStyling())("treeDrag",n.node)("treeDragEnabled",n.node.allowDrag()),l(),f("node",n.node)("index",n.index)("template",n.templates.treeNodeTemplate)}}function eo(t,e){if(t&1&&g(0,"tree-node-collection",4),t&2){let n=u(3);f("nodes",n.node.children)("templates",n.templates)("treeModel",n.node.treeModel)}}function to(t,e){if(t&1&&g(0,"tree-loading-component",5),t&2){let n=u(3);Pe("padding-left",n.node.getNodePadding()),f("template",n.templates.loadingTemplate)("node",n.node)}}function io(t,e){if(t&1&&(c(0,"div"),z(1,eo,1,3,"tree-node-collection",2)(2,to,1,4,"tree-loading-component",3),d()),t&2){let n=u(2);q("tree-children",!0)("tree-children-no-padding",n.node.options.levelPadding),l(),f("ngIf",n.node.children),l(),f("ngIf",!n.node.children)}}function no(t,e){if(t&1&&(Ie(0),z(1,io,3,6,"div",1),Re()),t&2){let n=u();l(),f("treeAnimateOpen",n.node.isExpanded)("treeAnimateOpenSpeed",n.node.options.animateSpeed)("treeAnimateOpenAcceleration",n.node.options.animateAcceleration)("treeAnimateOpenEnabled",n.node.options.animateExpand)}}function ro(t,e){if(t&1&&g(0,"tree-node",2),t&2){let n=e.$implicit,i=e.index,r=u(2);f("node",n)("index",i)("templates",r.templates)}}function oo(t,e){if(t&1&&(Ie(0),c(1,"div"),z(2,ro,1,3,"tree-node",1),d(),Re()),t&2){let n=u();l(),Pe("margin-top",n.marginTop),l(),f("ngForOf",n.viewportNodes)("ngForTrackBy",n.trackNode)}}function ao(t,e){if(t&1&&g(0,"tree-node-drop-slot",6),t&2){let n=u(3);f("dropIndex",n.node.index)("node",n.node.parent)}}function so(t,e){if(t&1&&(c(0,"div"),z(1,ao,1,2,"tree-node-drop-slot",3),g(2,"tree-node-wrapper",4)(3,"tree-node-children",5)(4,"tree-node-drop-slot",6),d()),t&2){let n=u(2);Qe(n.node.getClass()),q("tree-node",!0)("tree-node-expanded",n.node.isExpanded&&n.node.hasChildren)("tree-node-collapsed",n.node.isCollapsed&&n.node.hasChildren)("tree-node-leaf",n.node.isLeaf)("tree-node-active",n.node.isActive)("tree-node-focused",n.node.isFocused),l(),f("ngIf",n.index===0),l(),f("node",n.node)("index",n.index)("templates",n.templates),l(),f("node",n.node)("templates",n.templates),l(),f("dropIndex",n.node.index+1)("node",n.node.parent)}}function lo(t,e){if(t&1&&(Ie(0),z(1,so,5,22,"div",1),Se(2,2),Re()),t&2){let n=u();l(),f("ngIf",!n.templates.treeNodeFullTemplate),l(),f("ngTemplateOutlet",n.templates.treeNodeFullTemplate)("ngTemplateOutletContext",Ht(3,fr,n.node,n.node,n.index,n.templates))}}var co=["loadingTemplate"],fo=["treeNodeTemplate"],uo=["treeNodeWrapperTemplate"],po=["treeNodeFullTemplate"],ho=["viewport"],mo=(t,e,n,i)=>({loadingTemplate:t,treeNodeTemplate:e,treeNodeWrapperTemplate:n,treeNodeFullTemplate:i});function vo(t,e){if(t&1&&g(0,"tree-node-collection",4),t&2){let n=u();f("nodes",n.treeModel.roots)("treeModel",n.treeModel)("templates",Ht(3,mo,n.loadingTemplate,n.treeNodeTemplate,n.treeNodeWrapperTemplate,n.treeNodeFullTemplate))}}function go(t,e){if(t&1&&g(0,"tree-node-drop-slot",5),t&2){let n=u();f("dropIndex",0)("node",n.treeModel.virtualRoot)}}var Ct=(()=>{let e=class e{constructor(){this.templateRef=h(Ni),this.viewContainer=h(wi),this.templateBindings={}}ngOnInit(){this.view=this.viewContainer.createEmbeddedView(this.templateRef),this.dispose&&this.dispose(),this.shouldDetach()&&this.view.detach(),this.autoDetect(this.view)}shouldDetach(){return this.treeMobxAutorun&&this.treeMobxAutorun.detach}autoDetect(i){this.dispose=Tt(()=>i.detectChanges())}ngOnDestroy(){this.dispose&&this.dispose()}};e.\u0275fac=function(r){return new(r||e)},e.\u0275dir=Te({type:e,selectors:[["","treeMobxAutorun",""]],inputs:{treeMobxAutorun:"treeMobxAutorun"}});let t=e;return t})(),G={LEFT:37,UP:38,RIGHT:39,DOWN:40,ENTER:13,SPACE:32,CONTEXT_MENU:32},I={TOGGLE_ACTIVE:(t,e,n)=>e&&e.toggleActivated(),TOGGLE_ACTIVE_MULTI:(t,e,n)=>e&&e.toggleActivated(!0),TOGGLE_SELECTED:(t,e,n)=>e&&e.toggleSelected(),ACTIVATE:(t,e,n)=>e.setIsActive(!0),DEACTIVATE:(t,e,n)=>e.setIsActive(!1),SELECT:(t,e,n)=>e.setIsSelected(!0),DESELECT:(t,e,n)=>e.setIsSelected(!1),FOCUS:(t,e,n)=>e.focus(),TOGGLE_EXPANDED:(t,e,n)=>e.hasChildren&&e.toggleExpanded(),EXPAND:(t,e,n)=>e.expand(),COLLAPSE:(t,e,n)=>e.collapse(),DRILL_DOWN:(t,e,n)=>t.focusDrillDown(),DRILL_UP:(t,e,n)=>t.focusDrillUp(),NEXT_NODE:(t,e,n)=>t.focusNextNode(),PREVIOUS_NODE:(t,e,n)=>t.focusPreviousNode(),MOVE_NODE:(t,e,n,{from:i,to:r})=>{n.ctrlKey?t.copyNode(i,r):t.moveNode(i,r)}},gt={mouse:{click:I.TOGGLE_ACTIVE,dblClick:null,contextMenu:null,expanderClick:I.TOGGLE_EXPANDED,checkboxClick:I.TOGGLE_SELECTED,drop:I.MOVE_NODE},keys:{[G.RIGHT]:I.DRILL_DOWN,[G.LEFT]:I.DRILL_UP,[G.DOWN]:I.NEXT_NODE,[G.UP]:I.PREVIOUS_NODE,[G.SPACE]:I.TOGGLE_ACTIVE,[G.ENTER]:I.TOGGLE_ACTIVE}},bi=class{get hasChildrenField(){return this.options.hasChildrenField||"hasChildren"}get childrenField(){return this.options.childrenField||"children"}get displayField(){return this.options.displayField||"name"}get idField(){return this.options.idField||"id"}get isExpandedField(){return this.options.isExpandedField||"isExpanded"}get getChildren(){return this.options.getChildren}get levelPadding(){return this.options.levelPadding||0}get useVirtualScroll(){return this.options.useVirtualScroll}get animateExpand(){return this.options.animateExpand}get animateSpeed(){return this.options.animateSpeed||1}get animateAcceleration(){return this.options.animateAcceleration||1.2}get scrollOnActivate(){return this.options.scrollOnActivate===void 0?!0:this.options.scrollOnActivate}get rtl(){return!!this.options.rtl}get rootId(){return this.options.rootId}get useCheckbox(){return this.options.useCheckbox}get useTriState(){return this.options.useTriState===void 0?!0:this.options.useTriState}get scrollContainer(){return this.options.scrollContainer}get allowDragoverStyling(){return this.options.allowDragoverStyling===void 0?!0:this.options.allowDragoverStyling}constructor(e={}){this.options=e,this.actionMapping={mouse:{click:this.options?.actionMapping?.mouse?.click??gt.mouse.click,dblClick:this.options?.actionMapping?.mouse?.dblClick??gt.mouse.dblClick,contextMenu:this.options?.actionMapping?.mouse?.contextMenu??gt.mouse.contextMenu,expanderClick:this.options?.actionMapping?.mouse?.expanderClick??gt.mouse.expanderClick,checkboxClick:this.options?.actionMapping?.mouse?.checkboxClick??gt.mouse.checkboxClick,drop:this.options?.actionMapping?.mouse?.drop??gt.mouse.drop,dragStart:this.options?.actionMapping?.mouse?.dragStart??void 0,drag:this.options?.actionMapping?.mouse?.drag??void 0,dragEnd:this.options?.actionMapping?.mouse?.dragEnd??void 0,dragOver:this.options?.actionMapping?.mouse?.dragOver??void 0,dragLeave:this.options?.actionMapping?.mouse?.dragLeave??void 0,dragEnter:this.options?.actionMapping?.mouse?.dragEnter??void 0,mouseOver:this.options?.actionMapping?.mouse?.mouseOver??void 0,mouseOut:this.options?.actionMapping?.mouse?.mouseOut??void 0},keys:{[G.RIGHT]:I.DRILL_DOWN,[G.LEFT]:I.DRILL_UP,[G.DOWN]:I.NEXT_NODE,[G.UP]:I.PREVIOUS_NODE,[G.SPACE]:I.TOGGLE_ACTIVE,[G.ENTER]:I.TOGGLE_ACTIVE}},this.options?.actionMapping?.keys&&(this.actionMapping.keys=Q(Q({},this.actionMapping.keys),this.options.actionMapping.keys)),e.rtl&&(this.actionMapping.keys[G.RIGHT]=e.actionMapping?.keys[G.RIGHT]||I.DRILL_UP,this.actionMapping.keys[G.LEFT]=e.actionMapping?.keys[G.LEFT]||I.DRILL_DOWN)}getNodeClone(e){if(this.options.getNodeClone)return this.options.getNodeClone(e);let n=Object.assign({},e.data);return n.id&&delete n.id,n}allowDrop(e,n,i){return this.options.allowDrop instanceof Function?this.options.allowDrop(e,n,i):this.options.allowDrop===void 0?!0:this.options.allowDrop}allowDrag(e){return this.options.allowDrag instanceof Function?this.options.allowDrag(e):this.options.allowDrag}nodeClass(e){return this.options.nodeClass?this.options.nodeClass(e):""}nodeHeight(e){if(e.data.virtual)return 0;let n=this.options.nodeHeight||22;return typeof n=="function"&&(n=n(e)),n+(e.index===0?2:1)*this.dropSlotHeight}get dropSlotHeight(){return typeof this.options.dropSlotHeight=="number"?this.options.dropSlotHeight:2}},P={toggleExpanded:"toggleExpanded",activate:"activate",deactivate:"deactivate",nodeActivate:"nodeActivate",nodeDeactivate:"nodeDeactivate",select:"select",deselect:"deselect",focus:"focus",blur:"blur",initialized:"initialized",updateData:"updateData",moveNode:"moveNode",copyNode:"copyNode",event:"event",loadNodeChildren:"loadNodeChildren",changeFilter:"changeFilter",stateChange:"stateChange"},$=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var s=t.length-1;s>=0;s--)(a=t[s])&&(o=(r<3?a(o):r>3?a(e,n,o):a(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},V=class t{get isHidden(){return this.treeModel.isHidden(this)}get isExpanded(){return this.treeModel.isExpanded(this)}get isActive(){return this.treeModel.isActive(this)}get isFocused(){return this.treeModel.isNodeFocused(this)}get isSelected(){return this.isSelectable()?this.treeModel.isSelected(this):this.children.some(e=>e.isSelected)}get isAllSelected(){return this.isSelectable()?this.treeModel.isSelected(this):this.children.every(e=>e.isAllSelected)}get isPartiallySelected(){return this.isSelected&&!this.isAllSelected}get level(){return this.parent?this.parent.level+1:0}get path(){return this.parent?[...this.parent.path,this.id]:[]}get elementRef(){throw`Element Ref is no longer supported since introducing virtual scroll
|
|
17
|
-
|
|
18
|
-
You may use a template to obtain a reference to the element`}get originalNode(){return this._originalNode}constructor(e,n,i,r){this.data=e,this.parent=n,this.treeModel=i,this.position=0,this.allowDrop=(o,a)=>this.options.allowDrop(o,{parent:this,index:0},a),this.allowDragoverStyling=()=>this.options.allowDragoverStyling,(this.id===void 0||this.id===null)&&(this.id=bo()),this.index=r,this.getField("children")&&this._initChildren(),this.autoLoadChildren()}get hasChildren(){return!!(this.getField("hasChildren")||this.children&&this.children.length>0)}get isCollapsed(){return!this.isExpanded}get isLeaf(){return!this.hasChildren}get isRoot(){return this.parent.data.virtual}get realParent(){return this.isRoot?null:this.parent}get options(){return this.treeModel.options}fireEvent(e){this.treeModel.fireEvent(e)}get displayField(){return this.getField("display")}get id(){return this.getField("id")}set id(e){this.setField("id",e)}getField(e){return this.data[this.options[`${e}Field`]]}setField(e,n){this.data[this.options[`${e}Field`]]=n}_findAdjacentSibling(e,n=!1){let i=this._getParentsChildren(n),r=i.indexOf(this);return i.length>r+e?i[r+e]:null}findNextSibling(e=!1){return this._findAdjacentSibling(1,e)}findPreviousSibling(e=!1){return this._findAdjacentSibling(-1,e)}getVisibleChildren(){return this.visibleChildren}get visibleChildren(){return(this.children||[]).filter(e=>!e.isHidden)}getFirstChild(e=!1){let n=e?this.visibleChildren:this.children;return n!=null&&n.length?n[0]:null}getLastChild(e=!1){let n=e?this.visibleChildren:this.children;return n!=null&&n.length?n[n.length-1]:null}findNextNode(e=!0,n=!1){return e&&this.isExpanded&&this.getFirstChild(n)||this.findNextSibling(n)||this.parent&&this.parent.findNextNode(!1,n)}findPreviousNode(e=!1){let n=this.findPreviousSibling(e);return n?n._getLastOpenDescendant(e):this.realParent}_getLastOpenDescendant(e=!1){let n=this.getLastChild(e);return this.isCollapsed||!n?this:n._getLastOpenDescendant(e)}_getParentsChildren(e=!1){return this.parent&&(e?this.parent.getVisibleChildren():this.parent.children)||[]}getIndexInParent(e=!1){return this._getParentsChildren(e).indexOf(this)}isDescendantOf(e){return this===e?!0:this.parent&&this.parent.isDescendantOf(e)}getNodePadding(){return this.options.levelPadding*(this.level-1)+"px"}getClass(){return[this.options.nodeClass(this),`tree-node-level-${this.level}`].join(" ")}onDrop(e){this.mouseAction("drop",e.event,{from:e.element,to:{parent:this,index:0,dropOnNode:!0}})}allowDrag(){return this.options.allowDrag(this)}loadNodeChildren(){return this.options.getChildren?Promise.resolve(this.options.getChildren(this)).then(e=>{e&&(this.setField("children",e),this._initChildren(),this.options.useTriState&&this.treeModel.isSelected(this)&&this.setIsSelected(!0),this.children.forEach(n=>{n.getField("isExpanded")&&n.hasChildren&&n.expand()}))}).then(()=>{this.fireEvent({eventName:P.loadNodeChildren,node:this})}):Promise.resolve()}expand(){return this.isExpanded||this.toggleExpanded(),this}collapse(){return this.isExpanded&&this.toggleExpanded(),this}doForAll(e){Promise.resolve(e(this)).then(()=>{this.children&&this.children.forEach(n=>n.doForAll(e))})}expandAll(){this.doForAll(e=>e.expand())}collapseAll(){this.doForAll(e=>e.collapse())}ensureVisible(){return this.realParent&&(this.realParent.expand(),this.realParent.ensureVisible()),this}toggleExpanded(){return this.setIsExpanded(!this.isExpanded),this}setIsExpanded(e){return this.hasChildren&&this.treeModel.setExpandedNode(this,e),this}autoLoadChildren(){this.handler=$e(()=>this.isExpanded,e=>{!this.children&&this.hasChildren&&e&&this.loadNodeChildren()},{fireImmediately:!0})}dispose(){this.children&&this.children.forEach(e=>e.dispose()),this.handler&&this.handler(),this.parent=null,this.children=null}setIsActive(e,n=!1){return this.treeModel.setActiveNode(this,e,n),e&&this.focus(this.options.scrollOnActivate),this}isSelectable(){return this.isLeaf||!this.children||!this.options.useTriState}setIsSelected(e){return this.isSelectable()?this.treeModel.setSelectedNode(this,e):this.visibleChildren.forEach(n=>n.setIsSelected(e)),this}toggleSelected(){return this.setIsSelected(!this.isSelected),this}toggleActivated(e=!1){return this.setIsActive(!this.isActive,e),this}setActiveAndVisible(e=!1){return this.setIsActive(!0,e).ensureVisible(),setTimeout(this.scrollIntoView.bind(this)),this}scrollIntoView(e=!1){this.treeModel.virtualScroll.scrollIntoView(this,e)}focus(e=!0){let n=this.treeModel.getFocusedNode();return this.treeModel.setFocusedNode(this),e&&this.scrollIntoView(),n&&this.fireEvent({eventName:P.blur,node:n}),this.fireEvent({eventName:P.focus,node:this}),this}blur(){let e=this.treeModel.getFocusedNode();return this.treeModel.setFocusedNode(null),e&&this.fireEvent({eventName:P.blur,node:this}),this}setIsHidden(e){this.treeModel.setIsHidden(this,e)}hide(){this.setIsHidden(!0)}show(){this.setIsHidden(!1)}mouseAction(e,n,i=null){this.treeModel.setFocus(!0);let o=this.options.actionMapping.mouse[e];o&&o(this.treeModel,this,n,i)}getSelfHeight(){return this.options.nodeHeight(this)}_initChildren(){this.children=this.getField("children").map((e,n)=>new t(e,this,this.treeModel,n))}};$([R],V.prototype,"isHidden",null);$([R],V.prototype,"isExpanded",null);$([R],V.prototype,"isActive",null);$([R],V.prototype,"isFocused",null);$([R],V.prototype,"isSelected",null);$([R],V.prototype,"isAllSelected",null);$([R],V.prototype,"isPartiallySelected",null);$([E],V.prototype,"children",void 0);$([E],V.prototype,"index",void 0);$([E],V.prototype,"position",void 0);$([E],V.prototype,"height",void 0);$([R],V.prototype,"level",null);$([R],V.prototype,"path",null);$([R],V.prototype,"visibleChildren",null);$([M],V.prototype,"setIsSelected",null);$([M],V.prototype,"_initChildren",null);function bo(){return Math.floor(Math.random()*1e13)}var N=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var s=t.length-1;s>=0;s--)(a=t[s])&&(o=(r<3?a(o):r>3?a(e,n,o):a(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},y=(()=>{let e=class e{constructor(){this.options=new bi,this.eventNames=Object.keys(P),this.expandedNodeIds={},this.selectedLeafNodeIds={},this.activeNodeIds={},this.hiddenNodeIds={},this.focusedNodeId=null,this.firstUpdate=!0,this.subscriptions=[]}fireEvent(i){i.treeModel=this,this.events[i.eventName].emit(i),this.events.event.emit(i)}subscribe(i,r){let o=this.events[i].subscribe(r);this.subscriptions.push(o)}getFocusedNode(){return this.focusedNode}getActiveNode(){return this.activeNodes[0]}getActiveNodes(){return this.activeNodes}getVisibleRoots(){return this.virtualRoot.visibleChildren}getFirstRoot(i=!1){let r=i?this.getVisibleRoots():this.roots;return r!=null&&r.length?r[0]:null}getLastRoot(i=!1){let r=i?this.getVisibleRoots():this.roots;return r!=null&&r.length?r[r.length-1]:null}get isFocused(){return e.focusedTree===this}isNodeFocused(i){return this.focusedNode===i}isEmptyTree(){return this.roots&&this.roots.length===0}get focusedNode(){return this.focusedNodeId?this.getNodeById(this.focusedNodeId):null}get expandedNodes(){return Object.keys(this.expandedNodeIds).filter(r=>this.expandedNodeIds[r]).map(r=>this.getNodeById(r)).filter(Boolean)}get activeNodes(){return Object.keys(this.activeNodeIds).filter(r=>this.activeNodeIds[r]).map(r=>this.getNodeById(r)).filter(Boolean)}get hiddenNodes(){return Object.keys(this.hiddenNodeIds).filter(r=>this.hiddenNodeIds[r]).map(r=>this.getNodeById(r)).filter(Boolean)}get selectedLeafNodes(){return Object.keys(this.selectedLeafNodeIds).filter(r=>this.selectedLeafNodeIds[r]).map(r=>this.getNodeById(r)).filter(Boolean)}getNodeByPath(i,r=null){if(!i)return null;if(r=r||this.virtualRoot,i.length===0)return r;if(!r.children)return null;let o=i.shift(),a=r.children.find(s=>s.id===o);return a?this.getNodeByPath(i,a):null}getNodeById(i){let r=i.toString();return this.getNodeBy(o=>o.id.toString()===r)}getNodeBy(i,r=null){if(r=r||this.virtualRoot,!r.children)return null;let o=r.children.find(i);if(o)return o;for(let a of r.children){let s=this.getNodeBy(i,a);if(s)return s}}isExpanded(i){return this.expandedNodeIds[i.id]}isHidden(i){return this.hiddenNodeIds[i.id]}isActive(i){return this.activeNodeIds[i.id]}isSelected(i){return this.selectedLeafNodeIds[i.id]}ngOnDestroy(){this.dispose(),this.unsubscribeAll()}dispose(){this.virtualRoot&&this.virtualRoot.dispose()}unsubscribeAll(){this.subscriptions.forEach(i=>i.unsubscribe()),this.subscriptions=[]}setData({nodes:i,options:r=null,events:o=null}){r&&(this.options=new bi(r)),o&&(this.events=o),i&&(this.nodes=i),this.update()}update(){let i={id:this.options.rootId,virtual:!0,[this.options.childrenField]:this.nodes};this.dispose(),this.virtualRoot=new V(i,null,this,0),this.roots=this.virtualRoot.children,this.firstUpdate?this.roots&&(this.firstUpdate=!1,this._calculateExpandedNodes()):this.fireEvent({eventName:P.updateData})}setFocusedNode(i){this.focusedNodeId=i?i.id:null}setFocus(i){e.focusedTree=i?this:null}doForAll(i){this.roots.forEach(r=>r.doForAll(i))}focusNextNode(){let i=this.getFocusedNode(),r=i?i.findNextNode(!0,!0):this.getFirstRoot(!0);r&&r.focus()}focusPreviousNode(){let i=this.getFocusedNode(),r=i?i.findPreviousNode(!0):this.getLastRoot(!0);r&&r.focus()}focusDrillDown(){let i=this.getFocusedNode();if(i&&i.isCollapsed&&i.hasChildren)i.toggleExpanded();else{let r=i?i.getFirstChild(!0):this.getFirstRoot(!0);r&&r.focus()}}focusDrillUp(){let i=this.getFocusedNode();if(i)if(i.isExpanded)i.toggleExpanded();else{let r=i.realParent;r&&r.focus()}}setActiveNode(i,r,o=!1){o?this._setActiveNodeMulti(i,r):this._setActiveNodeSingle(i,r),r?(i.focus(this.options.scrollOnActivate),this.fireEvent({eventName:P.activate,node:i}),this.fireEvent({eventName:P.nodeActivate,node:i})):(this.fireEvent({eventName:P.deactivate,node:i}),this.fireEvent({eventName:P.nodeDeactivate,node:i}))}setSelectedNode(i,r){this.selectedLeafNodeIds=Object.assign({},this.selectedLeafNodeIds,{[i.id]:r}),r?(i.focus(),this.fireEvent({eventName:P.select,node:i})):this.fireEvent({eventName:P.deselect,node:i})}setExpandedNode(i,r){this.expandedNodeIds=Object.assign({},this.expandedNodeIds,{[i.id]:r}),this.fireEvent({eventName:P.toggleExpanded,node:i,isExpanded:r})}expandAll(){this.roots.forEach(i=>i.expandAll())}collapseAll(){this.roots.forEach(i=>i.collapseAll())}setIsHidden(i,r){this.hiddenNodeIds=Object.assign({},this.hiddenNodeIds,{[i.id]:r})}setHiddenNodeIds(i){this.hiddenNodeIds=i.reduce((r,o)=>Object.assign(r,{[o]:!0}),{})}performKeyAction(i,r){let o=this.options.actionMapping.keys[r.keyCode];return o?(r.preventDefault(),o(this,i,r),!0):!1}filterNodes(i,r=!0){let o;if(!i)return this.clearFilter();if(i&&typeof i.valueOf()=="string")o=s=>s.displayField.toLowerCase().indexOf(i.toLowerCase())!==-1;else if(i&&typeof i=="function")o=i;else{console.error("Don't know what to do with filter",i),console.error("Should be either a string or function");return}let a={};this.roots.forEach(s=>this._filterNode(a,s,o,r)),this.hiddenNodeIds=a,this.fireEvent({eventName:P.changeFilter})}clearFilter(){this.hiddenNodeIds={},this.fireEvent({eventName:P.changeFilter})}moveNode(i,r){let o=i.getIndexInParent(),a=i.parent;if(!this.canMoveNode(i,r,o))return;let s=a.getField("children");r.parent.getField("children")||r.parent.setField("children",[]);let m=r.parent.getField("children"),C=s.splice(o,1)[0],A=a===r.parent&&r.index>o?r.index-1:r.index;m.splice(A,0,C),a.treeModel.update(),r.parent.treeModel!==a.treeModel&&r.parent.treeModel.update(),this.fireEvent({eventName:P.moveNode,node:C,to:{parent:r.parent.data,index:A},from:{parent:a.data,index:o}})}copyNode(i,r){let o=i.getIndexInParent();if(!this.canMoveNode(i,r,o))return;r.parent.getField("children")||r.parent.setField("children",[]);let a=r.parent.getField("children"),s=this.options.getNodeClone(i);a.splice(r.index,0,s),i.treeModel.update(),r.parent.treeModel!==i.treeModel&&r.parent.treeModel.update(),this.fireEvent({eventName:P.copyNode,node:s,to:{parent:r.parent.data,index:r.index}})}getState(){return{expandedNodeIds:this.expandedNodeIds,selectedLeafNodeIds:this.selectedLeafNodeIds,activeNodeIds:this.activeNodeIds,hiddenNodeIds:this.hiddenNodeIds,focusedNodeId:this.focusedNodeId}}setState(i){i&&Object.assign(this,{expandedNodeIds:i.expandedNodeIds||{},selectedLeafNodeIds:i.selectedLeafNodeIds||{},activeNodeIds:i.activeNodeIds||{},hiddenNodeIds:i.hiddenNodeIds||{},focusedNodeId:i.focusedNodeId})}subscribeToState(i){Tt(()=>i(this.getState()))}canMoveNode(i,r,o=void 0){let a=o||i.getIndexInParent();return i.parent===r.parent&&o===r.index?!1:!r.parent.isDescendantOf(i)}calculateExpandedNodes(){this._calculateExpandedNodes()}_filterNode(i,r,o,a){let s=o(r);return r.children&&r.children.forEach(m=>{this._filterNode(i,m,o,a)&&(s=!0)}),s||(i[r.id]=!0),a&&s&&r.ensureVisible(),s}_calculateExpandedNodes(i=null){i=i||this.virtualRoot,i.data[this.options.isExpandedField]&&(this.expandedNodeIds=Object.assign({},this.expandedNodeIds,{[i.id]:!0})),i.children&&i.children.forEach(r=>this._calculateExpandedNodes(r))}_setActiveNodeSingle(i,r){this.activeNodes.filter(o=>o!==i).forEach(o=>{this.fireEvent({eventName:P.deactivate,node:o}),this.fireEvent({eventName:P.nodeDeactivate,node:o})}),r?this.activeNodeIds={[i.id]:!0}:this.activeNodeIds={}}_setActiveNodeMulti(i,r){this.activeNodeIds=Object.assign({},this.activeNodeIds,{[i.id]:r})}};e.focusedTree=null,e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=ye({token:e,factory:e.\u0275fac});let t=e;return t})();N([E],y.prototype,"roots",void 0);N([E],y.prototype,"expandedNodeIds",void 0);N([E],y.prototype,"selectedLeafNodeIds",void 0);N([E],y.prototype,"activeNodeIds",void 0);N([E],y.prototype,"hiddenNodeIds",void 0);N([E],y.prototype,"focusedNodeId",void 0);N([E],y.prototype,"virtualRoot",void 0);N([R],y.prototype,"focusedNode",null);N([R],y.prototype,"expandedNodes",null);N([R],y.prototype,"activeNodes",null);N([R],y.prototype,"hiddenNodes",null);N([R],y.prototype,"selectedLeafNodes",null);N([M],y.prototype,"setData",null);N([M],y.prototype,"update",null);N([M],y.prototype,"setFocusedNode",null);N([M],y.prototype,"setFocus",null);N([M],y.prototype,"doForAll",null);N([M],y.prototype,"focusNextNode",null);N([M],y.prototype,"focusPreviousNode",null);N([M],y.prototype,"focusDrillDown",null);N([M],y.prototype,"focusDrillUp",null);N([M],y.prototype,"setActiveNode",null);N([M],y.prototype,"setSelectedNode",null);N([M],y.prototype,"setExpandedNode",null);N([M],y.prototype,"expandAll",null);N([M],y.prototype,"collapseAll",null);N([M],y.prototype,"setIsHidden",null);N([M],y.prototype,"setHiddenNodeIds",null);N([M],y.prototype,"filterNodes",null);N([M],y.prototype,"clearFilter",null);N([M],y.prototype,"moveNode",null);N([M],y.prototype,"copyNode",null);N([M],y.prototype,"setState",null);var nn=(()=>{let e=class e{constructor(){this._draggedElement=null}set(i){this._draggedElement=i}get(){return this._draggedElement}isDragging(){return!!this.get()}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=ye({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),Ce=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var s=t.length-1;s>=0;s--)(a=t[s])&&(o=(r<3?a(o):r>3?a(e,n,o):a(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},or=500,vi=150,re=(()=>{let e=class e{get y(){return this.yBlocks*vi}get totalHeight(){return this.treeModel.virtualRoot?this.treeModel.virtualRoot.height:0}constructor(){this.treeModel=h(y),this.yBlocks=0,this.x=0,this.viewportHeight=null,this.viewport=null;let i=this.treeModel;i.virtualScroll=this,this._dispose=[Tt(()=>this.fixScroll())]}fireEvent(i){this.treeModel.fireEvent(i)}init(){let i=this.recalcPositions.bind(this);i(),this._dispose=[...this._dispose,$e(()=>this.treeModel.roots,i),$e(()=>this.treeModel.expandedNodeIds,i),$e(()=>this.treeModel.hiddenNodeIds,i)],this.treeModel.subscribe(P.loadNodeChildren,i)}isEnabled(){return this.treeModel.options.useVirtualScroll}_setYBlocks(i){this.yBlocks=i}recalcPositions(){this.treeModel.virtualRoot.height=this._getPositionAfter(this.treeModel.getVisibleRoots(),0)}_getPositionAfter(i,r){let o=r;return i.forEach(a=>{a.position=o,o=this._getPositionAfterNode(a,o)}),o}_getPositionAfterNode(i,r){let o=i.getSelfHeight()+r;return i.children&&i.isExpanded&&(o=this._getPositionAfter(i.visibleChildren,o)),i.height=o-r,o}clear(){this._dispose.forEach(i=>i())}setViewport(i){Object.assign(this,{viewport:i,x:i.scrollLeft,yBlocks:Math.round(i.scrollTop/vi),viewportHeight:i.getBoundingClientRect?i.getBoundingClientRect().height:0})}scrollIntoView(i,r,o=!0){if(i.options.scrollContainer){let a=i.options.scrollContainer,s=a.getBoundingClientRect().height,m=a.getBoundingClientRect().top,C=this.viewport.getBoundingClientRect().top+i.position-m;(r||C<a.scrollTop||C+i.getSelfHeight()>a.scrollTop+s)&&(a.scrollTop=o?C-s/2:C)}else(r||i.position<this.y||i.position+i.getSelfHeight()>this.y+this.viewportHeight)&&this.viewport&&(this.viewport.scrollTop=o?i.position-this.viewportHeight/2:i.position,this._setYBlocks(Math.floor(this.viewport.scrollTop/vi)))}getViewportNodes(i){if(!i)return[];let r=i.filter(C=>!C.isHidden);if(!this.isEnabled())return r;if(!this.viewportHeight||!r.length)return[];let o=r.slice(-1)[0];if(!o.height&&o.position===0)return[];let a=ar(r,C=>C.position+or>this.y||C.position+C.height>this.y),s=ar(r,C=>C.position-or>this.y+this.viewportHeight,a),m=[];for(let C=a;C<=s;C++)m.push(r[C]);return m}fixScroll(){let i=Math.max(0,this.totalHeight-this.viewportHeight);this.y<0&&this._setYBlocks(0),this.y>i&&this._setYBlocks(i/vi)}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=ye({token:e,factory:e.\u0275fac});let t=e;return t})();Ce([E],re.prototype,"yBlocks",void 0);Ce([E],re.prototype,"x",void 0);Ce([E],re.prototype,"viewportHeight",void 0);Ce([R],re.prototype,"y",null);Ce([R],re.prototype,"totalHeight",null);Ce([M],re.prototype,"_setYBlocks",null);Ce([M],re.prototype,"recalcPositions",null);Ce([M],re.prototype,"setViewport",null);Ce([M],re.prototype,"scrollIntoView",null);function ar(t,e,n=0){let i=n,r=t.length-1;for(;i!==r;){let o=Math.floor((i+r)/2);e(t[o])?r=o:i===o?i=r:i=o}return i}var Co=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=D({type:e,selectors:[["tree-loading-component"]],inputs:{template:"template",node:"node"},decls:2,vars:5,consts:[[4,"ngIf"],[3,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(r,o){r&1&&(z(0,U2,2,0,"span",0),Se(1,1)),r&2&&(f("ngIf",!o.template),l(),f("ngTemplateOutlet",o.template)("ngTemplateOutletContext",St(3,j2,o.node)))},dependencies:[Ee,ke],encapsulation:2});let t=e;return t})(),yo=(()=>{let e=class e{constructor(){this.elementRef=h(Ye),this.virtualScroll=h(re),this.setViewport=this.throttle(()=>{this.virtualScroll.setViewport(this.elementRef.nativeElement)},17),this.scrollEventHandler=this.setViewport.bind(this)}ngOnInit(){this.virtualScroll.init()}ngAfterViewInit(){setTimeout(()=>{this.setViewport(),this.virtualScroll.fireEvent({eventName:P.initialized})}),this.elementRef.nativeElement.addEventListener("scroll",this.scrollEventHandler)}ngOnDestroy(){this.virtualScroll.clear(),this.elementRef.nativeElement.removeEventListener("scroll",this.scrollEventHandler)}getTotalHeight(){return this.virtualScroll.isEnabled()&&this.virtualScroll.totalHeight+"px"||"auto"}throttle(i,r){let o=0;return function(){let a=Date.now();a-o>=r&&(i(),o=a)}}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=D({type:e,selectors:[["tree-viewport"]],features:[Di([re])],ngContentSelectors:G2,decls:1,vars:2,consts:[[4,"treeMobxAutorun"]],template:function(r,o){r&1&&(Mn(),z(0,$2,3,2,"ng-container",0)),r&2&&f("treeMobxAutorun",Fe(1,bt))},dependencies:[Ct],encapsulation:2});let t=e;return t})();function So(...t){return M(...t)}var _o=Object.assign(So,M);function xo(...t){return R(...t)}var Eo=Object.assign(xo,R);function Mo(...t){return E(...t)}var sr=Object.assign(Mo,E),lr="is-dragging-over",cr="is-dragging-over-disabled",ur=(()=>{let e=class e{set treeAllowDrop(i){i instanceof Function?this._allowDrop=i:this._allowDrop=(r,o)=>i}allowDrop(i){return this._allowDrop(this.treeDraggedElement.get(),i)}constructor(){this.el=h(Ye),this.renderer=h(Xe),this.treeDraggedElement=h(nn),this.ngZone=h(zi),this.allowDragoverStyling=!0,this.onDropCallback=new j,this.onDragOverCallback=new j,this.onDragLeaveCallback=new j,this.onDragEnterCallback=new j,this._allowDrop=(i,r)=>!0,this.dragOverEventHandler=this.onDragOver.bind(this),this.dragEnterEventHandler=this.onDragEnter.bind(this),this.dragLeaveEventHandler=this.onDragLeave.bind(this)}ngAfterViewInit(){let i=this.el.nativeElement;this.ngZone.runOutsideAngular(()=>{i.addEventListener("dragover",this.dragOverEventHandler),i.addEventListener("dragenter",this.dragEnterEventHandler),i.addEventListener("dragleave",this.dragLeaveEventHandler)})}ngOnDestroy(){let i=this.el.nativeElement;i.removeEventListener("dragover",this.dragOverEventHandler),i.removeEventListener("dragenter",this.dragEnterEventHandler),i.removeEventListener("dragleave",this.dragLeaveEventHandler)}onDragOver(i){if(!this.allowDrop(i))return this.allowDragoverStyling?this.addDisabledClass():void 0;this.onDragOverCallback.emit({event:i,element:this.treeDraggedElement.get()}),i.preventDefault(),this.allowDragoverStyling&&this.addClass()}onDragEnter(i){this.allowDrop(i)&&(i.preventDefault(),this.onDragEnterCallback.emit({event:i,element:this.treeDraggedElement.get()}))}onDragLeave(i){if(!this.allowDrop(i))return this.allowDragoverStyling?this.removeDisabledClass():void 0;this.onDragLeaveCallback.emit({event:i,element:this.treeDraggedElement.get()}),this.allowDragoverStyling&&this.removeClass()}onDrop(i){this.allowDrop(i)&&(i.preventDefault(),this.onDropCallback.emit({event:i,element:this.treeDraggedElement.get()}),this.allowDragoverStyling&&this.removeClass(),this.treeDraggedElement.set(null))}addClass(){this.renderer.addClass(this.el.nativeElement,lr)}removeClass(){this.renderer.removeClass(this.el.nativeElement,lr)}addDisabledClass(){this.renderer.addClass(this.el.nativeElement,cr)}removeDisabledClass(){this.renderer.removeClass(this.el.nativeElement,cr)}};e.\u0275fac=function(r){return new(r||e)},e.\u0275dir=Te({type:e,selectors:[["","treeDrop",""]],hostBindings:function(r,o){r&1&&b("drop",function(s){return o.onDrop(s)})},inputs:{allowDragoverStyling:"allowDragoverStyling",treeAllowDrop:"treeAllowDrop"},outputs:{onDropCallback:"treeDrop",onDragOverCallback:"treeDropDragOver",onDragLeaveCallback:"treeDropDragLeave",onDragEnterCallback:"treeDropDragEnter"}});let t=e;return t})(),pr=(()=>{let e=class e{onDrop(i){this.node.mouseAction("drop",i.event,{from:i.element,to:{parent:this.node,index:this.dropIndex}})}allowDrop(i,r){return this.node.options.allowDrop(i,{parent:this.node,index:this.dropIndex},r)}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=D({type:e,selectors:[["TreeNodeDropSlot"],["tree-node-drop-slot"]],inputs:{node:"node",dropIndex:"dropIndex"},decls:1,vars:2,consts:[[1,"node-drop-slot",3,"treeDrop","treeAllowDrop","allowDragoverStyling"]],template:function(r,o){r&1&&(c(0,"div",0),b("treeDrop",function(s){return o.onDrop(s)}),d()),r&2&&f("treeAllowDrop",o.allowDrop.bind(o))("allowDragoverStyling",!0)},dependencies:[ur],encapsulation:2});let t=e;return t})(),No=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=D({type:e,selectors:[["tree-node-checkbox"]],inputs:{node:"node"},decls:1,vars:2,consts:[[4,"treeMobxAutorun"],["type","checkbox",1,"tree-node-checkbox",3,"click","checked","indeterminate"]],template:function(r,o){r&1&&z(0,q2,2,2,"ng-container",0),r&2&&f("treeMobxAutorun",Fe(1,bt))},dependencies:[Ct],encapsulation:2});let t=e;return t})(),rn=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=D({type:e,selectors:[["tree-node-expander"]],inputs:{node:"node"},decls:1,vars:2,consts:[[4,"treeMobxAutorun"],["class","toggle-children-wrapper",3,"toggle-children-wrapper-expanded","toggle-children-wrapper-collapsed","click",4,"ngIf"],["class","toggle-children-placeholder",4,"ngIf"],[1,"toggle-children-wrapper",3,"click"],[1,"toggle-children"],[1,"toggle-children-placeholder"]],template:function(r,o){r&1&&z(0,Y2,3,2,"ng-container",0),r&2&&f("treeMobxAutorun",Fe(1,bt))},dependencies:[Ct,Ee],encapsulation:2});let t=e;return t})();var wo=(()=>{let e=class e{constructor(){this.el=h(Ye),this.renderer=h(Xe),this.treeDraggedElement=h(nn),this.ngZone=h(zi),this.dragEventHandler=this.onDrag.bind(this)}ngAfterViewInit(){let i=this.el.nativeElement;this.ngZone.runOutsideAngular(()=>{i.addEventListener("drag",this.dragEventHandler)})}ngDoCheck(){this.renderer.setAttribute(this.el.nativeElement,"draggable",this.treeDragEnabled?"true":"false")}ngOnDestroy(){this.el.nativeElement.removeEventListener("drag",this.dragEventHandler)}onDragStart(i){i.dataTransfer.setData("text",i.target.id),this.treeDraggedElement.set(this.draggedElement),this.draggedElement.mouseAction&&this.draggedElement.mouseAction("dragStart",i)}onDrag(i){this.draggedElement.mouseAction&&this.draggedElement.mouseAction("drag",i)}onDragEnd(){this.draggedElement.mouseAction&&this.draggedElement.mouseAction("dragEnd"),this.treeDraggedElement.set(null)}};e.\u0275fac=function(r){return new(r||e)},e.\u0275dir=Te({type:e,selectors:[["","treeDrag",""]],hostBindings:function(r,o){r&1&&b("dragstart",function(s){return o.onDragStart(s)})("dragend",function(){return o.onDragEnd()})},inputs:{draggedElement:[0,"treeDrag","draggedElement"],treeDragEnabled:"treeDragEnabled"}});let t=e;return t})(),on=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=D({type:e,selectors:[["tree-node-content"]],inputs:{node:"node",index:"index",template:"template"},decls:2,vars:7,consts:[[4,"ngIf"],[3,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(r,o){r&1&&(z(0,Q2,2,1,"span",0),Se(1,1)),r&2&&(f("ngIf",!o.template),l(),f("ngTemplateOutlet",o.template)("ngTemplateOutletContext",wn(3,X2,o.node,o.node,o.index)))},dependencies:[Ee,ke],encapsulation:2});let t=e;return t})(),zo=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=D({type:e,selectors:[["tree-node-wrapper"]],inputs:{node:"node",index:"index",templates:"templates"},decls:2,vars:8,consts:[["class","node-wrapper",3,"padding-left",4,"ngIf"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"node-wrapper"],[3,"node",4,"ngIf"],[3,"node"],[1,"node-content-wrapper",3,"click","dblclick","mouseover","mouseout","contextmenu","treeDrop","treeDropDragOver","treeDropDragLeave","treeDropDragEnter","treeAllowDrop","allowDragoverStyling","treeDrag","treeDragEnabled"],[3,"node","index","template"]],template:function(r,o){r&1&&(z(0,Z2,5,15,"div",0),Se(1,1)),r&2&&(f("ngIf",!o.templates.treeNodeWrapperTemplate),l(),f("ngTemplateOutlet",o.templates.treeNodeWrapperTemplate)("ngTemplateOutletContext",Ht(3,fr,o.node,o.node,o.index,o.templates)))},dependencies:[Ee,No,rn,wo,ur,on,ke],encapsulation:2});let t=e;return t})(),dr=1.005,Lo=(()=>{let e=class e{constructor(){this.renderer=h(Xe),this.templateRef=h(Ni),this.viewContainerRef=h(wi)}set isOpen(i){i?(this._show(),this.isEnabled&&this._isOpen===!1&&this._animateOpen()):this.isEnabled?this._animateClose():this._hide(),this._isOpen=!!i}_show(){this.innerElement||(this.innerElement=this.viewContainerRef.createEmbeddedView(this.templateRef).rootNodes[0])}_hide(){this.viewContainerRef.clear(),this.innerElement=null}_animateOpen(){let i=this.animateSpeed,r=this.animateAcceleration,o=0;this.renderer.setStyle(this.innerElement,"max-height","0"),setTimeout(()=>{let a=setInterval(()=>{if(!this._isOpen||!this.innerElement)return clearInterval(a);o+=i;let s=Math.round(o);this.renderer.setStyle(this.innerElement,"max-height",`${s}px`);let m=this.innerElement.getBoundingClientRect?this.innerElement.getBoundingClientRect().height:0;i*=r,r*=dr,m<s&&(this.renderer.setStyle(this.innerElement,"max-height",null),clearInterval(a))},17)})}_animateClose(){if(!this.innerElement)return;let i=this.animateSpeed,r=this.animateAcceleration,o=this.innerElement.getBoundingClientRect().height,a=setInterval(()=>{if(this._isOpen||!this.innerElement)return clearInterval(a);o-=i,this.renderer.setStyle(this.innerElement,"max-height",`${o}px`),i*=r,r*=dr,o<=0&&(this.viewContainerRef.clear(),this.innerElement=null,clearInterval(a))},17)}};e.\u0275fac=function(r){return new(r||e)},e.\u0275dir=Te({type:e,selectors:[["","treeAnimateOpen",""]],inputs:{animateSpeed:[0,"treeAnimateOpenSpeed","animateSpeed"],animateAcceleration:[0,"treeAnimateOpenAcceleration","animateAcceleration"],isEnabled:[0,"treeAnimateOpenEnabled","isEnabled"],isOpen:[0,"treeAnimateOpen","isOpen"]}});let t=e;return t})(),gi=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var s=t.length-1;s>=0;s--)(a=t[s])&&(o=(r<3?a(o):r>3?a(e,n,o):a(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},Oo=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=D({type:e,selectors:[["tree-node-children"]],inputs:{node:"node",templates:"templates"},decls:1,vars:2,consts:[[4,"treeMobxAutorun"],[3,"tree-children","tree-children-no-padding",4,"treeAnimateOpen","treeAnimateOpenSpeed","treeAnimateOpenAcceleration","treeAnimateOpenEnabled"],[3,"nodes","templates","treeModel",4,"ngIf"],["class","tree-node-loading",3,"padding-left","template","node",4,"ngIf"],[3,"nodes","templates","treeModel"],[1,"tree-node-loading",3,"template","node"]],template:function(r,o){r&1&&z(0,no,2,4,"ng-container",0),r&2&&f("treeMobxAutorun",Fe(1,bt))},dependencies:()=>[Ct,Lo,Ee,hr,Co],encapsulation:2});let t=e;return t})(),hr=(()=>{let e=class e{constructor(){this._dispose=[]}get nodes(){return this._nodes}set nodes(i){this.setNodes(i)}get marginTop(){let i=this.viewportNodes&&this.viewportNodes.length&&this.viewportNodes[0];return`${i&&i.parent?i.position-i.parent.position-i.parent.getSelfHeight():0}px`}setNodes(i){this._nodes=i}ngOnInit(){this.virtualScroll=this.treeModel.virtualScroll,this._dispose=[$e(()=>this.virtualScroll.getViewportNodes(this.nodes).map(i=>i.index),i=>{this.viewportNodes=i.map(r=>this.nodes[r])},{compareStructural:!0,fireImmediately:!0}),$e(()=>this.nodes,i=>{this.viewportNodes=this.virtualScroll.getViewportNodes(i)})]}ngOnDestroy(){this._dispose.forEach(i=>i())}trackNode(i,r){return r.id}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=D({type:e,selectors:[["tree-node-collection"]],inputs:{nodes:"nodes",treeModel:"treeModel",templates:"templates"},decls:1,vars:2,consts:[[4,"treeMobxAutorun"],[3,"node","index","templates",4,"ngFor","ngForOf","ngForTrackBy"],[3,"node","index","templates"]],template:function(r,o){r&1&&z(0,oo,3,4,"ng-container",0),r&2&&f("treeMobxAutorun",Fe(1,bt))},dependencies:()=>[Ct,zn,Ao],encapsulation:2});let t=e;return gi([sr],t.prototype,"_nodes",void 0),gi([sr],t.prototype,"viewportNodes",void 0),gi([Eo],t.prototype,"marginTop",null),gi([_o],t.prototype,"setNodes",null),t})(),Ao=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=D({type:e,selectors:[["TreeNode"],["tree-node"]],inputs:{node:"node",index:"index",templates:"templates"},decls:1,vars:2,consts:[[4,"treeMobxAutorun"],[3,"class","tree-node","tree-node-expanded","tree-node-collapsed","tree-node-leaf","tree-node-active","tree-node-focused",4,"ngIf"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],[3,"dropIndex","node",4,"ngIf"],[3,"node","index","templates"],[3,"node","templates"],[3,"dropIndex","node"]],template:function(r,o){r&1&&z(0,lo,3,8,"ng-container",0),r&2&&f("treeMobxAutorun",Fe(1,bt))},dependencies:[Ct,Ee,pr,zo,Oo,ke],encapsulation:2});let t=e;return t})(),mr=(()=>{let e=class e{set nodes(i){}set options(i){}set focused(i){this.treeModel.setFocus(i)}set state(i){this.treeModel.setState(i)}constructor(){this.treeModel=h(y),this.treeDraggedElement=h(nn);let i=this.treeModel;i.eventNames.forEach(r=>this[r]=new j),i.subscribeToState(r=>this.stateChange.emit(r))}onKeydown(i){if(!this.treeModel.isFocused||["input","textarea"].includes(document.activeElement.tagName.toLowerCase()))return;let r=this.treeModel.getFocusedNode();this.treeModel.performKeyAction(r,i)}onMousedown(i){function r(o,a){return o?o.localName===a?!1:r(o.parentElement,a):!0}r(i.target,"tree-root")&&this.treeModel.setFocus(!1)}ngOnChanges(i){(i.options||i.nodes)&&this.treeModel.setData({options:i.options&&i.options.currentValue,nodes:i.nodes&&i.nodes.currentValue,events:this.pick(this,this.treeModel.eventNames)})}sizeChanged(){this.viewportComponent.setViewport()}pick(i,r){return r.reduce((o,a)=>(i&&i.hasOwnProperty(a)&&(o[a]=i[a]),o),{})}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=D({type:e,selectors:[["Tree"],["tree-root"]],contentQueries:function(r,o,a){if(r&1&&(yt(a,co,5),yt(a,fo,5),yt(a,uo,5),yt(a,po,5)),r&2){let s;_e(s=xe())&&(o.loadingTemplate=s.first),_e(s=xe())&&(o.treeNodeTemplate=s.first),_e(s=xe())&&(o.treeNodeWrapperTemplate=s.first),_e(s=xe())&&(o.treeNodeFullTemplate=s.first)}},viewQuery:function(r,o){if(r&1&&Vt(ho,5),r&2){let a;_e(a=xe())&&(o.viewportComponent=a.first)}},hostBindings:function(r,o){r&1&&b("keydown",function(s){return o.onKeydown(s)},Mi)("mousedown",function(s){return o.onMousedown(s)},Mi)},inputs:{nodes:"nodes",options:"options",focused:"focused",state:"state"},outputs:{toggleExpanded:"toggleExpanded",activate:"activate",deactivate:"deactivate",nodeActivate:"nodeActivate",nodeDeactivate:"nodeDeactivate",select:"select",deselect:"deselect",focus:"focus",blur:"blur",updateData:"updateData",initialized:"initialized",moveNode:"moveNode",copyNode:"copyNode",loadNodeChildren:"loadNodeChildren",changeFilter:"changeFilter",event:"event",stateChange:"stateChange"},features:[Di([y]),Ft],decls:5,vars:6,consts:[["viewport",""],[1,"angular-tree-component"],[3,"nodes","treeModel","templates",4,"ngIf"],["class","empty-tree-drop-slot",3,"dropIndex","node",4,"ngIf"],[3,"nodes","treeModel","templates"],[1,"empty-tree-drop-slot",3,"dropIndex","node"]],template:function(r,o){r&1&&(c(0,"tree-viewport",null,0)(2,"div",1),z(3,vo,1,8,"tree-node-collection",2)(4,go,1,2,"tree-node-drop-slot",3),d()()),r&2&&(l(2),q("node-dragging",o.treeDraggedElement.isDragging())("angular-tree-component-rtl",o.treeModel.options.rtl),l(),f("ngIf",o.treeModel.roots),l(),f("ngIf",o.treeModel.isEmptyTree()))},dependencies:[yo,Ee,hr,pr],encapsulation:2});let t=e;return t})(),vr=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=Cn({type:e}),e.\u0275inj=bn({imports:[Ln]});let t=e;return t})();var S=function(t){return t.MAKE="make",t.COPY="copy",t.MOVE="move",t.DELETE="delete",t.COMPRESS="compress",t.DECOMPRESS="decompress",t.DOWNLOAD="download",t.UPLOAD="upload",t.TOUCH="touch",t.THUMBNAIL="thumbnail",t}(S||{});var Y0=".selected",X0="drag-over";var Ci=(()=>{let e=class e{constructor(){this.overFlowX="hidden",this.resizeOffset=80,this.useMaxHeight=!0,this.elementRef=h(Ye),this.renderer=h(Xe),this.layout=h(U),this.renderer.setStyle(this.elementRef.nativeElement,"overflow-y","auto"),this.renderer.setStyle(this.elementRef.nativeElement,"scrollbar-width","thin"),this.resizeSubscription=this.layout.resizeEvent.pipe(vn(1)).subscribe(()=>this.onResize())}ngAfterViewInit(){this.renderer.setStyle(this.elementRef.nativeElement,"overflow-x",this.overFlowX),this.onResize()}ngOnDestroy(){this.resizeSubscription.unsubscribe()}scrollTop(){this.renderer.setProperty(this.elementRef.nativeElement,"scrollTop","0")}scrollIntoView(i=0){setTimeout(()=>this.elementRef.nativeElement.scrollTo({left:0,top:i,behavior:"smooth"}),50)}onResize(){this.renderer.setStyle(this.elementRef.nativeElement,this.useMaxHeight?"max-height":"height",`${window.innerHeight-this.resizeOffset-1}px`)}};e.\u0275fac=function(r){return new(r||e)},e.\u0275dir=Te({type:e,selectors:[["","appAutoResize",""]],inputs:{overFlowX:"overFlowX",resizeOffset:"resizeOffset",useMaxHeight:"useMaxHeight"}});let t=e;return t})();var H={BASE:e1.BASE,OPERATION:"operation",TASK_OPERATION:"task/operation",TASKS:"tasks",TASKS_DOWNLOAD:"download",RECENTS:"recents",SEARCH:"search",ONLY_OFFICE:"onlyoffice",ONLY_OFFICE_SETTINGS:"settings",ONLY_OFFICE_DOCUMENT:"document",ONLY_OFFICE_CALLBACK:"callback"},sn=`${H.BASE}/${H.OPERATION}`,sa=`${sn}/${S.THUMBNAIL}`,ln=`${sn}/${S.MAKE}`,la=`${sn}/${S.UPLOAD}`,cn=`${H.BASE}/${H.TASK_OPERATION}`,gr=`${cn}/${S.DOWNLOAD}`,br=`${cn}/${S.COMPRESS}`,Cr=`${cn}/${S.DECOMPRESS}`,Pt=`${H.BASE}/${H.TASKS}`,yr=`${H.BASE}/${H.TASKS}/${H.TASKS_DOWNLOAD}`,Sr=`${H.BASE}/${H.RECENTS}`,_r=`${H.BASE}/${H.SEARCH}`,dn=`${H.BASE}/${H.ONLY_OFFICE}`,ca=`${dn}/${H.ONLY_OFFICE_SETTINGS}`,da=`${dn}/${H.ONLY_OFFICE_DOCUMENT}`,fa=`${dn}/${H.ONLY_OFFICE_CALLBACK}`;var yi=class{constructor(e){Object.assign(this,e),this.mimeUrl=He(this.mime),this.setInfos()}fallBackMimeUrl(){this.mimeUrl=lt}setInfos(){let e=this.path.split("/")[0],n=this.path.split("/")[1]===Me.PERSONAL;this.showedPath=this.path.split("/").slice(n?2:1).join("/"),this.iconClass=e===Z.SHARES?"purple":"primary",this.icon=e===Z.SHARES?W.SHARES:n?W.PERSONAL:W.SPACES}};var Si=class{constructor(e){this.inTrash=!1,Object.assign(this,e),this.mimeUrl=He(this.mime),this.iconClass=this.shareId?"purple":"primary",this.icon=this.shareId?W.SHARES:this.spaceId?W.SPACES:W.PERSONAL,this.showedPath=this.path.split("/").slice(this.path.split("/")[1]===Me.PERSONAL?2:1).join("/"),this.inTrash=this.path.split("/")[0]===Z.TRASH}fallBackMimeUrl(){this.mimeUrl=lt}};var We=function(t){return t[t.PENDING=0]="PENDING",t[t.SUCCESS=1]="SUCCESS",t[t.ERROR=2]="ERROR",t}(We||{}),_i=class{constructor(e,n,i,r){this.props={},this.id=e,this.type=n,this.path=i,this.name=r,(n===S.COPY||n===S.MOVE||n===S.DOWNLOAD)&&(this.props={progress:1},n!==S.DOWNLOAD&&(this.props.src={name:r,path:i}))}};var xr=(()=>{let e=class e{constructor(){this.http=h(jt),this.layout=h(U),this.store=h(ot),this.onDone={[S.DELETE]:{title:"Deletion",fileEvent:{delete:!0}},[S.MOVE]:{title:"Move",fileEvent:{delete:!0,reloadFocusOnDst:!0}},[S.COPY]:{title:"Copy",fileEvent:{reload:!0,focus:!0}},[S.DOWNLOAD]:{title:"Download",fileEvent:{reload:!0,focus:!0}},[S.UPLOAD]:{title:"Upload",fileEvent:{reload:!0,focus:!0}},[S.COMPRESS]:{title:"Compression",fileEvent:{reload:!0,focus:!0}},[S.DECOMPRESS]:{title:"Decompression",fileEvent:{reload:!0,focus:!0}}},this.watcher=null,this.watch=mn(1e3,1e3).pipe(gn(()=>this.doWatch())),this.loadAll()}addTask(i){i.status===We.PENDING?(this.store.filesActiveTasks.next([i,...this.store.filesActiveTasks.getValue()]),this.startWatch()):this.store.filesEndedTasks.next([i,...this.store.filesEndedTasks.getValue()])}createUploadTask(i,r,o){let a=new _i(Qn(),S.UPLOAD,i,r);return a.status=We.PENDING,a.startedAt=Xn(null,!0),a.props={progress:1,size:0,totalSize:o},this.store.filesActiveTasks.next([a,...this.store.filesActiveTasks.getValue()]),this.layout.showRSideBarTab(nt.TASKS,!0),a}removeAll(){this.http.delete(Pt).subscribe({next:()=>this.clearEndedTasks(),error:i=>console.error(i)})}remove(i){this.http.delete(`${Pt}/${i.id}`).subscribe({next:()=>this.deleteTask(i.id,!1),error:r=>console.error(r)})}updateTask(i){if(i.status===We.PENDING){let r=this.findTask(i.id,!0);Object.assign(r,i)}else this.deleteTask(i.id,!0),this.addTask(i),this.taskDone(i)}loadAll(){this.http.get(Pt).subscribe({next:i=>i.forEach(r=>this.addTask(r)),error:i=>console.error(i)})}doWatch(){this.store.filesActiveTasks.getValue().length?this.fetchActiveTasks():this.stopWatch()}startWatch(){(!this.watcher||this.watcher.closed)&&(this.layout.showRSideBarTab(nt.TASKS,!0),this.watcher=this.watch.subscribe())}stopWatch(){(this.watcher||!this.watcher.closed)&&(setTimeout(()=>this.layout.hideRSideBarTab(nt.TASKS),3e3),this.watcher.unsubscribe())}fetchActiveTasks(){for(let i of this.store.filesActiveTasks.getValue().filter(r=>r.type!==S.UPLOAD))this.http.get(`${Pt}/${i.id}`).subscribe({next:r=>this.updateTask(r),error:r=>{r.status===404&&(i.result=r.error.message,i.status=We.ERROR,this.updateTask(i)),console.warn(r)}})}findTask(i,r){return r?this.store.filesActiveTasks.getValue().find(o=>o.id===i):this.store.filesEndedTasks.getValue().find(o=>o.id===i)}deleteTask(i,r){r?this.store.filesActiveTasks.next(this.store.filesActiveTasks.getValue().filter(o=>o.id!==i)):this.store.filesEndedTasks.next(this.store.filesEndedTasks.getValue().filter(o=>o.id!==i))}taskDone(i){if(i.type in this.onDone){if(this.onDone[i.type].fileEvent){let r=De(Q({},this.onDone[i.type].fileEvent),{status:i.status});i.type===S.COPY||i.type===S.MOVE?(r.filePath=i.props.src.path,r.fileName=i.props.src.name,r.fileDstPath=i.path):(r.filePath=i.path,r.fileName=i.name,i.type===S.COMPRESS&&(r.archiveId=i.props.compressInDirectory===!1?i.id:null)),this.store.filesOnEvent.next(r)}i.status===We.SUCCESS?i.type===S.DELETE?this.removeDeletedChildTasks(i):this.layout.sendNotification("info",`${this.onDone[i.type].title} done`,i.name):this.layout.sendNotification("error",`${this.onDone[i.type].title} failed`,i.name,{error:{message:i.result}})}}removeDeletedChildTasks(i){if(i.path.startsWith(Z.SHARES))this.remove(i);else if(i.path.startsWith(Z.TRASH)){for(let r of this.store.filesEndedTasks.getValue().filter(o=>o.id!==i.id&&o.type===S.DELETE&&o.path.startsWith(Z.FILES))){let o=i.path.replace(Z.TRASH,Z.FILES);new RegExp(`^${d1(`${o}/${i.name}`)}(/|$)`).test(`${r.path}/${r.name}`)&&this.remove(r)}this.remove(i)}}clearEndedTasks(){this.store.filesEndedTasks.next([])}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=ye({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();var Er=(()=>{let e=class e{constructor(){this.treeNodeSelected=null,this.treeCopyMoveOn=new pn,this.clipboardAction="copyPaste",this.http=h(jt),this.layout=h(U),this.store=h(ot),this.sanitizer=h(On),this.filesTasksService=h(xr)}getTreeNode(i,r=!1){return hn(this.http.get(`${t1}/${i}`,{params:r?new Ti().set("showFiles",r):null}))}addToClipboard(i){if(i.length)if(!this.store.filesClipboard.getValue().length)this.layout.showRSideBarTab(nt.CLIPBOARD,!0),this.store.filesClipboard.next(i);else{let r=i.filter(o=>this.store.filesClipboard.getValue().indexOf(o)===-1);r.length&&this.store.filesClipboard.next([...r,...this.store.filesClipboard.getValue()])}}removeFromClipboard(i){this.store.filesClipboard.next(this.store.filesClipboard.getValue().filter(r=>r.id!==i.id))}clearClipboard(){this.store.filesClipboard.next([])}onPasteClipboard(i){let r=i||this.clipboardAction;if(this.store.filesClipboard.getValue().length){let o=this.currentRoute;this.copyMove([...this.store.filesClipboard.getValue()],o,r==="copyPaste"?S.COPY:S.MOVE),this.clearClipboard()}}download(i){Ii(i.dataUrl)}copyMove(i,r,o){let a=o===S.MOVE;for(let s of i){a&&(s.isBeingDeleted=!0);let m={dstDirectory:r};this.http.request(o,s.taskUrl,{body:m}).subscribe({next:C=>this.filesTasksService.addTask(C),error:C=>{a&&(s.isBeingDeleted=!1),this.layout.sendNotification("error",o==="move"?"Move failed":"Copy failed",s.name,C)}})}}rename(i,r){if(!this.isValidName(r))return;let a={dstDirectory:i.path.split("/").slice(0,-1).join("/")||".",dstName:r};this.http.request(S.MOVE,i.dataUrl,{body:a}).subscribe({next:s=>{i.rename(s.name),i.isEditable=!1},error:s=>this.layout.sendNotification("error","Rename",i.name,s)})}delete(i){for(let r of i)r.isBeingDeleted=!0,this.http.delete(r.taskUrl).subscribe({next:o=>this.filesTasksService.addTask(o),error:o=>{r.isBeingDeleted=!1,this.layout.sendNotification("error","Deletion failed",r.name,o)}})}make(i,r,o=null,a=!1){if(!this.isValidName(r))return;o=o||this.currentRoute;let s={type:i};if(a)return this.http.post(`${ln}/${o}/${r}`,s);this.http.post(`${ln}/${o}/${r}`,s).subscribe({next:()=>this.store.filesOnEvent.next({filePath:o,fileName:r,focus:!0,reload:!0}),error:m=>this.layout.sendNotification("error","Creation failed",r,m)})}compress(i){let r=this.currentRoute;this.http.post(`${br}/${r}/${i.name}.${i.extension}`,i).subscribe({next:o=>this.filesTasksService.addTask(o),error:o=>this.layout.sendNotification("error","Compression failed",i.name,o)})}decompress(i){let r=this.currentRoute;this.http.post(`${Cr}/${r}/${i.name}`,null).subscribe({next:o=>this.filesTasksService.addTask(o),error:o=>this.layout.sendNotification("error","Compression failed",i.name,o)})}downloadFromUrl(i,r){if(!this.isValidName(r))return;let o=this.currentRoute,a={url:i};this.http.post(`${gr}/${o}/${r}`,a).subscribe({next:s=>this.filesTasksService.addTask(s),error:s=>this.layout.sendNotification("error","Download failed",i,s)})}downloadTaskArchive(i){Ii(`${yr}/${i}`)}loadRecents(i){this.http.get(Sr,{params:new Ti().set("limit",i)}).pipe(Ei(r=>r.map(o=>new Si(o)))).subscribe({next:r=>{this.store.filesRecents.update(o=>[...r,...o.slice(i)])},error:r=>this.layout.sendNotification("error","Files","Unable to load",r)})}search(i){return this.http.request("search",_r,{body:i}).pipe(Ei(r=>r.map(o=>(o.content&&(o.content=this.sanitizer.bypassSecurityTrustHtml(o.content)),new yi(o)))))}isValidName(i){try{return Yn(i),!0}catch(r){return this.layout.sendNotification("error","Rename",`${this.layout.translateString(r.message)} : ${Kn}`),!1}}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=ye({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();var To=["tree"];function Io(t,e){if(t&1&&(c(0,"span",8),p(1),d()),t&2){let n=u(2);l(),k(n.errorMsg)}}function Ro(t,e){t&1&&(c(0,"span",9),p(1,"Navigation Tree"),d())}function Po(t,e){if(t&1){let n=F();c(0,"div",3)(1,"button",6),b("click",function(){_(n);let r=u();return x(r.onRefresh())}),g(2,"fa-icon",7),d(),L(3,Io,2,1,"span",8)(4,Ro,2,0,"span",9),d()}if(t&2){let n=u();l(2),f("icon",n.icons.faArrowRotateRight),l(),O(n.errorMsg?3:4)}}function Fo(t,e){if(t&1&&(c(0,"span")(1,"span"),p(2),d()()),t&2){let n=u(2);l(2),k(n.store.filesSelection()[0].name)}}function ko(t,e){if(t&1&&(c(0,"span"),g(1,"fa-icon",18),d()),t&2){let n=u(2);l(),f("icon",n.icons.faQuestion)}}function Vo(t,e){if(t&1&&(c(0,"span")(1,"span"),p(2),d(),p(3,"\xA0"),c(4,"span",9),p(5,"items"),d()()),t&2){let n=u(2);l(2),k(n.store.filesSelection().length)}}function Ho(t,e){if(t&1){let n=F();c(0,"div",10)(1,"div",11)(2,"span",12)(3,"span",9),p(4,"Source"),d(),p(5,":"),d(),L(6,Fo,3,1,"span")(7,ko,2,1,"span")(8,Vo,6,1,"span"),d(),c(9,"div",13)(10,"span",12)(11,"span",9),p(12,"Destination"),d(),p(13,":"),d(),c(14,"span"),p(15),d()(),c(16,"div",14)(17,"button",15),b("click",function(){_(n);let r=u();return x(r.actionMove())}),g(18,"fa-icon",7),p(19," Move "),d(),c(20,"button",15),b("click",function(){_(n);let r=u();return x(r.actionCopy())}),g(21,"fa-icon",7),p(22," Copy "),d(),c(23,"button",16),b("click",function(){_(n);let r=u();return x(r.actionCancel())}),g(24,"fa-icon",7),p(25," Cancel "),d()()(),g(26,"hr",17)}if(t&2){let n,i=u();l(6),O((n=i.store.filesSelection().length)===1?6:n===0?7:8),l(9),k((i.selection==null?null:i.selection.data.name)||""),l(2),f("disabled",!i.selection||!i.store.filesSelection().length||!i.srcAllowed||!i.dstAllowed),l(),f("icon",i.icons.faArrowsAlt),l(2),f("disabled",!i.selection||!i.store.filesSelection().length||!i.dstAllowed),l(),f("icon",i.icons.faClone),l(3),f("icon",i.icons.faTimes)}}function Bo(t,e){if(t&1){let n=F();c(0,"div",19),b("click",function(r){let o=_(n).$implicit;return x(o.mouseAction("click",r))})("tap",function(r){let o=_(n).$implicit;return x(o.mouseAction("dblClick",r))}),g(1,"tree-node-expander",20),c(2,"div",21),g(3,"tree-node-content",22),d()()}if(t&2){let n=e.index,i=e.$implicit;Pe("padding-left",i.getNodePadding()),q("tree-selected",i.isActive)("tree-disabled",!i.data.enabled),l(),q("toggle-children-file",!i.data.isDir)("toggle-children-shared",i.data.inShare),f("node",i),l(),q("node-content-wrapper-active",i.isActive),l(),f("index",n)("node",i)}}function jo(t,e){if(t&1&&(c(0,"span"),g(1,"fa-icon",23),d()),t&2){let n=u();l(),f("icon",n.icons.faSpinner)}}var Mr=(()=>{let e=class e{constructor(){this.selected=new j,this.showFiles=!1,this.allowShares=!0,this.allowSpaces=!0,this.enableCopyMove=!0,this.enableNavigateTo=!0,this.sideBarHeader=!0,this.resizeOffset=80,this.toggleNodesAtStartup=!1,this.store=h(ot),this.icons={faArrowRotateRight:$n,faArrowsAlt:jn,faClone:Fn,faTimes:Un,faFolder:Hn,faFile:ei,faQuestion:Pn,faAnglesRight:qn,faSpinner:Kt},this.options={actionMapping:{mouse:{click:(i,r,o)=>this.onSelect(i,r,o),dblClick:(i,r)=>this.onOpen(r),expanderClick:()=>null}},animateExpand:!1,levelPadding:10,useVirtualScroll:!1,nodeHeight:30,dropSlotHeight:0,allowDrag:!1,allowDrop:!1,getChildren:i=>this.getTreeNode(i)},this.srcAllowed=!0,this.dstAllowed=!0,this.errorMsg=null,this.layout=h(U),this.router=h(An),this.user=h(Xt),this.filesService=h(Er),this.copyMoveOnHeight=80,this.subscriptions=[],this.preventDblClick=!1,this._copyMoveOn=!1,this.enableCopyMove&&this.subscriptions.push(Rn(this.store.filesSelection).subscribe(()=>this.checkAllowed(this.selection)))}get copyMoveOn(){return this._copyMoveOn}set copyMoveOn(i){this._copyMoveOn!==i&&(this._copyMoveOn=i,i?this.resizeOffset+=this.copyMoveOnHeight:this.resizeOffset-=this.copyMoveOnHeight,setTimeout(()=>this.layout.resizeEvent.next(),0))}get selection(){return this.filesService.treeNodeSelected}set selection(i){this.filesService.treeNodeSelected=i,i&&([0,-1,-2].indexOf(i.data.id)===-1?this.selected.emit(i.data):this.selected.emit(null))}ngOnInit(){this.enableCopyMove&&this.subscriptions.push(this.filesService.treeCopyMoveOn.subscribe(()=>this.onCopyMove())),this.initRoot(),setTimeout(()=>this.focusLastNode(),100)}ngOnDestroy(){this.subscriptions.forEach(i=>i.unsubscribe())}onRefresh(){this.tree.treeModel.activeNodes.length?this.tree.treeModel.activeNodes.forEach(i=>{i.loadNodeChildren().then(()=>this.tree.treeModel.update())}):(this.user.userHavePermission(Ve.PERSONAL_SPACE)&&this.tree.treeModel.getNodeById(0).loadNodeChildren().then(()=>this.tree.treeModel.update()),this.user.userHavePermission(Ve.SPACES)&&this.tree.treeModel.getNodeById(-1).loadNodeChildren().then(()=>this.tree.treeModel.update()),this.allowShares&&this.user.userHavePermission(Ve.SHARES)&&this.tree.treeModel.getNodeById(-2).loadNodeChildren().then(()=>this.tree.treeModel.update()))}actionCancel(){this.copyMoveOn=!1,this.errorMsg=null,this.srcAllowed=!0,this.dstAllowed=!0}actionCopy(){this.filesService.copyMove(this.store.filesSelection(),this.selection.data.path,S.COPY),this.copyMoveOn=!1}actionMove(){this.filesService.copyMove(this.store.filesSelection(),this.selection.data.path,S.MOVE),this.copyMoveOn=!1}initRoot(){if(this.nodes=[],this.user.userHavePermission(Ve.PERSONAL_SPACE)){let i={id:0,name:this.layout.translateString(Yt.PERSONAL_FILES),path:`${st.FILES}/${Me.PERSONAL}`,isDir:!0,inShare:!1,mime:Ne,quotaIsExceeded:this.store.user.getValue().quotaIsExceeded,enabled:!0,permissions:Zn,children:null,hasChildren:!0,isExpanded:!1};this.checkToggleNodeAtStartup(i,!0)}if(this.allowSpaces&&this.user.userHavePermission(Ve.SPACES)){let i={id:-1,name:this.layout.translateString(Yt.SPACES),path:st.SPACES,isDir:!0,mime:Ne,inShare:!1,hasChildren:!0,quotaIsExceeded:!1,enabled:!0,permissions:"",children:null,isExpanded:!1};this.checkToggleNodeAtStartup(i)}if(this.allowShares&&this.user.userHavePermission(Ve.SHARES)){let i={id:-2,name:this.layout.translateString(Yt.SHARES),path:st.SHARES,isDir:!0,mime:Ne,inShare:!0,hasChildren:!0,quotaIsExceeded:!1,enabled:!0,permissions:"",children:null,isExpanded:!1};this.checkToggleNodeAtStartup(i)}}checkToggleNodeAtStartup(i,r=!1){this.toggleNodesAtStartup?this.getTreeNode(i).then(o=>{i.children=o,r?this.nodes.unshift(i):this.nodes.push(i),this.tree.treeModel.update(),this.toggleExpand(this.tree,this.tree.treeModel.getNodeById(i.id),null)}):(r?this.nodes.unshift(i):this.nodes.push(i),this.tree.treeModel.update())}focusLastNode(){this.selection&&(this.selection=this.tree.treeModel.getNodeById(this.selection.data.id),this.selection&&I.ACTIVATE(this.tree,this.selection,null))}getTreeNode(i){return this.filesService.getTreeNode(i?.data?.path||i?.path||i,this.showFiles)}collapseChildren(i,r){for(let o of r)[0,-1,-2].indexOf(o.id)===-1&&o.id!==i.id&&(o.data.isExpanded=!1,o.collapse())}toggleExpand(i,r,o){I.TOGGLE_EXPANDED(i,r,o),r.data.isExpanded=!!r.data.isExpanded}onOpen(i){if(!this.copyMoveOn&&this.enableNavigateTo&&i.data.enabled){clearTimeout(this.preventTimer),this.preventDblClick=!0;let r=i.data.path.split("/");r[0]!==st.SPACES&&r.unshift(st.SPACES),this.router.navigate(r).catch(console.error)}}onSelect(i,r,o){if(!r.data.enabled){this.layout.sendNotification("warning",r.data.name,`${r.data.inShare?"Share":"Space"} is disabled`);return}I.ACTIVATE(i,r,o),this.preventTimer=setTimeout(()=>{this.checkAllowed(r),this.selection=r,this.preventDblClick||r.hasChildren&&(this.collapseChildren(r,r.parent.children),this.toggleExpand(i,r,o)),this.preventDblClick=!1},200)}checkAllowed(i){if(this.copyMoveOn){if(this.store.filesSelection().length)for(let r of this.store.filesSelection()){if(r.root?.alias){this.errorMsg="You can not move an anchored file",this.srcAllowed=!1,this.dstAllowed=!0;return}if(r.lock&&r.lock.ownerLogin!==this.store.user.getValue().login){this.errorMsg="You can not move a locked file",this.srcAllowed=!1,this.dstAllowed=!0;return}}if(i){if([-1,-2].indexOf(i.data.id)>-1){this.errorMsg=null,this.srcAllowed=!0,this.dstAllowed=!1;return}else if(i.data.permissions.indexOf(at.ADD)===-1){this.errorMsg="You are not allowed to write here",this.srcAllowed=!0,this.dstAllowed=!1;return}else if(i.data.quotaIsExceeded){this.errorMsg="No more space available",this.srcAllowed=!0,this.dstAllowed=!1;return}}this.errorMsg=null,this.srcAllowed=!0,this.dstAllowed=!0}}onCopyMove(){this.onRefresh(),this.copyMoveOn=!0,this.checkAllowed(this.selection)}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=D({type:e,selectors:[["app-files-tree"]],viewQuery:function(r,o){if(r&1&&Vt(To,7),r&2){let a;_e(a=xe())&&(o.tree=a.first)}},inputs:{showFiles:"showFiles",allowShares:"allowShares",allowSpaces:"allowSpaces",enableCopyMove:"enableCopyMove",enableNavigateTo:"enableNavigateTo",sideBarHeader:"sideBarHeader",resizeOffset:"resizeOffset",toggleNodesAtStartup:"toggleNodesAtStartup"},outputs:{selected:"selected"},decls:9,vars:7,consts:[["tree",""],["treeNodeWrapperTemplate",""],["loadingTemplate",""],[1,"sidebar-component-title"],["appAutoResize","",3,"overFlowX","resizeOffset","useMaxHeight"],[3,"nodes","options"],[1,"btn","btn-xs","btn-secondary",3,"click"],[3,"icon"],["l10nTranslate","",1,"text-danger","fs-xxs","p-2"],["l10nTranslate",""],[1,"px-2","pt-2","pb-0","fs-xs"],[1,"text-start","text-truncate"],["l10nTranslate","",1,"fs-xs","fw-bold","me-2"],[1,"text-start","text-truncate","mt-1"],[1,"d-flex","justify-content-between","mt-2"],["type","button","l10nTranslate","",1,"btn","btn-xxs","btn-primary",3,"click","disabled"],["type","button","l10nTranslate","",1,"btn","btn-xxs","btn-secondary",3,"click"],[1,"mx-0","mt-2","mb-0"],[1,"fw-bold","me-1",3,"icon"],[1,"node-wrapper",3,"click","tap"],[3,"node"],[1,"node-content-wrapper"],[3,"index","node"],["animation","spin",1,"fw-bold",3,"icon"]],template:function(r,o){r&1&&(L(0,Po,5,2,"div",3),L(1,Ho,27,7),c(2,"div",4)(3,"tree-root",5,0),z(5,Bo,4,15,"ng-template",null,1,xt)(7,jo,2,1,"ng-template",null,2,xt),d()()),r&2&&(O(o.sideBarHeader?0:-1),l(),O(o.copyMoveOn?1:-1),l(),f("overFlowX","auto")("resizeOffset",o.resizeOffset)("useMaxHeight",!1),l(),f("nodes",o.nodes)("options",o.options))},dependencies:[Ci,vr,mr,on,rn,ae,oe],encapsulation:2});let t=e;return t})();function Uo(t,e){if(t&1&&(c(0,"span"),g(1,"fa-icon",10),p(2),fe(3,"pathSlice"),d()),t&2){let n=u();l(),f("icon",n.selection.isDir?n.icons.faFolderClosed:n.icons.faFile),l(),J(" ",_t(3,2,n.selection.path,-1)," ")}}function Go(t,e){t&1&&(c(0,"span",2),p(1,"Select a file"),d())}function $o(t,e){if(t&1&&(c(0,"span",7),p(1),d()),t&2){let n=u();l(),k(n.errorSelection)}}var Nr=(()=>{let e=class e{constructor(){this.currentRoots=[],this.submitEvent=new j,this.allowSpaces=!1,this.toggleNodesAtStartup=!0,this.mustHaveShareOutsidePermission=!1,this.layout=h(U),this.icons={faFile:ei,faFolderClosed:v1},this.errorSelection=null,this.selection=null}onSelect(i){if(i){if(this.mustHaveShareOutsidePermission){if(i.permissions.indexOf(at.SHARE_OUTSIDE)===-1){this.errorSelection=this.layout.translateString("You do not have share permission"),this.selection=null;return}if(i.path.split("/").length<=2){this.errorSelection=this.layout.translateString("You can not share a space"),this.selection=null;return}}let r=i,o=this.currentRoots.find(a=>a.file.id===r.id);o?(this.errorSelection=this.layout.translateString("This item is already selected"),this.selection=null):(o=this.currentRoots.find(a=>r.path.startsWith(a.file.path)),o?(this.errorSelection=`${this.layout.translateString("Parent item is already selected")}: ${o.file.path}`,this.selection=null):(this.errorSelection=null,this.selection=r))}else this.selection=null,this.errorSelection=null}onSubmit(){this.submitEvent.emit({id:this.selection.id,name:this.selection.name,path:this.selection.path,mime:this.selection.mime,permissions:this.selection.permissions}),this.layout.closeDialog()}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=D({type:e,selectors:[["app-files-tree-dialog"]],inputs:{currentRoots:"currentRoots",allowSpaces:"allowSpaces",toggleNodesAtStartup:"toggleNodesAtStartup",mustHaveShareOutsidePermission:"mustHaveShareOutsidePermission"},outputs:{submitEvent:"submitEvent"},decls:13,vars:11,consts:[[1,"modal-header"],[1,"modal-title"],["l10nTranslate",""],["aria-label","Close","type","button",1,"btn-close","btn-close-white",3,"click"],[1,"modal-body","py-2","px-0"],[3,"selected","enableNavigateTo","enableCopyMove","showFiles","allowShares","allowSpaces","sideBarHeader","toggleNodesAtStartup","resizeOffset"],[1,"modal-footer"],[1,"me-auto","fs-sm","text-danger","text-truncate"],["data-dismiss","modal","type","button","l10nTranslate","",1,"btn","btn-sm","btn-secondary",3,"click"],["type","button","l10nTranslate","",1,"btn","btn-sm","btn-primary",3,"click","disabled"],[3,"icon"]],template:function(r,o){r&1&&(c(0,"div",0)(1,"h4",1),L(2,Uo,4,5,"span")(3,Go,2,0,"span",2),d(),c(4,"button",3),b("click",function(){return o.layout.closeDialog()}),d()(),c(5,"div",4)(6,"app-files-tree",5),b("selected",function(s){return o.onSelect(s)}),d()(),c(7,"div",6),L(8,$o,2,1,"span",7),c(9,"button",8),b("click",function(){return o.layout.closeDialog()}),p(10,"Cancel"),d(),c(11,"button",9),b("click",function(){return o.onSubmit()}),p(12,"Confirm"),d()()),r&2&&(l(2),O(o.selection?2:3),l(4),f("enableNavigateTo",!1)("enableCopyMove",!1)("showFiles",!0)("allowShares",!1)("allowSpaces",o.allowSpaces)("sideBarHeader",!1)("toggleNodesAtStartup",o.toggleNodesAtStartup)("resizeOffset",200),l(2),O(o.errorSelection?8:-1),l(3),f("disabled",!o.selection))},dependencies:[ae,Mr,oe,g1],encapsulation:2});let t=e;return t})();function Wo(t,e){if(t&1){let n=F();c(0,"input",12),fe(1,"translate"),b("ngModelChange",function(r){_(n);let o=u();return x(o.checkInput(r,!0))}),d()}if(t&2){let n=u();q("is-invalid",!n.rootNameIsValid),f("ngModel",n.newSpaceRoot.name)("placeholder",_t(1,4,"Name",n.locale.language))}}function Ko(t,e){if(t&1&&(c(0,"span",9),p(1),d()),t&2){let n=u();l(),k(n.error)}}function Yo(t,e){if(t&1){let n=F();c(0,"button",13),b("click",function(){_(n);let r=u();return x(r.onSubmit())}),p(1,"Confirm"),d()}}function Xo(t,e){if(t&1){let n=F();c(0,"button",14),b("click",function(){_(n);let r=u();return x(r.onValidRoot())}),p(1,"Check the location"),d()}}var wr=(()=>{let e=class e{constructor(){this.currentRoots=[],this.submitEvent=new j,this.withRootName=!0,this.locale=h(it),this.layout=h(U),this.icons={faFolderClosed:Wn},this.newSpaceRoot={name:"",externalPath:""},this.rootNameIsValid=!1,this.rootPathIsValid=!1,this.rootIsValid=!1,this.spacesService=h(ct)}ngOnInit(){this.withRootName||(this.rootNameIsValid=!0)}keyEnter(){this.rootIsValid?this.onSubmit():this.onValidRoot()}onValidRoot(){if(this.withRootName&&!this.newSpaceRoot.name||!this.newSpaceRoot.externalPath){this.error="Name and location are required";return}this.newSpaceRoot.externalPath[0]!=="/"&&(this.newSpaceRoot.externalPath="/"+this.newSpaceRoot.externalPath);for(let i of this.currentRoots)if(this.newSpaceRoot.externalPath.startsWith(i.externalPath)){this.rootPathIsValid=!1,this.error="Parent location already exists in files";return}this.spacesService.checkSpaceRootPath(this.newSpaceRoot.externalPath).subscribe({next:()=>{this.rootPathIsValid=!0,this.rootNameIsValid=!0,this.rootIsValid=!0,this.error=null},error:i=>{this.rootPathIsValid=!1,this.error=i.error.message}})}onSubmit(){this.submitEvent.emit(this.newSpaceRoot),this.layout.closeDialog()}checkInput(i,r=!1){r?(this.newSpaceRoot.name=i,this.rootNameIsValid=!!i):(this.newSpaceRoot.externalPath=i,this.rootPathIsValid=!!i),this.rootIsValid&&(this.rootIsValid=!1)}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=D({type:e,selectors:[["app-space-root-path-dialog"]],hostBindings:function(r,o){r&1&&b("keyup.enter",function(){return o.keyEnter()})},inputs:{currentRoots:"currentRoots",withRootName:"withRootName"},outputs:{submitEvent:"submitEvent"},decls:14,vars:13,consts:[[1,"modal-header","align-items-center"],[1,"modal-title"],[1,"me-2",3,"icon"],["l10nTranslate",""],["aria-label","Close","type","button",1,"btn-close","btn-close-white",3,"click"],[1,"modal-body","form-validation"],["appAutofocus","","type","text","required","",1,"form-control","form-control-sm","my-2",3,"ngModel","is-invalid","placeholder"],["appAutofocus","","type","text","required","",1,"form-control","form-control-sm","my-4",3,"ngModelChange","autoFocus","ngModel","placeholder"],[1,"modal-footer"],["l10nTranslate","",1,"me-auto","fs-sm","text-danger","text-truncate"],["type","button","l10nTranslate","",1,"btn","btn-sm","btn-primary"],["type","button","l10nTranslate","",1,"btn","btn-sm","btn-success"],["appAutofocus","","type","text","required","",1,"form-control","form-control-sm","my-2",3,"ngModelChange","ngModel","placeholder"],["type","button","l10nTranslate","",1,"btn","btn-sm","btn-primary",3,"click"],["type","button","l10nTranslate","",1,"btn","btn-sm","btn-success",3,"click"]],template:function(r,o){r&1&&(c(0,"div",0)(1,"h4",1),g(2,"fa-icon",2),c(3,"span",3),p(4,"Add an external location"),d()(),c(5,"button",4),b("click",function(){return o.layout.closeDialog()}),d()(),c(6,"div",5),L(7,Wo,2,7,"input",6),c(8,"input",7),fe(9,"translate"),b("ngModelChange",function(s){return o.checkInput(s)}),d()(),c(10,"div",8),L(11,Ko,2,1,"span",9),L(12,Yo,2,0,"button",10)(13,Xo,2,0,"button",11),d()),r&2&&(l(2),f("icon",o.icons.faFolderClosed),l(5),O(o.withRootName?7:-1),l(),q("is-invalid",!o.rootPathIsValid),f("placeholder",tt("",_t(9,10,"Location",o.locale.language),": /home/sync-in/data"))("autoFocus",!o.withRootName)("ngModel",o.newSpaceRoot.externalPath),l(3),O(o.error?11:-1),l(),O(o.rootIsValid?12:13))},dependencies:[oe,ae,Wt,Ut,Gt,qt,$t,Qt,In],encapsulation:2});let t=e;return t})();var zr=(()=>{let e=class e{constructor(){this.locale=h(it)}ngOnInit(){this.setFilePath()}ngOnChanges(){this.setFilePath()}setFilePath(){let i=this.share.file?rt(this.share.file.name,-1):"";i?this.fileName=i:this.share.parent?.id?this.fileName=this.share.parent.name:this.share instanceof Et&&this.share.externalPath&&(this.fileName=this.share.externalPath)}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=D({type:e,selectors:[["app-share-file-name"]],inputs:{share:"share"},features:[Ft],decls:5,vars:2,consts:[[1,"d-flex","align-items-center","text-truncate"],["draggable","false","height","30","width","30","alt","",3,"error","src"],[1,"d-flex","flex-column","text-truncate","ms-2"],[1,"text-truncate"]],template:function(r,o){r&1&&(Li(0,"div",0)(1,"img",1),En("error",function(){return o.share.fallBackMimeUrl()}),Oi(),Li(2,"div",2)(3,"div",3),p(4),Oi()()()),r&2&&(l(),xn("src",o.share.mimeUrl,kt),l(3),J(" ",o.fileName," "))},encapsulation:2});let t=e;return t})();function Qo(t,e){if(t&1&&(c(0,"span"),p(1),d()),t&2){let n=u();l(),k(n.share.name)}}function Jo(t,e){t&1&&(c(0,"span",3),p(1,"Create a new share"),d())}function Zo(t,e){if(t&1&&g(0,"fa-icon",4),t&2){let n=u();f("icon",n.icons.faSpinner)}}function e0(t,e){t&1&&(c(0,"h4",5)(1,"span",3),p(2,"Edit share"),d()())}function t0(t,e){if(t&1&&(g(0,"fa-icon",39),c(1,"span",40),p(2,"Settings"),d()),t&2){let n=u();f("icon",n.icons.faCog)}}function i0(t,e){if(t&1&&(c(0,"div",19)(1,"label",41),p(2,"File"),d(),g(3,"app-share-file-name",42),d()),t&2){let n=u();l(3),f("share",n.share)}}function n0(t,e){if(t&1&&(c(0,"div",49)(1,"label",50),p(2,"Deactivation date"),d(),c(3,"div",51),p(4),fe(5,"amDateFormat"),d()()),t&2){let n=u(2);l(4),k(Bt(5,1,n.share.disabledAt))}}function r0(t,e){if(t&1&&(c(0,"div",31)(1,"div",43)(2,"label",44),p(3,"Creation date"),d(),c(4,"div",45),p(5),fe(6,"amDateFormat"),d()(),c(7,"div",46)(8,"label",47),p(9,"Modification date"),d(),c(10,"div",48),p(11),fe(12,"amDateFormat"),d()(),L(13,n0,6,3,"div",49),d()),t&2){let n=u();l(5),k(Bt(6,3,n.share.createdAt)),l(6),k(Bt(12,5,n.share.modifiedAt)),l(2),O(n.share.disabledAt&&!n.share.enabled?13:-1)}}function o0(t,e){if(t&1&&(g(0,"fa-icon",39),c(1,"span",52),p(2,"Members"),d(),c(3,"span"),p(4),d()),t&2){let n=u();f("icon",n.icons.faUsers),l(4),J("(",n.share.members.length,")")}}function a0(t,e){if(t&1&&(g(0,"fa-icon",39),c(1,"span",52),p(2,"Links"),d(),c(3,"span"),p(4),d()),t&2){let n=u();f("icon",n.icons.LINKS),l(4),J("(",n.share.links.length,")")}}function s0(t,e){if(t&1){let n=F();c(0,"button",54),b("click",function(){_(n);let r=u(2);return x(r.confirmDeletion=!0)}),p(1," Remove "),d()}if(t&2){let n=u(2);f("disabled",n.confirmDeletion)}}function l0(t,e){if(t&1){let n=F();c(0,"button",57),b("click",function(){_(n);let r=u(3);return x(r.openAdminRootDialog())}),g(1,"fa-icon",39),p(2," External location "),d()}if(t&2){let n=u(3);l(),f("icon",n.icons.faUserShield)}}function c0(t,e){if(t&1){let n=F();c(0,"button",55),b("click",function(){_(n);let r=u(2);return x(r.openSelectRootDialog())}),g(1,"fa-icon",39)(2,"fa-icon",39),p(3," File "),d(),L(4,l0,3,1,"button",56)}if(t&2){let n=u(2);l(),f("icon",n.icons.faPlus),l(),f("icon",n.icons.SHARES),l(2),O(n.user.isAdmin?4:-1)}}function d0(t,e){if(t&1&&L(0,s0,2,1,"button",53)(1,c0,5,3),t&2){let n=u();O(n.share.id?0:n.allowFilesOptions?1:-1)}}function f0(t,e){if(t&1){let n=F();c(0,"button",55),b("click",function(){_(n);let r=u();return x(r.openCreateLinkDialog())}),g(1,"fa-icon",39)(2,"fa-icon",39),p(3," Link "),d()}if(t&2){let n=u();l(),f("icon",n.icons.faPlus),l(),f("icon",n.icons.LINKS)}}var Lr=(()=>{let e=class e{constructor(){this.parentShareId=null,this.parentSpaceId=null,this.isSharesRepo=!1,this.inSharesList=!1,this.allowFilesOptions=!0,this.shareChange=new j,this.locale=h(it),this.layout=h(U),this.icons={SHARED:W.SHARED_WITH_OTHERS,SHARES:W.SHARES,LINKS:W.LINKS,faPlus:Gn,faSpinner:Kt,faUserShield:Vn,faUsers:kn,faCog:Bn},this.allowedPermissions=[],this.confirmDeletion=!1,this.loading=!1,this.submitted=!1,this.userService=h(Xt),this.user=this.userService.user,this.sharesService=h(Jt),this.linksService=h(Zt),this.spacesService=h(ct)}ngOnInit(){this.share||([this.share,this.parentShareId]=this.sharesService.initShareFromFile(this.user,this.file,this.isSharesRepo,this.inSharesList)),this.allowedPermissions=Object.keys(this.share.hPerms)}searchMembers(i){let r={search:i,ignoreUserIds:[this.user.id,...this.share.parent?.ownerId?[this.share.parent.ownerId]:[],...this.share.members.filter(o=>o.isUser).map(o=>o.id)],ignoreGroupIds:this.share.members.filter(o=>o.isGroup).map(o=>o.id)};return this.userService.searchMembers(r,[at.SHARE_INSIDE])}openSelectRootDialog(){this.layout.openDialog(Nr,"xl",{initialState:{toggleNodesAtStartup:!1,allowSpaces:!0,mustHaveShareOutsidePermission:!0}}).content.submitEvent.pipe(Ke(1)).subscribe(r=>{let o=r.path.split("/"),a={id:r.id,name:r.name,path:rt(r.path,2),permissions:r.permissions,mime:r.mime,ownerId:o[1]===Me.PERSONAL?this.user.id:null,inTrash:!1,isDir:r.mime===Ne,space:{alias:o[1],name:o[1],root:{alias:"",name:""}}},s=De(Q({},this.share),{file:a,externalPath:null});s.name=s.file.name,this.share=new Et(s),this.allowedPermissions=Object.keys(this.share.hPerms)})}openAdminRootDialog(){this.layout.openDialog(wr,null,{initialState:{withRootName:!1}}).content.submitEvent.pipe(Ke(1)).subscribe(r=>{let o=De(Q({},this.share),{file:null,externalPath:r.externalPath,name:r.externalPath.split("/").at(-1)});this.share=new Et(o),this.allowedPermissions=Object.keys(this.share.hPerms)})}openEditLinkDialog(i){this.linksService.editLinkDialog(i,this.share,i1.SHARE)}openCreateLinkDialog(){this.linksService.createLinkDialog(this.share)}cantSubmit(){return this.submitted||!this.share.externalPath&&!this.share.file}onSubmit(){this.loading=!0,this.submitted=!0,this.confirmDeletion?(this.parentShareId?this.sharesService.deleteShareChild(this.parentShareId,this.share.id):this.parentSpaceId?this.spacesService.deleteSpaceShare(this.parentSpaceId,this.share.id):this.sharesService.deleteShare(this.share.id)).subscribe({next:()=>{this.loading=!1,this.shareChange.emit(["delete",this.share]),this.layout.closeDialog()},error:r=>{this.onError(),this.layout.sendNotification("error","Delete share",this.share.name,r)}}):this.share.id===0?this.sharesService.createShare(this.share).subscribe({next:i=>{this.loading=!1,this.share=i,this.shareChange.emit(["add",i]),this.layout.closeDialog()},error:i=>{this.onError(),this.layout.sendNotification("error","Create share",this.share.name,i)}}):(this.parentShareId?this.sharesService.updateShareChild(this.parentShareId,this.share.id,this.share):this.parentSpaceId?this.spacesService.updateSpaceShare(this.parentSpaceId,this.share):this.sharesService.updateShare(this.share)).subscribe({next:r=>{this.loading=!1,this.share=r,this.shareChange.emit(["update",r]),this.layout.closeDialog()},error:r=>{this.onError(),this.layout.sendNotification("error","Edit share",this.share.name,r)}})}onCancel(){this.confirmDeletion?this.confirmDeletion=!1:this.layout.closeDialog()}onError(){this.confirmDeletion=!1,this.submitted=!1,this.loading=!1}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=D({type:e,selectors:[["app-share-dialog"]],inputs:{share:"share",file:"file",parentShareId:"parentShareId",parentSpaceId:"parentSpaceId",isSharesRepo:"isSharesRepo",inSharesList:"inSharesList",allowFilesOptions:"allowFilesOptions"},outputs:{shareChange:"shareChange"},decls:57,vars:39,consts:[[1,"modal-header","align-items-center"],[1,"modal-title"],[1,"me-2",3,"icon"],["l10nTranslate",""],["animation","spin","size","sm",1,"ms-2",3,"icon"],[1,"modal-title","ms-auto"],["aria-label","Close","type","button",3,"click"],[1,"modal-body"],["type","pills",3,"justified"],[1,"my-3"],["customClass","tab-dialog form-validation",3,"selectTab"],["tabHeading",""],[1,"d-flex","col-12"],[1,"d-flex","flex-column","col-6","pe-2"],[1,"mb-3","px-0",2,"max-width","80%"],["for","name","l10nTranslate",""],["id","name","type","text","appAutofocus","","required","",3,"ngModelChange","ngModel"],["for","description","l10nTranslate",""],["id","description","type","text",1,"form-control","form-control-sm",3,"ngModelChange","ngModel"],[1,"mb-3","px-0"],["for","switchStatus","l10nTranslate",""],[1,"d-flex","align-items-center","form-check","form-switch","cursor-pointer"],["id","switchStatus","type","checkbox","role","button",1,"form-check-input",3,"ngModelChange","ngModel"],["for","switchStatus","l10nTranslate","",1,"form-check-label","mb-0","ms-2"],[1,"col-6"],[1,"mb-3"],["for","from","l10nTranslate",""],["id","from",3,"share","showFullPath"],["for","permissions","l10nTranslate",""],[1,"d-flex"],["id","permissions",3,"permissions","replaceEmptyPermissions"],[1,"d-flex","d-none","d-lg-flex","mt-auto"],["customClass","tab-dialog",3,"selectTab"],[3,"membersChange","members","withPermissions","filterPermissions","allowedPermissions","searchFunction"],[3,"membersChange","members","filterPermissions","allowedPermissions","withPermissions","editFunction","hideInput"],[1,"modal-footer"],["type","button","l10nTranslate","",1,"btn","btn-sm","btn-success"],["data-dismiss","modal","type","button","l10nTranslate","",1,"btn","btn-sm","btn-secondary","ms-auto",3,"click"],["type","button","l10nTranslate","",3,"click","disabled"],[3,"icon"],["l10nTranslate","",1,"ms-2"],["for","shareFilePath","l10nTranslate","",1,"no-select"],["id","shareFilePath",3,"share"],[1,"d-flex","flex-column","align-items-start","col-4","px-0"],["for","created","l10nTranslate",""],["id","created"],[1,"d-flex","flex-column","align-items-center","col-4","px-0"],["for","modified","l10nTranslate",""],["id","modified"],[1,"d-flex","flex-column","align-items-end","col-4","text-danger","px-0"],["for","disabled","l10nTranslate",""],["id","disabled"],["l10nTranslate","",1,"ms-2","me-1"],["type","button","l10nTranslate","",1,"btn","btn-sm","btn-danger",3,"disabled"],["type","button","l10nTranslate","",1,"btn","btn-sm","btn-danger",3,"click","disabled"],["type","button","l10nTranslate","",1,"btn","btn-sm","btn-success",3,"click"],["type","button","l10nTranslate","",1,"btn","btn-sm","btn-warning"],["type","button","l10nTranslate","",1,"btn","btn-sm","btn-warning",3,"click"]],template:function(r,o){r&1&&(c(0,"div",0)(1,"h4",1),g(2,"fa-icon",2),L(3,Qo,2,1,"span")(4,Jo,2,0,"span",3),L(5,Zo,1,1,"fa-icon",4),d(),L(6,e0,3,0,"h4",5),c(7,"button",6),b("click",function(){return o.layout.closeDialog()}),d()(),c(8,"div",7)(9,"tabset",8),g(10,"hr",9),c(11,"tab",10),b("selectTab",function(){return o.tabView=null}),z(12,t0,3,1,"ng-template",11),c(13,"div",12)(14,"div",13)(15,"div",14)(16,"label",15),p(17," Share name "),d(),c(18,"input",16),et("ngModelChange",function(s){return Ze(o.share.name,s)||(o.share.name=s),s}),d()(),c(19,"div",14)(20,"label",17),p(21," Description "),d(),c(22,"input",18),et("ngModelChange",function(s){return Ze(o.share.description,s)||(o.share.description=s),s}),d()(),c(23,"div",19)(24,"label",20),p(25,"Share status"),d(),c(26,"div",21)(27,"input",22),et("ngModelChange",function(s){return Ze(o.share.enabled,s)||(o.share.enabled=s),s}),d(),c(28,"label",23),p(29),d()()()(),c(30,"div",24),L(31,i0,4,1,"div",19),c(32,"div",25)(33,"label",26),p(34,"Shared from"),d(),g(35,"app-share-repository",27),d(),c(36,"div",25)(37,"label",28),p(38,"File permissions"),d(),c(39,"div",29),g(40,"app-file-permissions",30),d()(),L(41,r0,14,7,"div",31),d()()(),c(42,"tab",32),b("selectTab",function(){return o.tabView="members"}),z(43,o0,5,2,"ng-template",11),c(44,"div",9)(45,"app-user-search",33),et("membersChange",function(s){return Ze(o.share.members,s)||(o.share.members=s),s}),d()()(),c(46,"tab",32),b("selectTab",function(){return o.tabView="links"}),z(47,a0,5,2,"ng-template",11),c(48,"div",9)(49,"app-user-search",34),et("membersChange",function(s){return Ze(o.share.links,s)||(o.share.links=s),s}),d()()()()(),c(50,"div",35),L(51,d0,2,1),L(52,f0,4,2,"button",36),c(53,"button",37),b("click",function(){return o.onCancel()}),p(54,"Cancel"),d(),c(55,"button",38),b("click",function(){return o.onSubmit()}),p(56),d()()),r&2&&(l(2),f("icon",o.icons.SHARED),l(),O(o.share.id?3:4),l(2),O(o.loading?5:-1),l(),O(o.share.id?6:-1),l(),Qe(tt("btn-close btn-close-white ",o.share.id?"ms-2":"ms-auto"," ms-2")),l(2),f("justified",!0),l(9),Qe(tt("form-control form-control-sm ",o.share.name?"":"is-invalid")),Je("ngModel",o.share.name),l(4),Je("ngModel",o.share.description),l(5),Je("ngModel",o.share.enabled),l(2),J(" ",o.share.enabled?"enabled":"disabled"," "),l(2),O(o.share.file!=null&&o.share.file.name||o.share.externalPath?31:-1),l(4),f("share",o.share)("showFullPath",!0),l(5),f("permissions",o.share.hPerms)("replaceEmptyPermissions",!0),l(),O(o.share!=null&&o.share.id?41:-1),l(4),Je("members",o.share.members),f("withPermissions",!0)("filterPermissions",!0)("allowedPermissions",o.allowedPermissions)("searchFunction",o.searchMembers.bind(o)),l(4),Je("members",o.share.links),f("filterPermissions",!0)("allowedPermissions",o.allowedPermissions)("withPermissions",!0)("editFunction",o.openEditLinkDialog.bind(o))("hideInput",!0),l(2),O(o.tabView?-1:51),l(),O(o.tabView==="links"?52:-1),l(3),Qe(tt("btn btn-sm ",o.confirmDeletion?"btn-danger":"btn-primary")),f("disabled",o.cantSubmit()),l(),J(" ",o.confirmDeletion?"Confirm deletion":"Confirm"," "))},dependencies:[oe,ae,l1,a1,o1,s1,Qt,Tn,Ut,Dn,Gt,qt,Wt,$t,c1,u1,zr,m1,n1],encapsulation:2});let t=e;return t})();var xi=class{constructor(e){this.isShareLink=!1,Object.assign(this,e),this.owner.avatarUrl=Jn(this.owner.login),this.isShareLink=this.type===f1.LINK,this.setMimeUrl()}fallBackMimeUrl(){this.mimeUrl=lt}setMimeUrl(){!this.file||this.file.mime===Ne?this.mimeUrl=He(p1):this.mimeUrl=He(this.file.mime)}};var Or=t=>({$implicit:t}),u0=(t,e)=>e.id;function p0(t,e){if(t&1&&g(0,"fa-icon",17),t&2){let n=u(3);f("icon",n.icons.LINKS)}}function h0(t,e){t&1&&Se(0)}function m0(t,e){if(t&1&&(c(0,"ul"),z(1,h0,1,0,"ng-container",10),d()),t&2){let n=u().$implicit;u(2);let i=Ai(15);l(),f("ngTemplateOutlet",i)("ngTemplateOutletContext",St(2,Or,n.children))}}function v0(t,e){if(t&1){let n=F();c(0,"li")(1,"div",14),b("click",function(){let r=_(n).$implicit,o=u(2);return x(o.onSelect(r))})("dblclick",function(){_(n);let r=u(2);return x(r.openChildShare())}),c(2,"div",15)(3,"img",16),b("error",function(){let r=_(n).$implicit;return x(r.fallBackMimeUrl())}),d(),L(4,p0,1,1,"fa-icon",17),c(5,"span",18),p(6),d()(),c(7,"div",19)(8,"span",20),p(9),d(),g(10,"app-user-avatar",21),d()(),L(11,m0,2,4,"ul"),d()}if(t&2){let n=e.$implicit,i=u(2);l(),q("selected",i.selected&&i.selected.id===n.id),l(2),f("src",n.mimeUrl,kt),l(),O(n.isShareLink?4:-1),l(2),k(n.name),l(3),k(n.owner.fullName),l(),f("user",n.owner)("height",26)("width",26),l(),O((n.children==null?null:n.children.length)>0?11:-1)}}function g0(t,e){if(t&1&&Sn(0,v0,12,10,"li",null,u0),t&2){let n=e.$implicit,i=u();_n(i.toShares(n))}}function b0(t,e){t&1&&Se(0)}var oc=(()=>{let e=class e{constructor(){this.fromAdmin=!1,this.sharesCountEvent=new j,this.layout=h(U),this.icons={SHARED:W.SHARED_WITH_OTHERS,LINKS:W.LINKS},this.loading=!1,this.childSharesLength=0,this.sharesService=h(Jt),this.linksService=h(Zt),this.spacesService=h(ct)}ngOnInit(){this.loadChildShares()}toShares(i){return i}loadChildShares(){this.loading=!0;let i;if(this.share)i=this.sharesService.listChildShares(this.share.id);else if(this.space)i=this.spacesService.listSpaceShares(this.space.id);else{console.error("share or space not defined");return}i.subscribe({next:r=>{this.childSharesLength=r.length,this.sharesCountEvent.emit(r.length),this.setShares(r.map(o=>new xi(o))),this.loading=!1},error:r=>{this.childShares=[],this.childSharesLength=0,this.loading=!1,this.layout.sendNotification("error","Child shares",r.error.message)}})}onSelect(i){this.selected=i}openChildShare(){if(this.selected.isShareLink){let i;if(this.share)i=this.linksService.shareLinkChild(this.share.id,this.selected.id);else if(this.space)i=this.spacesService.getSpaceShareLink(this.space.id,this.selected.id);else{console.error("share or space not defined");return}i.subscribe({next:r=>{this.layout.openDialog(h1,"md",{initialState:{share:r}}).content.shareChange.pipe(Ke(1)).subscribe(a=>{let[s,m]=a;s==="update"?this.selected.name=m.name:this.loadChildShares()})},error:r=>this.layout.sendNotification("error","Edit children shares",this.selected.name,r)})}else{let i;if(this.share)i=this.sharesService.getShareChild(this.share.id,this.selected.id);else if(this.space)i=this.spacesService.getSpaceShare(this.space.id,this.selected.id);else{console.error("share or space not defined");return}i.subscribe({next:r=>{this.layout.openDialog(Lr,"lg",{initialState:De(Q(Q({},this.share?{parentShareId:this.share.id}:{}),this.space?{parentSpaceId:this.space.id}:{}),{share:r})}).content.shareChange.pipe(Ke(1)).subscribe(a=>{let[s,m]=a;s==="update"?(this.selected.name=m.name,this.selected.alias=m.alias):this.loadChildShares()})},error:r=>this.layout.sendNotification("error","Edit children shares",this.selected.name,r)})}}setShares(i){let r={id:this.share?.id||0,children:[]};this.recurseChildrenShares(i,r),this.childShares=r.children}recurseChildrenShares(i,r){for(let o of i)o.parentId===r.id?(r.children=r.children??[],r.children.push(o),this.recurseChildrenShares(i,o)):r.id===0&&!o.parentId&&(r.children=r.children??[],r.children.push(o),this.recurseChildrenShares(i,o))}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=D({type:e,selectors:[["app-shared-children-dialog"]],inputs:{fromAdmin:"fromAdmin",share:"share",space:"space"},outputs:{sharesCountEvent:"sharesCountEvent"},decls:22,vars:9,consts:[["recursiveList",""],[1,"modal-header","align-items-center"],[1,"modal-title","w-100"],[1,"d-flex"],[1,"me-2",3,"icon"],[1,"ms-auto","me-2"],["l10nTranslate",""],["aria-label","Close","type","button",1,"btn-close","btn-close-white",3,"click"],["appAutoResize","",1,"modal-body",2,"padding-right","24px",3,"resizeOffset"],[1,"tree"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"modal-footer"],["l10nTranslate","","type","button",1,"btn","btn-sm","btn-primary",3,"click","disabled"],["data-dismiss","modal","l10nTranslate","","type","button",1,"btn","btn-sm","btn-secondary",3,"click"],[1,"app-div-hovered",3,"click","dblclick"],[1,"me-auto","text-truncate"],["alt","","draggable","false","height","28",3,"error","src"],[1,"align-middle","ms-1",3,"icon"],[1,"ms-1","align-middle"],[1,"d-flex","align-items-center"],[1,"fs-xxxs","me-2"],["tooltipPlacement","top","container","body",3,"user","height","width"]],template:function(r,o){if(r&1){let a=F();c(0,"div",1)(1,"h4",2)(2,"div",3)(3,"div"),g(4,"fa-icon",4),c(5,"span"),p(6),d()(),c(7,"div",5)(8,"span",6),p(9,"Child shares"),d(),p(10),d()()(),c(11,"button",7),b("click",function(){return _(a),x(o.layout.closeDialog())}),d()(),c(12,"div",8)(13,"ul",9),z(14,g0,2,0,"ng-template",null,0,xt)(16,b0,1,0,"ng-container",10),d()(),c(17,"div",11)(18,"button",12),b("click",function(){return _(a),x(o.openChildShare())}),p(19,"Edit"),d(),c(20,"button",13),b("click",function(){return _(a),x(o.layout.closeDialog())}),p(21,"Close"),d()()}if(r&2){let a=Ai(15);l(4),f("icon",o.icons.SHARED),l(2),k((o.share==null?null:o.share.name)||(o.space==null?null:o.space.name)),l(4),J("\xA0(",o.childSharesLength,") "),l(2),f("resizeOffset",170),l(4),f("ngTemplateOutlet",a)("ngTemplateOutletContext",St(7,Or,o.childShares)),l(2),f("disabled",!o.selected)}},dependencies:[Ci,ke,ae,oe,r1],styles:[`ul.tree[_ngcontent-%COMP%], ul.tree[_ngcontent-%COMP%] ul[_ngcontent-%COMP%]{list-style:none;margin:0;padding:0}ul.tree[_ngcontent-%COMP%] ul[_ngcontent-%COMP%]{margin-left:18px}ul.tree[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{margin:0;padding:0;line-height:30px;border-left:1px solid rgb(100,100,100);white-space:nowrap}ul.tree[_ngcontent-%COMP%] li[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{display:inline-flex;width:100%;cursor:pointer;border-radius:4px}ul.tree[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:last-child{border-left:none}ul.tree[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:before{position:relative;top:-.3em;height:1.2rem;width:1rem;color:#fff;border-bottom:1px solid rgb(100,100,100);content:"";display:inline-block}ul.tree[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:last-child:before{border-left:1px solid rgb(100,100,100)}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
`]});let t=e;return t})();export{Y0 as a,X0 as b,Ci as c,C0 as d,y0 as e,S0 as f,ei as g,_0 as h,x0 as i,E0 as j,M0 as k,N0 as l,w0 as m,v1 as n,S as o,sn as p,sa as q,la as r,cn as s,ca as t,We as u,xr as v,Er as w,g1 as x,Mr as y,Nr as z,wr as A,Lr as B,oc as C};
|