diff --git a/index.html b/index.html index 0b942d7c..4a2eae1b 100644 --- a/index.html +++ b/index.html @@ -8,11 +8,11 @@ - + - + diff --git a/main.a3b890158ba2a795.js b/main.87c0cecbdb82ab3c.js similarity index 54% rename from main.a3b890158ba2a795.js rename to main.87c0cecbdb82ab3c.js index b385cde4..6b3c2b58 100644 --- a/main.a3b890158ba2a795.js +++ b/main.87c0cecbdb82ab3c.js @@ -1 +1 @@ -(self.webpackChunkangular_slickgrid=self.webpackChunkangular_slickgrid||[]).push([[792],{274:ge=>{ge.exports=function(ra){var O={};function de(ee){if(O[ee])return O[ee].exports;var Q=O[ee]={i:ee,l:!1,exports:{}};return ra[ee].call(Q.exports,Q,Q.exports,de),Q.l=!0,Q.exports}return de.m=ra,de.c=O,de.d=function(ee,Q,Ra){de.o(ee,Q)||Object.defineProperty(ee,Q,{enumerable:!0,get:Ra})},de.r=function(ee){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(ee,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(ee,"__esModule",{value:!0})},de.t=function(ee,Q){if(1&Q&&(ee=de(ee)),8&Q||4&Q&&"object"==typeof ee&&ee&&ee.__esModule)return ee;var Ra=Object.create(null);if(de.r(Ra),Object.defineProperty(Ra,"default",{enumerable:!0,value:ee}),2&Q&&"string"!=typeof ee)for(var ft in ee)de.d(Ra,ft,function(Ci){return ee[Ci]}.bind(null,ft));return Ra},de.n=function(ee){var Q=ee&&ee.__esModule?function(){return ee.default}:function(){return ee};return de.d(Q,"a",Q),Q},de.o=function(ee,Q){return Object.prototype.hasOwnProperty.call(ee,Q)},de.p="",de(de.s=1)}([function(ra,O,de){var ee=de(2),Q=de(3),Ra=de(4);ra.exports=function(ft){return ee(ft)||Q(ft)||Ra()}},function(ra,O,de){"use strict";de.r(O),de.d(O,"sparkline",function(){return Da});var ee=de(0),Q=de.n(ee);function Ra(Oa,bt,va,pe){return parseFloat((bt-pe*bt/Oa+va).toFixed(2))}function ft(Oa){return Oa.value}function Ci(Oa,bt){var va=document.createElementNS("http://www.w3.org/2000/svg",Oa);for(var pe in bt)va.setAttribute(pe,bt[pe]);return va}function Da(Oa,bt,va){var pe;if(pe=Oa,Q()(pe.querySelectorAll("*")).forEach(function(si){return pe.removeChild(si)}),!(bt.length<=1)){va=va||{},"number"==typeof bt[0]&&(bt=bt.map(function(si){return{value:si}}));var wn=va.onmousemove,Qa=va.onmouseout,Un="interactive"in va?va.interactive:!!wn,Wu=va.spotRadius||2,Bn=2*Wu,K0=va.cursorWidth||2,zt=parseFloat(Oa.attributes["stroke-width"].value),mu=va.fetch||ft,ru=bt.map(function(si){return mu(si)}),Uu=parseFloat(Oa.attributes.width.value)-2*Bn,Cr=parseFloat(Oa.attributes.height.value),ba=Cr-2*zt-Bn,$l=Math.max.apply(Math,Q()(ru)),li=-1e3,Bo=ru.length-1,ql=Uu/Bo,Sn=[],ml=Ra($l,ba,zt+Wu,ru[0]),Qr="M".concat(Bn," ").concat(ml);ru.forEach(function(si,Hi){var Jn=Hi*ql+Bn,Fr=Ra($l,ba,zt+Wu,si);Sn.push(Object.assign({},bt[Hi],{index:Hi,x:Jn,y:Fr})),Qr+=" L ".concat(Jn," ").concat(Fr)});var W0=Ci("path",{class:"sparkline--line",d:Qr,fill:"none"}),sd=Ci("path",{class:"sparkline--fill",d:"".concat(Qr," V ").concat(Cr," L ").concat(Bn," ").concat(Cr," Z"),stroke:"none"});if(Oa.appendChild(sd),Oa.appendChild(W0),Un){var yr=Ci("line",{class:"sparkline--cursor",x1:li,x2:li,y1:0,y2:Cr,"stroke-width":K0}),Xr=Ci("circle",{class:"sparkline--spot",cx:li,cy:li,r:Wu});Oa.appendChild(yr),Oa.appendChild(Xr);var _r=Ci("rect",{width:Oa.attributes.width.value,height:Oa.attributes.height.value,style:"fill: transparent; stroke: transparent",class:"sparkline--interaction-layer"});Oa.appendChild(_r),_r.addEventListener("mouseout",function(si){yr.setAttribute("x1",li),yr.setAttribute("x2",li),Xr.setAttribute("cx",li),Qa&&Qa(si)}),_r.addEventListener("mousemove",function(si){var Hi=si.offsetX,Jn=Sn.find(function(J0){return J0.x>=Hi});Jn||(Jn=Sn[Bo]);var Fr,U0=Sn[Sn.indexOf(Jn)-1],So=(Fr=U0?U0.x+(Jn.x-U0.x)/2<=Hi?Jn:U0:Jn).x,Zh=Fr.y;Xr.setAttribute("cx",So),Xr.setAttribute("cy",Zh),yr.setAttribute("x1",So),yr.setAttribute("x2",So),wn&&wn(si,Fr)})}}}O.default=Da},function(ra,O){ra.exports=function(de){if(Array.isArray(de)){for(var ee=0,Q=new Array(de.length);ee{"use strict";var de={};O.r(de),O.d(de,{BackendUtilityService:()=>AG});var ee={};O.r(ee),O.d(ee,{collectionObserver:()=>M2,propertyObserver:()=>GF});var Q={};O.r(Q),O.d(Q,{CancelledException:()=>T2,addTreeLevelAndAggregatorsByMutation:()=>P2,addTreeLevelByMutation:()=>KF,cancellablePromise:()=>BG,castObservableToPromise:()=>sL,decimalFormatted:()=>I0,findItemInTreeStructure:()=>zh,findOrDefault:()=>zc,flattenToParentChildArray:()=>SG,formatNumber:()=>Mu,getCellValueFromQueryFieldGetter:()=>N2,getColumnFieldType:()=>I2,getDescendantProperty:()=>ti,getTranslationPrefix:()=>Gl,isColumnDateType:()=>dL,mapOperatorByFieldType:()=>R2,mapOperatorToShorthandDesignation:()=>bv,mapOperatorType:()=>MG,objectWithoutKey:()=>LG,thousandSeparatorFormatted:()=>Sc,unflattenParentChildArrayToTree:()=>zG,unsubscribeAll:()=>H2});var Ra={};O.r(Ra),O.d(Ra,{addToArrayWhenNotExists:()=>JG,addWhiteSpaces:()=>kv,arrayRemoveItemByIndex:()=>mL,calculateAvailableSpace:()=>V2,classNameToList:()=>Kt,createDomElement:()=>T,deepCopy:()=>ZG,deepMerge:()=>Ap,destroyAllElementProps:()=>cL,emptyElement:()=>_t,emptyObject:()=>$G,extend:()=>cu,findFirstAttribute:()=>O2,findWidthOrDefault:()=>Mc,getFunctionDetails:()=>pL,getHtmlStringOutput:()=>ui,getInnerSize:()=>WF,getOffset:()=>Lu,getOffsetRelativeToParent:()=>TG,getStyleProp:()=>PG,htmlEncode:()=>NG,htmlEncodeWithPadding:()=>RG,htmlEntityDecode:()=>IG,insertAfterElement:()=>HG,isDefined:()=>xt,isDefinedNumber:()=>wp,isEmptyObject:()=>gL,isNumber:()=>Ma,isObject:()=>Mh,isObjectEmpty:()=>qG,isPrimitiveOrHTML:()=>Bp,isPrimitiveValue:()=>j2,parseBoolean:()=>JF,removeAccentFromText:()=>xv,setDeepValue:()=>vr,stripTags:()=>Tu,titleCase:()=>yo,toCamelCase:()=>EL,toKebabCase:()=>fv,toSentenceCase:()=>Qs,toSnakeCase:()=>Tde,uniqueArray:()=>YG,uniqueObjectArray:()=>Pde,windowScrollPosition:()=>hL});var ft={};function Ci(t,e){return Object.is(t,e)}O.r(ft),O.d(ft,{sortByFieldType:()=>Cv});let Da=null,Oa=!1,bt=1;const va=Symbol("SIGNAL");function pe(t){const e=Da;return Da=t,e}function wn(){return Da}const Wu={version:0,lastCleanEpoch:0,dirty:!1,producerNode:void 0,producerLastReadVersion:void 0,producerIndexOfThis:void 0,nextProducerIndex:0,liveConsumerNode:void 0,liveConsumerIndexOfThis:void 0,consumerAllowSignalWrites:!1,consumerIsAlwaysLive:!1,producerMustRecompute:()=>!1,producerRecomputeValue:()=>{},consumerMarkedDirty:()=>{},consumerOnSignalRead:()=>{}};function Bn(t){if(Oa)throw new Error("");if(null===Da)return;Da.consumerOnSignalRead(t);const e=Da.nextProducerIndex++;if(ml(Da),et.nextProducerIndex;)t.producerNode.pop(),t.producerLastReadVersion.pop(),t.producerIndexOfThis.pop()}}function $l(t){ml(t);for(let e=0;e0}function ml(t){t.producerNode??=[],t.producerIndexOfThis??=[],t.producerLastReadVersion??=[]}function Qr(t){t.liveConsumerNode??=[],t.liveConsumerIndexOfThis??=[]}function W0(t){return void 0!==t.producerNode}function sd(t){const e=Object.create(si);e.computation=t;const a=()=>{if(zt(e),Bn(e),e.value===_r)throw e.error;return e.value};return a[va]=e,a}const yr=Symbol("UNSET"),Xr=Symbol("COMPUTING"),_r=Symbol("ERRORED"),si={...Wu,value:yr,dirty:!0,error:null,equal:Ci,producerMustRecompute:t=>t.value===yr||t.value===Xr,producerRecomputeValue(t){if(t.value===Xr)throw new Error("Detected cycle in computations.");const e=t.value;t.value=Xr;const a=Cr(t);let u;try{u=t.computation()}catch(i){u=_r,t.error=i}finally{ba(t,a)}e!==yr&&e!==_r&&u!==_r&&t.equal(e,u)?t.value=e:(t.value=u,t.version++)}};let Jn=function Hi(){throw new Error};function Fr(){Jn()}let So=null;function cn(t,e){ru()||Fr(),t.equal(t.value,e)||(t.value=e,function cd(t){t.version++,function K0(){bt++}(),mu(t),So?.()}(t))}const $h={...Wu,equal:Ci,value:void 0};function Se(t){return"function"==typeof t}function Oe(t){const a=t(u=>{Error.call(u),u.stack=(new Error).stack});return a.prototype=Object.create(Error.prototype),a.prototype.constructor=a,a}const Xa=Oe(t=>function(a){t(this),this.message=a?`${a.length} errors occurred during unsubscription:\n${a.map((u,i)=>`${i+1}) ${u.toString()}`).join("\n ")}`:"",this.name="UnsubscriptionError",this.errors=a});function ja(t,e){if(t){const a=t.indexOf(e);0<=a&&t.splice(a,1)}}class wa{constructor(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}unsubscribe(){let e;if(!this.closed){this.closed=!0;const{_parentage:a}=this;if(a)if(this._parentage=null,Array.isArray(a))for(const r of a)r.remove(this);else a.remove(this);const{initialTeardown:u}=this;if(Se(u))try{u()}catch(r){e=r instanceof Xa?r.errors:[r]}const{_finalizers:i}=this;if(i){this._finalizers=null;for(const r of i)try{hd(r)}catch(o){e=e??[],o instanceof Xa?e=[...e,...o.errors]:e.push(o)}}if(e)throw new Xa(e)}}add(e){var a;if(e&&e!==this)if(this.closed)hd(e);else{if(e instanceof wa){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=null!==(a=this._finalizers)&&void 0!==a?a:[]).push(e)}}_hasParent(e){const{_parentage:a}=this;return a===e||Array.isArray(a)&&a.includes(e)}_addParent(e){const{_parentage:a}=this;this._parentage=Array.isArray(a)?(a.push(e),a):a?[a,e]:e}_removeParent(e){const{_parentage:a}=this;a===e?this._parentage=null:Array.isArray(a)&&ja(a,e)}remove(e){const{_finalizers:a}=this;a&&ja(a,e),e instanceof wa&&e._removeParent(this)}}wa.EMPTY=(()=>{const t=new wa;return t.closed=!0,t})();const Vi=wa.EMPTY;function Ce(t){return t instanceof wa||t&&"closed"in t&&Se(t.remove)&&Se(t.add)&&Se(t.unsubscribe)}function hd(t){Se(t)?t():t.unsubscribe()}const zo={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},pu={setTimeout(t,e,...a){const{delegate:u}=pu;return u?.setTimeout?u.setTimeout(t,e,...a):setTimeout(t,e,...a)},clearTimeout(t){const{delegate:e}=pu;return(e?.clearTimeout||clearTimeout)(t)},delegate:void 0};function ct(t){pu.setTimeout(()=>{const{onUnhandledError:e}=zo;if(!e)throw t;e(t)})}function Oi(){}const pl=Mo("C",void 0,void 0);function Mo(t,e,a){return{kind:t,value:e,error:a}}let mn=null;function Ru(t){if(zo.useDeprecatedSynchronousErrorHandling){const e=!mn;if(e&&(mn={errorThrown:!1,error:null}),t(),e){const{errorThrown:a,error:u}=mn;if(mn=null,a)throw u}}else t()}class Zn extends wa{constructor(e){super(),this.isStopped=!1,e?(this.destination=e,Ce(e)&&e.add(this)):this.destination=io}static create(e,a,u){return new Ar(e,a,u)}next(e){this.isStopped?Kc(function to(t){return Mo("N",t,void 0)}(e),this):this._next(e)}error(e){this.isStopped?Kc(function ma(t){return Mo("E",void 0,t)}(e),this):(this.isStopped=!0,this._error(e))}complete(){this.isStopped?Kc(pl,this):(this.isStopped=!0,this._complete())}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe(),this.destination=null)}_next(e){this.destination.next(e)}_error(e){try{this.destination.error(e)}finally{this.unsubscribe()}}_complete(){try{this.destination.complete()}finally{this.unsubscribe()}}}const ut=Function.prototype.bind;function uo(t,e){return ut.call(t,e)}class $0{constructor(e){this.partialObserver=e}next(e){const{partialObserver:a}=this;if(a.next)try{a.next(e)}catch(u){gl(u)}}error(e){const{partialObserver:a}=this;if(a.error)try{a.error(e)}catch(u){gl(u)}else gl(e)}complete(){const{partialObserver:e}=this;if(e.complete)try{e.complete()}catch(a){gl(a)}}}class Ar extends Zn{constructor(e,a,u){let i;if(super(),Se(e)||!e)i={next:e??void 0,error:a??void 0,complete:u??void 0};else{let r;this&&zo.useDeprecatedNextContext?(r=Object.create(e),r.unsubscribe=()=>this.unsubscribe(),i={next:e.next&&uo(e.next,r),error:e.error&&uo(e.error,r),complete:e.complete&&uo(e.complete,r)}):i=e}this.destination=new $0(i)}}function gl(t){zo.useDeprecatedSynchronousErrorHandling?function Z0(t){zo.useDeprecatedSynchronousErrorHandling&&mn&&(mn.errorThrown=!0,mn.error=t)}(t):ct(t)}function Kc(t,e){const{onStoppedNotification:a}=zo;a&&pu.setTimeout(()=>a(t,e))}const io={closed:!0,next:Oi,error:function Jv(t){throw t},complete:Oi},Lo="function"==typeof Symbol&&Symbol.observable||"@@observable";function $n(t){return t}function jp(t){return 0===t.length?$n:1===t.length?t[0]:function(a){return t.reduce((u,i)=>i(u),a)}}class ht{constructor(e){e&&(this._subscribe=e)}lift(e){const a=new ht;return a.source=this,a.operator=e,a}subscribe(e,a,u){const i=function Zv(t){return t&&t instanceof Zn||function no(t){return t&&Se(t.next)&&Se(t.error)&&Se(t.complete)}(t)&&Ce(t)}(e)?e:new Ar(e,a,u);return Ru(()=>{const{operator:r,source:o}=this;i.add(r?r.call(i,o):o?this._subscribe(i):this._trySubscribe(i))}),i}_trySubscribe(e){try{return this._subscribe(e)}catch(a){e.error(a)}}forEach(e,a){return new(a=Yh(a))((u,i)=>{const r=new Ar({next:o=>{try{e(o)}catch(d){i(d),r.unsubscribe()}},error:i,complete:u});this.subscribe(r)})}_subscribe(e){var a;return null===(a=this.source)||void 0===a?void 0:a.subscribe(e)}[Lo](){return this}pipe(...e){return jp(e)(this)}toPromise(e){return new(e=Yh(e))((a,u)=>{let i;this.subscribe(r=>i=r,r=>u(r),()=>a(i))})}}function Yh(t){var e;return null!==(e=t??zo.Promise)&&void 0!==e?e:Promise}ht.create=t=>new ht(t);const qn=Oe(t=>function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"});class sa extends ht{constructor(){super(),this.closed=!1,this.currentObservers=null,this.observers=[],this.isStopped=!1,this.hasError=!1,this.thrownError=null}lift(e){const a=new To(this,this);return a.operator=e,a}_throwIfClosed(){if(this.closed)throw new qn}next(e){Ru(()=>{if(this._throwIfClosed(),!this.isStopped){this.currentObservers||(this.currentObservers=Array.from(this.observers));for(const a of this.currentObservers)a.next(e)}})}error(e){Ru(()=>{if(this._throwIfClosed(),!this.isStopped){this.hasError=this.isStopped=!0,this.thrownError=e;const{observers:a}=this;for(;a.length;)a.shift().error(e)}})}complete(){Ru(()=>{if(this._throwIfClosed(),!this.isStopped){this.isStopped=!0;const{observers:e}=this;for(;e.length;)e.shift().complete()}})}unsubscribe(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null}get observed(){var e;return(null===(e=this.observers)||void 0===e?void 0:e.length)>0}_trySubscribe(e){return this._throwIfClosed(),super._trySubscribe(e)}_subscribe(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)}_innerSubscribe(e){const{hasError:a,isStopped:u,observers:i}=this;return a||u?Vi:(this.currentObservers=null,i.push(e),new wa(()=>{this.currentObservers=null,ja(i,e)}))}_checkFinalizedStatuses(e){const{hasError:a,thrownError:u,isStopped:i}=this;a?e.error(u):i&&e.complete()}asObservable(){const e=new ht;return e.source=this,e}}sa.create=(t,e)=>new To(t,e);class To extends sa{constructor(e,a){super(),this.destination=e,this.source=a}next(e){var a,u;null===(u=null===(a=this.destination)||void 0===a?void 0:a.next)||void 0===u||u.call(a,e)}error(e){var a,u;null===(u=null===(a=this.destination)||void 0===a?void 0:a.error)||void 0===u||u.call(a,e)}complete(){var e,a;null===(a=null===(e=this.destination)||void 0===e?void 0:e.complete)||void 0===a||a.call(e)}_subscribe(e){var a,u;return null!==(u=null===(a=this.source)||void 0===a?void 0:a.subscribe(e))&&void 0!==u?u:Vi}}class Ye extends sa{constructor(e){super(),this._value=e}get value(){return this.getValue()}_subscribe(e){const a=super._subscribe(e);return!a.closed&&e.next(this._value),a}getValue(){const{hasError:e,thrownError:a,_value:u}=this;if(e)throw a;return this._throwIfClosed(),u}next(e){super.next(this._value=e)}}function Mn(t){return Se(t?.lift)}function da(t){return e=>{if(Mn(e))return e.lift(function(a){try{return t(a,this)}catch(u){this.error(u)}});throw new TypeError("Unable to lift unknown Observable type")}}function it(t,e,a,u,i){return new Ha(t,e,a,u,i)}class Ha extends Zn{constructor(e,a,u,i,r,o){super(e),this.onFinalize=r,this.shouldUnsubscribe=o,this._next=a?function(d){try{a(d)}catch(h){e.error(h)}}:super._next,this._error=i?function(d){try{i(d)}catch(h){e.error(h)}finally{this.unsubscribe()}}:super._error,this._complete=u?function(){try{u()}catch(d){e.error(d)}finally{this.unsubscribe()}}:super._complete}unsubscribe(){var e;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){const{closed:a}=this;super.unsubscribe(),!a&&(null===(e=this.onFinalize)||void 0===e||e.call(this))}}}function aa(t,e){return da((a,u)=>{let i=0;a.subscribe(it(u,r=>{u.next(t.call(e,r,i++))}))})}const yi=Oe(t=>function(){t(this),this.name="EmptyError",this.message="no elements in sequence"});function Jt(t,e){return da((a,u)=>{let i=0;a.subscribe(it(u,r=>t.call(e,r,i++)&&u.next(r)))})}const Ju=new ht(t=>t.complete());function gu(t){return t<=0?()=>Ju:da((e,a)=>{let u=0;e.subscribe(it(a,i=>{++u<=t&&(a.next(i),t<=u&&a.complete())}))})}function Yl(t){return da((e,a)=>{let u=!1;e.subscribe(it(a,i=>{u=!0,a.next(i)},()=>{u||a.next(t),a.complete()}))})}function Eu(t=El){return da((e,a)=>{let u=!1;e.subscribe(it(a,i=>{u=!0,a.next(i)},()=>u?a.complete():a.error(t())))})}function El(){return new yi}function Ln(t,e){const a=arguments.length>=2;return u=>u.pipe(t?Jt((i,r)=>t(i,r,u)):$n,gu(1),a?Yl(e):Eu(()=>new yi))}const vu={JSACTION:"__jsaction",OWNER:"__owner"};function pn(t){return t[vu.JSACTION]}function di(t){const e=pn(t)??{};return wr(t,e),e}function wr(t,e){t[vu.JSACTION]=e}const se_CLICK="click",se_KEYDOWN="keydown",se_MOUSEOVER="mouseover",se_MOUSEOUT="mouseout",se_MOUSEENTER="mouseenter",se_MOUSELEAVE="mouseleave",se_POINTEROVER="pointerover",se_POINTEROUT="pointerout",se_POINTERENTER="pointerenter",se_POINTERLEAVE="pointerleave",ve=[se_MOUSEENTER,se_MOUSELEAVE,"pointerenter","pointerleave"],yu=["focus","blur","error","load","toggle"],bl=[se_CLICK,"dblclick","focusin","focusout",se_KEYDOWN,"keyup","keypress",se_MOUSEOVER,se_MOUSEOUT,"submit","touchstart","touchend","touchmove","touchcancel","auxclick","change","compositionstart","compositionupdate","compositionend","beforeinput","input","select","copy","cut","paste","mousedown","mouseup","wheel","contextmenu","dragover","dragenter","dragleave","drop","dragstart","dragend","pointerdown","pointermove","pointerup","pointercancel","pointerover","pointerout","gotpointercapture","lostpointercapture","ended","loadedmetadata","pagehide","pageshow","visibilitychange","beforematch"].concat(yu);typeof navigator<"u"&&/Macintosh/.test(navigator.userAgent);typeof navigator<"u"&&!/Opera/.test(navigator.userAgent)&&/WebKit/.test(navigator.userAgent),typeof navigator<"u"&&(/MSIE/.test(navigator.userAgent)||/Trident/.test(navigator.userAgent)),typeof navigator<"u"&&!/Opera|WebKit/.test(navigator.userAgent)&&/Gecko/.test(navigator.product);typeof navigator<"u"&&/iPhone|iPad|iPod/.test(navigator.userAgent);function Ed(t,e){t.eventType=e}function Mf(t,e){t.eirp=e}function a3(t){return{eventType:t.eventType,event:t.event,targetElement:t.targetElement,eic:t.eic,eia:t.eia,timeStamp:t.timeStamp,eirp:t.eirp,eiack:t.eiack,eir:t.eir}}function kd(t,e,a,u,i,r,o,d){return{eventType:t,event:e,targetElement:a,eic:u,timeStamp:i,eia:r,eirp:o,eiack:d}}var t3,t;(t=t3||(t3={}))[t.I_AM_THE_JSACTION_FRAMEWORK=0]="I_AM_THE_JSACTION_FRAMEWORK";Symbol.for("propagationStopped");function lm(t){t&&(sm(t.c,t.et,t.h),sm(t.c,t.etc,t.h,!0))}function sm(t,e,a,u){for(let i=0;i=0)return;const u=(r,o,d)=>{this.handleEvent(r,o,d)};this.eventHandlers[e]=u;const i=function $t(t){return t===se_MOUSEENTER?se_MOUSEOVER:t===se_MOUSELEAVE?se_MOUSEOUT:t===se_POINTERENTER?se_POINTEROVER:t===se_POINTERLEAVE?se_POINTEROUT:t}(a||e);if(i!==e){const r=this.browserEventTypeToExtraEventTypes[i]||[];r.push(e),this.browserEventTypeToExtraEventTypes[i]=r}this.containerManager.addEventListener(i,r=>o=>{u(e,o,r)})}replayEarlyEvents(e=window._ejsa){e&&(this.replayEarlyEventInfos(e.q),lm(e),delete window._ejsa)}replayEarlyEventInfos(e){for(let a=0;a{const r=zr(e);function o(...d){if(this instanceof o)return r.call(this,...d),this;const h=new o(...d);return function(g){return i&&i(g,...d),(g.hasOwnProperty(yd)?g[yd]:Object.defineProperty(g,yd,{value:[]})[yd]).push(h),u&&u(g),g}}return a&&(o.prototype=Object.create(a.prototype)),o.prototype.ngMetadataName=t,o.annotationCls=o,o})}function zr(t){return function(...a){if(t){const u=t(...a);for(const i in u)this[i]=u[i]}}}function gn(t,e,a){return Zu(()=>{const u=zr(e);function i(...r){if(this instanceof i)return u.apply(this,r),this;const o=new i(...r);return d.annotation=o,d;function d(h,m,g){const v=h.hasOwnProperty(Qc)?h[Qc]:Object.defineProperty(h,Qc,{value:[]})[Qc];for(;v.length<=g;)v.push(null);return(v[g]=v[g]||[]).push(o),h}}return a&&(i.prototype=Object.create(a.prototype)),i.prototype.ngMetadataName=t,i.annotationCls=i,i})}function e0(t,e,a,u){return Zu(()=>{const i=zr(e);function r(...o){if(this instanceof r)return i.apply(this,o),this;const d=new r(...o);return function h(m,g){if(void 0===m)throw new Error("Standard Angular field decorators are not supported in JIT mode.");const v=m.constructor,k=v.hasOwnProperty(mt)?v[mt]:Object.defineProperty(v,mt,{value:{}})[mt];k[g]=k.hasOwnProperty(g)&&k[g]||[],k[g].unshift(d),u&&u(m,g,...o)}}return a&&(r.prototype=Object.create(a.prototype)),r.prototype.ngMetadataName=t,r.annotationCls=r,r})}const qt=globalThis;function wt(t){for(let e in t)if(t[e]===wt)return e;throw Error("Could not find renamed property on target object.")}function o3(t,e){for(const a in e)e.hasOwnProperty(a)&&!t.hasOwnProperty(a)&&(t[a]=e[a])}function ou(t){if("string"==typeof t)return t;if(Array.isArray(t))return"["+t.map(ou).join(", ")+"]";if(null==t)return""+t;if(t.overriddenName)return`${t.overriddenName}`;if(t.name)return`${t.name}`;const e=t.toString();if(null==e)return""+e;const a=e.indexOf("\n");return-1===a?e:e.substring(0,a)}function e1(t,e){return null==t||""===t?null===e?"":e:null==e||""===e?t:t+" "+e}const s5=wt({__forward_ref__:wt});function It(t){return t.__forward_ref__=It,t.toString=function(){return ou(this())},t}function We(t){return Cl(t)?t():t}function Cl(t){return"function"==typeof t&&t.hasOwnProperty(s5)&&t.__forward_ref__===It}function es(t,e,a){t!=e&&ua(a,t,e,"==")}function ua(t,e,a,u){throw new Error(`ASSERTION ERROR: ${t}`+(null==u?"":` [Expected=> ${a} ${u} ${e} <=Actual]`))}function oe(t){return{token:t.token,providedIn:t.providedIn||null,factory:t.factory,value:void 0}}function $u(t){return{providers:t.providers||[],imports:t.imports||[]}}function a1(t){return Uf(t,so)||Uf(t,_d)}function Uf(t,e){return t.hasOwnProperty(e)?t[e]:null}function en(t){return t&&(t.hasOwnProperty(Lr)||t.hasOwnProperty(as))?t[Lr]:null}const so=wt({\u0275prov:wt}),Lr=wt({\u0275inj:wt}),_d=wt({ngInjectableDef:wt}),as=wt({ngInjectorDef:wt});class he{constructor(e,a){this._desc=e,this.ngMetadataName="InjectionToken",this.\u0275prov=void 0,"number"==typeof a?this.__NG_ELEMENT_ID__=a:void 0!==a&&(this.\u0275prov=oe({token:this,providedIn:a.providedIn||"root",factory:a.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}}function cm(t){return t&&!!t.\u0275providers}const Fd=wt({\u0275cmp:wt}),p5=wt({\u0275dir:wt}),ha=wt({\u0275pipe:wt}),pt=wt({\u0275mod:wt}),Ba=wt({\u0275fac:wt}),hm=wt({__NG_ELEMENT_ID__:wt}),mm=wt({__NG_ENV_ID__:wt});function Ca(t){return"string"==typeof t?t:null==t?"":String(t)}function Dt(t){return"function"==typeof t?t.name||t.toString():"object"==typeof t&&null!=t&&"function"==typeof t.type?t.type.name||t.type.toString():Ca(t)}function g5(t,e){throw new Z(-201,!1)}var Ja;let s3;function Jf(){return s3}function En(t){const e=s3;return s3=t,e}function E5(t,e,a){const u=a1(t);return u&&"root"==u.providedIn?void 0===u.value?u.value=u.factory():u.value:a&Ja.Optional?null:void 0!==e?e:void g5()}!function(t){t[t.Default=0]="Default",t[t.Host=1]="Host",t[t.Self=2]="Self",t[t.SkipSelf=4]="SkipSelf",t[t.Optional=8]="Optional"}(Ja||(Ja={}));const t1={},v5="__NG_DI_FLAG__",pm="ngTempTokenPath",b5=/\n/gm,gm="\u0275",d3="__source";let us;function _l(t){const e=us;return us=t,e}function $f(t,e=Ja.Default){if(void 0===us)throw new Z(-203,!1);return null===us?E5(t,void 0,e):us.get(t,e&Ja.Optional?null:void 0,e)}function ye(t,e=Ja.Default){return(Jf()||$f)(We(t),e)}function vn(t){throw new Z(202,!1)}function U(t,e=Ja.Default){return ye(t,bu(e))}function bu(t){return typeof t>"u"||"number"==typeof t?t:(t.optional&&8)|(t.host&&1)|(t.self&&2)|(t.skipSelf&&4)}function k5(t){const e=[];for(let a=0;a ");else if("object"==typeof e){let r=[];for(let o in e)if(e.hasOwnProperty(o)){let d=e[o];r.push(o+":"+("string"==typeof d?JSON.stringify(d):ou(d)))}i=`{${r.join(", ")}}`}return`${a}${u?"("+u+")":""}[${i}]: ${t.replace(b5,"\n ")}`}("\n"+t.message,i,a,u),t.ngTokenPath=i,t[pm]=null,t}const c3=vm(gn("Inject",t=>({token:t})),-1),is=vm(gn("Optional"),8),DA=vm(gn("Self"),2),Bd=vm(gn("SkipSelf"),4),co=vm(gn("Host"),1);function ns(t,e){return t.hasOwnProperty(Ba)?t[Ba]:null}function Yn(t){return t.flat(Number.POSITIVE_INFINITY)}function rs(t,e){t.forEach(a=>Array.isArray(a)?rs(a,e):e(a))}function os(t,e,a){e>=t.length?t.push(a):t.splice(e,0,a)}function bm(t,e){return e>=t.length-1?t.pop():t.splice(e,1)[0]}function km(t,e){const a=[];for(let u=0;ue;){const r=i-2;t[i]=t[r],i--}t[e]=a,t[e+1]=u}}function Qn(t,e,a){let u=u1(t,e);return u>=0?t[1|u]=a:(u=~u,h3(t,u,e,a)),u}function fm(t,e){const a=u1(t,e);if(a>=0)return t[1|a]}function u1(t,e){return i1(t,e,1)}function i1(t,e,a){let u=0,i=t.length>>a;for(;i!==u;){const r=u+(i-u>>1),o=t[r<e?i=r:u=r+1}return~(i<e){o=r-1;break}}}for(;r-1){let r;for(;++ir?"":i[g+1].toLowerCase(),2&u&&m!==v){if(jo(u))return!1;o=!0}}}}else{if(!o&&!jo(u)&&!jo(h))return!1;if(o&&jo(h))continue;o=!1,u=h|1&u}}return jo(u)||o}function jo(t){return!(1&t)}function g3(t,e,a,u){if(null===e)return-1;let i=0;if(u||!a){let r=!1;for(;i-1)for(a++;a0?'="'+d+'"':"")+"]"}else 8&u?i+="."+o:4&u&&(i+=" "+o);else""!==i&&!jo(o)&&(e+=cs(r,i),i=""),u=o,r=r||!jo(u);a++}return""!==i&&(e+=cs(r,i)),e}function Md(t){return Zu(()=>{const e=BA(t),a={...e,decls:t.decls,vars:t.vars,template:t.template,consts:t.consts||null,ngContentSelectors:t.ngContentSelectors,onPush:t.changeDetection===Oo.OnPush,directiveDefs:null,pipeDefs:null,dependencies:e.standalone&&t.dependencies||null,getStandaloneInjector:null,signals:t.signals??!1,data:t.data||{},encapsulation:t.encapsulation||Ga.Emulated,styles:t.styles||La,_:null,schemas:t.schemas||null,tView:null,id:""};E3(a);const u=t.dependencies;return a.directiveDefs=v3(u,!1),a.pipeDefs=v3(u,!0),a.id=function Fl(t){let e=0;const a=[t.selectors,t.ngContentSelectors,t.hostVars,t.hostAttrs,t.consts,t.vars,t.decls,t.encapsulation,t.standalone,t.signals,t.exportAs,JSON.stringify(t.inputs),JSON.stringify(t.outputs),Object.getOwnPropertyNames(t.type.prototype),!!t.contentQueries,!!t.viewQuery].join("|");for(const i of a)e=Math.imul(31,e)+i.charCodeAt(0)|0;return e+=2147483648,"c"+e}(a),a})}function aD(t){return pa(t)||mi(t)}function tD(t){return null!==t}function kn(t){return Zu(()=>({type:t.type,bootstrap:t.bootstrap||La,declarations:t.declarations||La,imports:t.imports||La,exports:t.exports||La,transitiveCompileScopes:null,schemas:t.schemas||null,id:t.id||null}))}function C5(t,e){if(null==t)return Gi;const a={};for(const u in t)if(t.hasOwnProperty(u)){const i=t[u];let r,o,d=bn.None;Array.isArray(i)?(d=i[0],r=i[1],o=i[2]??r):(r=i,o=i),e?(a[r]=d!==bn.None?[u,d]:u,e[r]=o):a[r]=u}return a}function Me(t){return Zu(()=>{const e=BA(t);return E3(e),e})}function Ai(t){return{type:t.type,name:t.name,factory:null,pure:!1!==t.pure,standalone:!0===t.standalone,onDestroy:t.type.prototype.ngOnDestroy||null}}function pa(t){return t[Fd]||null}function mi(t){return t[p5]||null}function Mt(t){return t[ha]||null}function u0(t){const e=pa(t)||mi(t)||Mt(t);return null!==e&&e.standalone}function Nn(t,e){const a=t[pt]||null;if(!a&&!0===e)throw new Error(`Type ${ou(t)} does not have '\u0275mod' property.`);return a}function BA(t){const e={};return{type:t.type,providersResolver:null,factory:null,hostBindings:t.hostBindings||null,hostVars:t.hostVars||0,hostAttrs:t.hostAttrs||null,contentQueries:t.contentQueries||null,declaredInputs:e,inputTransforms:null,inputConfig:t.inputs||Gi,exportAs:t.exportAs||null,standalone:!0===t.standalone,signals:!0===t.signals,selectors:t.selectors||La,viewQuery:t.viewQuery||null,features:t.features||null,setInput:null,findHostDirectiveDefs:null,hostDirectives:null,inputs:C5(t.inputs,e),outputs:C5(t.outputs),debugInfo:null}}function E3(t){t.features?.forEach(e=>e(t))}function v3(t,e){if(!t)return null;const a=e?Mt:aD;return()=>("function"==typeof t?t():t).map(u=>a(u)).filter(tD)}function i0(t){return{\u0275providers:t}}function SA(...t){return{\u0275providers:_m(!0,t),\u0275fromNgModule:!0}}function _m(t,...e){const a=[],u=new Set;let i;const r=o=>{a.push(o)};return rs(e,o=>{const d=o;hs(d,r,[],u)&&(i||=[],i.push(d))}),void 0!==i&&y5(i,r),a}function y5(t,e){for(let a=0;a{e(r,u)})}}function hs(t,e,a,u){if(!(t=We(t)))return!1;let i=null,r=en(t);const o=!r&&pa(t);if(r||o){if(o&&!o.standalone)return!1;i=t}else{const h=t.ngModule;if(r=en(h),!r)return!1;i=h}const d=u.has(i);if(o){if(d)return!1;if(u.add(i),o.dependencies){const h="function"==typeof o.dependencies?o.dependencies():o.dependencies;for(const m of h)hs(m,e,a,u)}}else{if(!r)return!1;{if(null!=r.imports&&!d){let m;u.add(i);try{rs(r.imports,g=>{hs(g,e,a,u)&&(m||=[],m.push(g))})}finally{}void 0!==m&&y5(m,e)}if(!d){const m=ns(i)||(()=>new i);e({provide:i,useFactory:m,deps:La},i),e({provide:Xn,useValue:i,multi:!0},i),e({provide:Vo,useValue:()=>ye(i),multi:!0},i)}const h=r.providers;if(null!=h&&!d){const m=t;Fm(h,g=>{e(g,m)})}}}return i!==t&&void 0!==t.providers}function Fm(t,e){for(let a of t)cm(a)&&(a=a.\u0275providers),Array.isArray(a)?Fm(a,e):e(a)}const Sa=wt({provide:String,useValue:wt});function Go(t){return null!==t&&"object"==typeof t&&Sa in t}function ya(t){return!(!t||!t.useExisting)}function uD(t){return!(!t||!t.useFactory)}function Ld(t){return"function"==typeof t}const Td=new he(""),Am={},MA={};let l1;function b3(){return void 0===l1&&(l1=new Sd),l1}class tn{}class Pd extends tn{get destroyed(){return this._destroyed}constructor(e,a,u,i){super(),this.parent=a,this.source=u,this.scopes=i,this.records=new Map,this._ngOnDestroyHooks=new Set,this._onDestroyHooks=[],this._destroyed=!1,A5(e,o=>this.processProvider(o)),this.records.set(f5,Nd(void 0,this)),i.has("environment")&&this.records.set(tn,Nd(void 0,this));const r=this.records.get(Td);null!=r&&"string"==typeof r.value&&this.scopes.add(r.value),this.injectorDefTypes=new Set(this.get(Xn,La,Ja.Self))}destroy(){this.assertNotDestroyed(),this._destroyed=!0;const e=pe(null);try{for(const u of this._ngOnDestroyHooks)u.ngOnDestroy();const a=this._onDestroyHooks;this._onDestroyHooks=[];for(const u of a)u()}finally{this.records.clear(),this._ngOnDestroyHooks.clear(),this.injectorDefTypes.clear(),pe(e)}}onDestroy(e){return this.assertNotDestroyed(),this._onDestroyHooks.push(e),()=>this.removeOnDestroy(e)}runInContext(e){this.assertNotDestroyed();const a=_l(this),u=En(void 0);try{return e()}finally{_l(a),En(u)}}get(e,a=t1,u=Ja.Default){if(this.assertNotDestroyed(),e.hasOwnProperty(mm))return e[mm](this);u=bu(u);const r=_l(this),o=En(void 0);try{if(!(u&Ja.SkipSelf)){let h=this.records.get(e);if(void 0===h){const m=function Al(t){return"function"==typeof t||"object"==typeof t&&t instanceof he}(e)&&a1(e);h=m&&this.injectableDefInScope(m)?Nd(_5(e),Am):null,this.records.set(e,h)}if(null!=h)return this.hydrate(e,h)}const d=u&Ja.Self?b3():this.parent;return a=u&Ja.Optional&&a===t1?null:a,d.get(e,a)}catch(d){if("NullInjectorError"===d.name){if((d[pm]=d[pm]||[]).unshift(ou(e)),r)throw d;return Yf(d,e,"R3InjectorError",this.source)}throw d}finally{En(o),_l(r)}}resolveInjectorInitializers(){const e=pe(null),a=_l(this),u=En(void 0);try{const r=this.get(Vo,La,Ja.Self);for(const o of r)o()}finally{_l(a),En(u),pe(e)}}toString(){const e=[],a=this.records;for(const u of a.keys())e.push(ou(u));return`R3Injector[${e.join(", ")}]`}assertNotDestroyed(){if(this._destroyed)throw new Z(205,!1)}processProvider(e){let a=Ld(e=We(e))?e:We(e&&e.provide);const u=function TA(t){if(Go(t))return Nd(void 0,t.useValue);return Nd(F5(t),Am)}(e);if(!Ld(e)&&!0===e.multi){let i=this.records.get(a);i||(i=Nd(void 0,Am,!0),i.factory=()=>k5(i.multi),this.records.set(a,i)),a=e,i.multi.push(e)}this.records.set(a,u)}hydrate(e,a){const u=pe(null);try{return a.value===Am&&(a.value=MA,a.value=a.factory()),"object"==typeof a.value&&a.value&&function wm(t){return null!==t&&"object"==typeof t&&"function"==typeof t.ngOnDestroy}(a.value)&&this._ngOnDestroyHooks.add(a.value),a.value}finally{pe(u)}}injectableDefInScope(e){if(!e.providedIn)return!1;const a=We(e.providedIn);return"string"==typeof a?"any"===a||this.scopes.has(a):this.injectorDefTypes.has(a)}removeOnDestroy(e){const a=this._onDestroyHooks.indexOf(e);-1!==a&&this._onDestroyHooks.splice(a,1)}}function _5(t){const e=a1(t),a=null!==e?e.factory:ns(t);if(null!==a)return a;if(t instanceof he)throw new Z(204,!1);if(t instanceof Function)return function LA(t){if(t.length>0)throw new Z(204,!1);const a=function lu(t){return t&&(t[so]||t[_d])||null}(t);return null!==a?()=>a.factory(t):()=>new t}(t);throw new Z(204,!1)}function F5(t,e,a){let u;if(Ld(t)){const i=We(t);return ns(i)||_5(i)}if(Go(t))u=()=>We(t.useValue);else if(uD(t))u=()=>t.useFactory(...k5(t.deps||[]));else if(ya(t))u=()=>ye(We(t.useExisting));else{const i=We(t&&(t.useClass||t.provide));if(!function PA(t){return!!t.deps}(t))return ns(i)||_5(i);u=()=>new i(...k5(t.deps))}return u}function Nd(t,e,a=!1){return{factory:t,value:e,multi:a?[]:void 0}}function A5(t,e){for(const a of t)Array.isArray(a)?A5(a,e):a&&cm(a)?A5(a.\u0275providers,e):e(a)}function Pr(t,e){t instanceof Pd&&t.assertNotDestroyed();const u=_l(t),i=En(void 0);try{return e()}finally{_l(u),En(i)}}function w5(){return void 0!==Jf()||null!=function Em(){return us}()}function k3(t){if(!w5())throw new Z(-203,!1)}var n0,iD,B5;function pi(t){const e=qt.ng;if(e&&e.\u0275compilerFacade)return e.\u0275compilerFacade;throw new Error("JIT compiler unavailable")}!function(t){t[t.Directive=0]="Directive",t[t.Component=1]="Component",t[t.Injectable=2]="Injectable",t[t.Pipe=3]="Pipe",t[t.NgModule=4]="NgModule"}(n0||(n0={})),function(t){t[t.Directive=0]="Directive",t[t.Pipe=1]="Pipe",t[t.NgModule=2]="NgModule"}(iD||(iD={})),function(t){t[t.Emulated=0]="Emulated",t[t.None=2]="None",t[t.ShadowDom=3]="ShadowDom"}(B5||(B5={}));const r0={\u0275\u0275defineInjectable:oe,\u0275\u0275defineInjector:$u,\u0275\u0275inject:ye,\u0275\u0275invalidFactoryDep:vn,resolveForwardRef:We},NA=Function;function Bm(t){return"function"==typeof t}const nD=/^function\s+\S+\(\)\s*{[\s\S]+\.apply\(this,\s*(arguments|(?:[^()]+\(\[\],)?[^()]+\(arguments\).*)\)/,IA=/^class\s+[A-Za-z\d$_]*\s*extends\s+[^{]+{/,RA=/^class\s+[A-Za-z\d$_]*\s*extends\s+[^{]+{[\s\S]*constructor\s*\(/,HA=/^class\s+[A-Za-z\d$_]*\s*extends\s+[^{]+{[\s\S]*constructor\s*\(\)\s*{[^}]*super\(\.\.\.arguments\)/;class x3{constructor(e){this._reflect=e||qt.Reflect}factory(e){return(...a)=>new e(...a)}_zipTypesAndAnnotations(e,a){let u;u=km(typeof e>"u"?a.length:e.length);for(let i=0;i"u"?u[i]=[]:e[i]&&e[i]!=Object?u[i]=[e[i]]:u[i]=[],a&&null!=a[i]&&(u[i]=u[i].concat(a[i]));return u}_ownParameters(e,a){if(function rD(t){return nD.test(t)||HA.test(t)||IA.test(t)&&!RA.test(t)}(e.toString()))return null;if(e.parameters&&e.parameters!==a.parameters)return e.parameters;const i=e.ctorParameters;if(i&&i!==a.ctorParameters){const d="function"==typeof i?i():i,h=d.map(g=>g&&g.type),m=d.map(g=>g&&Sm(g.decorators));return this._zipTypesAndAnnotations(h,m)}const r=e.hasOwnProperty(Qc)&&e[Qc],o=this._reflect&&this._reflect.getOwnMetadata&&this._reflect.getOwnMetadata("design:paramtypes",e);return o||r?this._zipTypesAndAnnotations(o,r):km(e.length)}parameters(e){if(!Bm(e))return[];const a=s1(e);let u=this._ownParameters(e,a);return!u&&a!==Object&&(u=this.parameters(a)),u||[]}_ownAnnotations(e,a){if(e.annotations&&e.annotations!==a.annotations){let u=e.annotations;return"function"==typeof u&&u.annotations&&(u=u.annotations),u}return e.decorators&&e.decorators!==a.decorators?Sm(e.decorators):e.hasOwnProperty(yd)?e[yd]:null}annotations(e){if(!Bm(e))return[];const a=s1(e),u=this._ownAnnotations(e,a)||[];return(a!==Object?this.annotations(a):[]).concat(u)}_ownPropMetadata(e,a){if(e.propMetadata&&e.propMetadata!==a.propMetadata){let u=e.propMetadata;return"function"==typeof u&&u.propMetadata&&(u=u.propMetadata),u}if(e.propDecorators&&e.propDecorators!==a.propDecorators){const u=e.propDecorators,i={};return Object.keys(u).forEach(r=>{i[r]=Sm(u[r])}),i}return e.hasOwnProperty(mt)?e[mt]:null}propMetadata(e){if(!Bm(e))return{};const a=s1(e),u={};if(a!==Object){const r=this.propMetadata(a);Object.keys(r).forEach(o=>{u[o]=r[o]})}const i=this._ownPropMetadata(e,a);return i&&Object.keys(i).forEach(r=>{const o=[];u.hasOwnProperty(r)&&o.push(...u[r]),o.push(...i[r]),u[r]=o}),u}ownPropMetadata(e){return Bm(e)&&this._ownPropMetadata(e,s1(e))||{}}hasLifecycleHook(e,a){return e instanceof NA&&a in e.prototype}}function Sm(t){return t?t.map(e=>new(0,e.type.annotationCls)(...e.args?e.args:[])):[]}function s1(t){const e=t.prototype?Object.getPrototypeOf(t.prototype):null;return(e?e.constructor:null)||Object}const ku=0,Ee=1,Qe=2,Qt=3,ho=4,un=5,xn=6,d1=7,Bt=8,gi=9,wl=10,ga=11,zm=12,oD=13,ms=14,xu=15,o0=16,c1=17,l0=18,Id=19,S5=20,s0=21,f3=22,mo=23,Ge=25,Mm=1,Bl=7,h1=9,qu=10;var Lm;function wi(t){return Array.isArray(t)&&"object"==typeof t[Mm]}function fn(t){return Array.isArray(t)&&!0===t[Mm]}function z5(t){return!!(4&t.flags)}function B(t){return t.componentOffset>-1}function we(t){return!(1&~t.flags)}function _u(t){return!!t.template}function Fu(t){return!!(512&t[Qe])}function gs(t){return!(256&~t[Qe])}!function(t){t[t.None=0]="None",t[t.HasTransplantedViews=2]="HasTransplantedViews"}(Lm||(Lm={}));class Si{constructor(e,a,u){this.previousValue=e,this.currentValue=a,this.firstChange=u}isFirstChange(){return this.firstChange}}function vs(t,e,a,u){null!==e?e.applyValueToInputSignal(e,u):t[a]=u}function nn(){return sD}function sD(t){return t.type.prototype.ngOnChanges&&(t.setInput=jA),OA}function OA(){const t=cD(this),e=t?.current;if(e){const a=t.previous;if(a===Gi)t.previous=e;else for(let u in e)a[u]=e[u];t.current=null,this.ngOnChanges(e)}}function jA(t,e,a,u,i){const r=this.declaredInputs[u],o=cD(t)||function GA(t,e){return t[dD]=e}(t,{previous:Gi,current:null}),d=o.current||(o.current={}),h=o.previous,m=h[r];d[r]=new Si(m&&m.currentValue,a,h===Gi),vs(t,e,i,a)}nn.ngInherit=!0;const dD="__ngSimpleChanges__";function cD(t){return t[dD]||null}let P5=null;const Sl=function(t,e,a){P5?.(t,e,a)};function kt(t){for(;Array.isArray(t);)t=t[ku];return t}function I5(t){for(;Array.isArray(t);){if("object"==typeof t[Mm])return t;t=t[ku]}return null}function m1(t,e){return kt(e[t])}function Dn(t,e){return kt(e[t.index])}function p1(t,e){return t.data[e]}function bs(t,e){return t[e]}function ar(t,e){const a=e[t];return wi(a)?a:a[ku]}function y3(t){return!(128&~t[Qe])}function Za(t,e){return null==e?null:t[e]}function Ki(t){t[c1]=0}function g1(t){1024&t[Qe]||(t[Qe]|=1024,y3(t)&&ks(t))}function Vd(t,e){for(;t>0;)e=e[ms],t--;return e}function zl(t){return!!(9216&t[Qe]||t[mo]?.dirty)}function Eo(t){t[wl].changeDetectionScheduler?.notify(7),64&t[Qe]&&(t[Qe]|=1024),zl(t)&&ks(t)}function ks(t){t[wl].changeDetectionScheduler?.notify(0);let e=Rr(t);for(;null!==e&&!(8192&e[Qe])&&(e[Qe]|=8192,y3(e));)e=Rr(e)}function xs(t,e){if(!(256&~t[Qe]))throw new Z(911,!1);null===t[s0]&&(t[s0]=[]),t[s0].push(e)}function E1(t,e){if(null===t[s0])return;const a=t[s0].indexOf(e);-1!==a&&t[s0].splice(a,1)}function Rr(t){const e=t[Qt];return fn(e)?e[Qt]:e}const oa={lFrame:fD(null),bindingsEnabled:!0,skipHydrationRootTNode:null};var fs;!function(t){t[t.Off=0]="Off",t[t.Exhaustive=1]="Exhaustive",t[t.OnlyDirtyViews=2]="OnlyDirtyViews"}(fs||(fs={}));let h0=!1;function jd(){return oa.bindingsEnabled}function tr(){return null!==oa.skipHydrationRootTNode}function q(){return oa.lFrame.lView}function _a(){return oa.lFrame.tView}function nt(t){return oa.lFrame.contextLView=t,t[Bt]}function Xe(t){return oa.lFrame.contextLView=null,t}function St(){let t=Ei();for(;null!==t&&64===t.type;)t=t.parent;return t}function Ei(){return oa.lFrame.currentTNode}function fe(){const t=oa.lFrame,e=t.currentTNode;return t.isParent?e:e.parent}function In(t,e){const a=oa.lFrame;a.currentTNode=t,a.isParent=e}function F3(){return oa.lFrame.isParent}function J(){oa.lFrame.isParent=!1}function Hr(){return oa.lFrame.contextLView}function Im(){return h0}function vD(t){h0=t}function Rn(){const t=oa.lFrame;let e=t.bindingRootIndex;return-1===e&&(e=t.bindingRootIndex=t.tView.bindingStartIndex),e}function p0(){return oa.lFrame.bindingIndex}function bD(t){return oa.lFrame.bindingIndex=t}function bo(){return oa.lFrame.bindingIndex++}function Wo(t){const e=oa.lFrame,a=e.bindingIndex;return e.bindingIndex=e.bindingIndex+t,a}function R5(t){oa.lFrame.inI18n=t}function KA(t,e){const a=oa.lFrame;a.bindingIndex=a.bindingRootIndex=t,H5(e)}function H5(t){oa.lFrame.currentDirectiveIndex=t}function ur(t){const e=oa.lFrame.currentDirectiveIndex;return-1===e?null:t[e]}function V5(){return oa.lFrame.currentQueryIndex}function Ml(t){oa.lFrame.currentQueryIndex=t}function UA(t){const e=t[Ee];return 2===e.type?e.declTNode:1===e.type?t[un]:null}function xD(t,e,a){if(a&Ja.SkipSelf){let i=e,r=t;for(;(i=i.parent,null===i&&!(a&Ja.Host))&&(i=UA(r),!(null===i||(r=r[ms],10&i.type))););if(null===i)return!1;e=i,t=r}const u=oa.lFrame=Rm();return u.currentTNode=e,u.lView=t,!0}function f1(t){const e=Rm(),a=t[Ee];oa.lFrame=e,e.currentTNode=a.firstChild,e.lView=t,e.tView=a,e.contextLView=t,e.bindingIndex=a.bindingStartIndex,e.inI18n=!1}function Rm(){const t=oa.lFrame,e=null===t?null:t.child;return null===e?fD(t):e}function fD(t){const e={currentTNode:null,isParent:!0,lView:null,tView:null,selectedIndex:-1,contextLView:null,elementDepthCount:0,currentNamespace:null,currentDirectiveIndex:-1,bindingRootIndex:-1,bindingIndex:-1,currentQueryIndex:0,parent:t,child:null,inI18n:!1};return null!==t&&(t.child=e),e}function DD(){const t=oa.lFrame;return oa.lFrame=t.parent,t.currentTNode=null,t.lView=null,t}const CD=DD;function Hm(){const t=DD();t.isParent=!0,t.tView=null,t.selectedIndex=-1,t.contextLView=null,t.elementDepthCount=0,t.currentDirectiveIndex=-1,t.currentNamespace=null,t.bindingRootIndex=-1,t.bindingIndex=-1,t.currentQueryIndex=0}function rn(){return oa.lFrame.selectedIndex}function Ds(t){oa.lFrame.selectedIndex=t}function le(){const t=oa.lFrame;return p1(t.tView,t.selectedIndex)}function j5(){return oa.lFrame.currentNamespace}let AD=!0;function Vm(){return AD}function Ll(t){AD=t}function A3(t,e){for(let a=e.directiveStart,u=e.directiveEnd;a=u)break}else e[h]<0&&(t[c1]+=65536),(d>14>16&&(3&t[Qe])===e&&(t[Qe]+=16384,wD(d,r)):wD(d,r)}const C1=-1;class Om{constructor(e,a,u){this.factory=e,this.resolving=!1,this.canSeeViewProviders=a,this.injectImpl=u}}const U5={};class Wd{constructor(e,a){this.injector=e,this.parentInjector=a}get(e,a,u){u=bu(u);const i=this.injector.get(e,U5,u);return i!==U5||a===U5?i:this.parentInjector.get(e,a,u)}}function ys(t){return t!==C1}function jm(t){return 32767&t}function Tl(t,e){let a=function BD(t){return t>>16}(t),u=e;for(;a>0;)u=u[ms],a--;return u}let J5=!0;function y1(t){const e=J5;return J5=t,e}const SD=255,zD=5;let ew=0;const Pl={};function B3(t,e){const a=MD(t,e);if(-1!==a)return a;const u=e[Ee];u.firstCreatePass&&(t.injectorIndex=e.length,Z5(u.data,t),Z5(e,null),Z5(u.blueprint,null));const i=S3(t,e),r=t.injectorIndex;if(ys(i)){const o=jm(i),d=Tl(i,e),h=d[Ee].data;for(let m=0;m<8;m++)e[r+m]=d[o+m]|h[o+m]}return e[r+8]=i,r}function Z5(t,e){t.push(0,0,0,0,0,0,0,0,e)}function MD(t,e){return-1===t.injectorIndex||t.parent&&t.parent.injectorIndex===t.injectorIndex||null===e[t.injectorIndex+8]?-1:t.injectorIndex}function S3(t,e){if(t.parent&&-1!==t.parent.injectorIndex)return t.parent.injectorIndex;let a=0,u=null,i=e;for(;null!==i;){if(u=ID(i),null===u)return C1;if(a++,i=i[ms],-1!==u.injectorIndex)return u.injectorIndex|a<<16}return C1}function $5(t,e,a){!function aw(t,e,a){let u;"string"==typeof a?u=a.charCodeAt(0)||0:a.hasOwnProperty(hm)&&(u=a[hm]),null==u&&(u=a[hm]=ew++);const i=u&SD,r=1<>zD)]|=r}(t,e,a)}function Vr(t,e,a){if(a&Ja.Optional||void 0!==t)return t;g5()}function LD(t,e,a,u){if(a&Ja.Optional&&void 0===u&&(u=null),!(a&(Ja.Self|Ja.Host))){const i=t[gi],r=En(void 0);try{return i?i.get(e,u,a&Ja.Optional):E5(e,u,a&Ja.Optional)}finally{En(r)}}return Vr(u,0,a)}function TD(t,e,a,u=Ja.Default,i){if(null!==t){if(2048&e[Qe]&&!(u&Ja.Self)){const o=function nw(t,e,a,u,i){let r=t,o=e;for(;null!==r&&null!==o&&2048&o[Qe]&&!(512&o[Qe]);){const d=Ud(r,o,a,u|Ja.Self,Pl);if(d!==Pl)return d;let h=r.parent;if(!h){const m=o[S5];if(m){const g=m.get(a,Pl,u);if(g!==Pl)return g}h=ID(o),o=o[ms]}r=h}return i}(t,e,a,u,Pl);if(o!==Pl)return o}const r=Ud(t,e,a,u,Pl);if(r!==Pl)return r}return LD(e,a,u,i)}function Ud(t,e,a,u,i){const r=function uw(t){if("string"==typeof t)return t.charCodeAt(0)||0;const e=t.hasOwnProperty(hm)?t[hm]:void 0;return"number"==typeof e?e>=0?e&SD:iw:e}(a);if("function"==typeof r){if(!xD(e,t,u))return u&Ja.Host?Vr(i,0,u):LD(e,a,u,i);try{let o;if(o=r(u),null!=o||u&Ja.Optional)return o;g5()}finally{CD()}}else if("number"==typeof r){let o=null,d=MD(t,e),h=C1,m=u&Ja.Host?e[xu][un]:null;for((-1===d||u&Ja.SkipSelf)&&(h=-1===d?S3(t,e):e[d+8],h!==C1&&ND(u,!1)?(o=e[Ee],d=jm(h),e=Tl(h,e)):d=-1);-1!==d;){const g=e[Ee];if(PD(r,d,g.data)){const v=tw(d,e,a,o,u,m);if(v!==Pl)return v}h=e[d+8],h!==C1&&ND(u,e[Ee].data[d+8]===m)&&PD(r,d,e)?(o=g,d=jm(h),e=Tl(h,e)):d=-1}}return i}function tw(t,e,a,u,i,r){const o=e[Ee],d=o.data[t+8],g=z3(d,o,a,null==u?B(d)&&J5:u!=o&&!!(3&d.type),i&Ja.Host&&r===d);return null!==g?_s(e,o,g,d):Pl}function z3(t,e,a,u,i){const r=t.providerIndexes,o=e.data,d=1048575&r,h=t.directiveStart,m=t.directiveEnd,g=r>>20,k=i?d+g:m;for(let x=u?d:d+g;x=h&&D.type===a)return x}if(i){const x=o[h];if(x&&_u(x)&&x.type===a)return h}return null}function _s(t,e,a,u){let i=t[a];const r=e.data;if(function $A(t){return t instanceof Om}(i)){const o=i;o.resolving&&function wd(t,e){throw e&&e.join(" > "),new Z(-200,t)}(Dt(r[a]));const d=y1(o.canSeeViewProviders);o.resolving=!0;const m=o.injectImpl?En(o.injectImpl):null;xD(t,u,Ja.Default);try{i=t[a]=o.factory(void 0,r,t,u),e.firstCreatePass&&a>=u.directiveStart&&function JA(t,e,a){const{ngOnChanges:u,ngOnInit:i,ngDoCheck:r}=e.type.prototype;if(u){const o=sD(e);(a.preOrderHooks??=[]).push(t,o),(a.preOrderCheckHooks??=[]).push(t,o)}i&&(a.preOrderHooks??=[]).push(0-t,i),r&&((a.preOrderHooks??=[]).push(t,r),(a.preOrderCheckHooks??=[]).push(t,r))}(a,r[a],e)}finally{null!==m&&En(m),y1(d),o.resolving=!1,CD()}}return i}function PD(t,e,a){const u=1<>zD)]&u)}function ND(t,e){return!(t&Ja.Self||t&Ja.Host&&e)}class zi{constructor(e,a){this._tNode=e,this._lView=a}get(e,a,u){return TD(this._tNode,this._lView,e,bu(u),a)}}function iw(){return new zi(St(),q())}function Au(t){return Zu(()=>{const e=t.prototype.constructor,a=e[Ba]||q5(e),u=Object.prototype;let i=Object.getPrototypeOf(t.prototype).constructor;for(;i&&i!==u;){const r=i[Ba]||q5(i);if(r&&r!==a)return r;i=Object.getPrototypeOf(i)}return r=>new r})}function q5(t){return Cl(t)?()=>{const e=q5(We(t));return e&&e()}:ns(t)}function ID(t){const e=t[Ee],a=e.type;return 2===a?e.declTNode:1===a?t[un]:null}function Zd(t){return function SP(t,e){if("class"===e)return t.classes;if("style"===e)return t.styles;const a=t.attrs;if(a){const u=a.length;let i=0;for(;i({attributeName:t,__NG_ELEMENT_ID__:()=>Zd(t)}));let RD=null;function M3(){return RD=RD||new x3}function L3(t){return $d(M3().parameters(t))}function $d(t){return t.map(e=>function ow(t){const e={token:null,attribute:null,host:!1,optional:!1,self:!1,skipSelf:!1};if(Array.isArray(t)&&t.length>0)for(let a=0;a(null===a&&(a=pi().compileInjectable(r0,`ng:///${t.name}/\u0275prov.js`,function HD(t,e){const a=e||{providedIn:null},u={name:t.name,type:t,typeArgumentCount:0,providedIn:a.providedIn};return(F1(a)||T3(a))&&void 0!==a.deps&&(u.deps=$d(a.deps)),F1(a)?u.useClass=a.useClass:function dw(t){return sw in t}(a)?u.useValue=a.useValue:T3(a)?u.useFactory=a.useFactory:function cw(t){return void 0!==t.useExisting}(a)&&(u.useExisting=a.useExisting),u}(t,e))),a)}),t.hasOwnProperty(Ba)||Object.defineProperty(t,Ba,{get:()=>{if(null===u){const i=pi();u=i.compileFactory(r0,`ng:///${t.name}/\u0275fac.js`,{name:t.name,type:t,typeArgumentCount:0,deps:L3(t),target:i.FactoryTarget.Injectable})}return u},configurable:!0})}const sw=wt({provide:String,useValue:wt});function F1(t){return void 0!==t.useClass}function T3(t){return void 0!==t.useFactory}const P3=Xc("Injectable",void 0,void 0,void 0,(t,e)=>lw(t,e));function VD(t,e=null,a=null,u){const i=Y5(t,e,a,u);return i.resolveInjectorInitializers(),i}function Y5(t,e=null,a=null,u,i=new Set){const r=[a||La,SA(t)];return u=u||("object"==typeof t?void 0:ou(t)),new Pd(r,e||b3(),u||null,i)}class su{static#e=this.THROW_IF_NOT_FOUND=t1;static#a=this.NULL=new Sd;static create(e,a){if(Array.isArray(e))return VD({name:""},a,e,"");{const u=e.name??"";return VD({name:u},e.parent,e.providers,u)}}static#t=this.\u0275prov=oe({token:su,providedIn:"any",factory:()=>ye(f5)});static#u=this.__NG_ELEMENT_ID__=-1}new he("").__NG_ELEMENT_ID__=t=>{const e=St();if(null===e)throw new Z(204,!1);if(2&e.type)return e.value;if(t&Ja.Optional)return null;throw new Z(204,!1)};const N3="ngOriginalError";function A1(t){return t[N3]}class Gm{static#e=this.__NG_ELEMENT_ID__=OD;static#a=this.__NG_ENV_ID__=e=>e}class mw extends Gm{constructor(e){super(),this._lView=e}onDestroy(e){return xs(this._lView,e),()=>E1(this._lView,e)}}function OD(){return new mw(q())}class na{constructor(){this.taskId=0,this.pendingTasks=new Set,this.hasPendingTasks=new Ye(!1)}get _hasPendingTasks(){return this.hasPendingTasks.value}add(){this._hasPendingTasks||this.hasPendingTasks.next(!0);const e=this.taskId++;return this.pendingTasks.add(e),e}remove(e){this.pendingTasks.delete(e),0===this.pendingTasks.size&&this._hasPendingTasks&&this.hasPendingTasks.next(!1)}ngOnDestroy(){this.pendingTasks.clear(),this._hasPendingTasks&&this.hasPendingTasks.next(!1)}static#e=this.\u0275prov=oe({token:na,providedIn:"root",factory:()=>new na})}class Q5{constructor(){this.internalPendingTasks=U(na)}add(){const e=this.internalPendingTasks.add();return()=>this.internalPendingTasks.remove(e)}static#e=this.\u0275prov=oe({token:Q5,providedIn:"root",factory:()=>new Q5})}const Ue=class X5 extends sa{constructor(e=!1){super(),this.destroyRef=void 0,this.pendingTasks=void 0,this.__isAsync=e,w5()&&(this.destroyRef=U(Gm,{optional:!0})??void 0,this.pendingTasks=U(na,{optional:!0})??void 0)}emit(e){const a=pe(null);try{super.next(e)}finally{pe(a)}}subscribe(e,a,u){let i=e,r=a||(()=>null),o=u;if(e&&"object"==typeof e){const h=e;i=h.next?.bind(h),r=h.error?.bind(h),o=h.complete?.bind(h)}this.__isAsync&&(r=this.wrapInTimeout(r),i&&(i=this.wrapInTimeout(i)),o&&(o=this.wrapInTimeout(o)));const d=super.subscribe({next:i,error:r,complete:o});return e instanceof wa&&e.add(d),d}wrapInTimeout(e){return a=>{const u=this.pendingTasks?.add();setTimeout(()=>{e(a),void 0!==u&&this.pendingTasks?.remove(u)})}}};function Km(...t){}function jD(t){let e,a;function u(){t=Km;try{void 0!==a&&"function"==typeof cancelAnimationFrame&&cancelAnimationFrame(a),void 0!==e&&clearTimeout(e)}catch{}}return e=setTimeout(()=>{t(),u()}),"function"==typeof requestAnimationFrame&&(a=requestAnimationFrame(()=>{t(),u()})),()=>u()}function GD(t){return queueMicrotask(()=>t()),()=>{t=Km}}class rt{constructor({enableLongStackTrace:e=!1,shouldCoalesceEventChangeDetection:a=!1,shouldCoalesceRunChangeDetection:u=!1}){if(this.hasPendingMacrotasks=!1,this.hasPendingMicrotasks=!1,this.isStable=!0,this.onUnstable=new Ue(!1),this.onMicrotaskEmpty=new Ue(!1),this.onStable=new Ue(!1),this.onError=new Ue(!1),typeof Zone>"u")throw new Z(908,!1);Zone.assertZonePatched();const i=this;i._nesting=0,i._outer=i._inner=Zone.current,Zone.TaskTrackingZoneSpec&&(i._inner=i._inner.fork(new Zone.TaskTrackingZoneSpec)),e&&Zone.longStackTraceZoneSpec&&(i._inner=i._inner.fork(Zone.longStackTraceZoneSpec)),i.shouldCoalesceEventChangeDetection=!u&&a,i.shouldCoalesceRunChangeDetection=u,i.callbackScheduled=!1,function ab(t){const e=()=>{!function gw(t){t.isCheckStableRunning||t.callbackScheduled||(t.callbackScheduled=!0,Zone.root.run(()=>{jD(()=>{t.callbackScheduled=!1,I3(t),t.isCheckStableRunning=!0,eb(t),t.isCheckStableRunning=!1})}),I3(t))}(t)};t._inner=t._inner.fork({name:"angular",properties:{isAngularZone:!0},onInvokeTask:(a,u,i,r,o,d)=>{if(function vw(t){return KD(t,"__ignore_ng_zone__")}(d))return a.invokeTask(i,r,o,d);try{return R3(t),a.invokeTask(i,r,o,d)}finally{(t.shouldCoalesceEventChangeDetection&&"eventTask"===r.type||t.shouldCoalesceRunChangeDetection)&&e(),Ew(t)}},onInvoke:(a,u,i,r,o,d,h)=>{try{return R3(t),a.invoke(i,r,o,d,h)}finally{t.shouldCoalesceRunChangeDetection&&!t.callbackScheduled&&!function bw(t){return KD(t,"__scheduler_tick__")}(d)&&e(),Ew(t)}},onHasTask:(a,u,i,r)=>{a.hasTask(i,r),u===i&&("microTask"==r.change?(t._hasPendingMicrotasks=r.microTask,I3(t),eb(t)):"macroTask"==r.change&&(t.hasPendingMacrotasks=r.macroTask))},onHandleError:(a,u,i,r)=>(a.handleError(i,r),t.runOutsideAngular(()=>t.onError.emit(r)),!1)})}(i)}static isInAngularZone(){return typeof Zone<"u"&&!0===Zone.current.get("isAngularZone")}static assertInAngularZone(){if(!rt.isInAngularZone())throw new Z(909,!1)}static assertNotInAngularZone(){if(rt.isInAngularZone())throw new Z(909,!1)}run(e,a,u){return this._inner.run(e,a,u)}runTask(e,a,u,i){const r=this._inner,o=r.scheduleEventTask("NgZoneEvent: "+i,e,pw,Km,Km);try{return r.runTask(o,a,u)}finally{r.cancelTask(o)}}runGuarded(e,a,u){return this._inner.runGuarded(e,a,u)}runOutsideAngular(e){return this._outer.run(e)}}const pw={};function eb(t){if(0==t._nesting&&!t.hasPendingMicrotasks&&!t.isStable)try{t._nesting++,t.onMicrotaskEmpty.emit(null)}finally{if(t._nesting--,!t.hasPendingMicrotasks)try{t.runOutsideAngular(()=>t.onStable.emit(null))}finally{t.isStable=!0}}}function I3(t){t._hasPendingMicrotasks||(t.shouldCoalesceEventChangeDetection||t.shouldCoalesceRunChangeDetection)&&!0===t.callbackScheduled?t.hasPendingMicrotasks=!0:t.hasPendingMicrotasks=!1}function R3(t){t._nesting++,t.isStable&&(t.isStable=!1,t.onUnstable.emit(null))}function Ew(t){t._nesting--,eb(t)}class Wm{constructor(){this.hasPendingMicrotasks=!1,this.hasPendingMacrotasks=!1,this.isStable=!0,this.onUnstable=new Ue,this.onMicrotaskEmpty=new Ue,this.onStable=new Ue,this.onError=new Ue}run(e,a,u){return e.apply(a,u)}runGuarded(e,a,u){return e.apply(a,u)}runOutsideAngular(e){return e()}runTask(e,a,u,i){return e.apply(a,u)}}function KD(t,e){return!(!Array.isArray(t)||1!==t.length)&&!0===t[0]?.data?.[e]}class Uo{constructor(){this._console=console}handleError(e){const a=this._findOriginalError(e);this._console.error("ERROR",e),a&&this._console.error("ORIGINAL ERROR",a)}_findOriginalError(e){let a=e&&A1(e);for(;a&&A1(a);)a=A1(a);return a||null}}const xw=new he("",{providedIn:"root",factory:()=>{const t=U(rt),e=U(Uo);return a=>t.runOutsideAngular(()=>e.handleError(a))}});class tb{constructor(){this.destroyed=!1,this.listeners=null,this.errorHandler=U(Uo,{optional:!0}),this.destroyRef=U(Gm),this.destroyRef.onDestroy(()=>{this.destroyed=!0,this.listeners=null})}subscribe(e){if(this.destroyed)throw new Z(953,!1);return(this.listeners??=[]).push(e),{unsubscribe:()=>{const a=this.listeners?.indexOf(e);void 0!==a&&-1!==a&&this.listeners?.splice(a,1)}}}emit(e){if(this.destroyed)throw new Z(953,!1);if(null===this.listeners)return;const a=pe(null);try{for(const u of this.listeners)try{u(e)}catch(i){this.errorHandler?.handleError(i)}}finally{pe(a)}}}function WD(t,e){return Dl(t,e)}WD.required=function fw(t){return Dl(Yc,t)};function w1(){return Nl(St(),q())}function Nl(t,e){return new Rt(Dn(t,e))}class Rt{constructor(e){this.nativeElement=e}static#e=this.__NG_ELEMENT_ID__=w1}function Zm(t){return t instanceof Rt?t.nativeElement:t}function ko(){return this._results[Symbol.iterator]()}class Fs{static#e=Symbol.iterator;get changes(){return this._changes??=new Ue}constructor(e=!1){this._emitDistinctChangesOnly=e,this.dirty=!0,this._onDirty=void 0,this._results=[],this._changesDetected=!1,this._changes=void 0,this.length=0,this.first=void 0,this.last=void 0;const a=Fs.prototype;a[Symbol.iterator]||(a[Symbol.iterator]=ko)}get(e){return this._results[e]}map(e){return this._results.map(e)}filter(e){return this._results.filter(e)}find(e){return this._results.find(e)}reduce(e,a){return this._results.reduce(e,a)}forEach(e){this._results.forEach(e)}some(e){return this._results.some(e)}toArray(){return this._results.slice()}toString(){return this._results.toString()}reset(e,a){this.dirty=!1;const u=Yn(e);(this._changesDetected=!function an(t,e,a){if(t.length!==e.length)return!1;for(let u=0;ul6}),l6="ng",s6=new he(""),yn=new he("",{providedIn:"platform",factory:()=>"unknown"}),Wi=(new he(""),new he(""),new he("",{providedIn:"root",factory:()=>g0().body?.querySelector("[ngCspNonce]")?.getAttribute("ngCspNonce")||null})),S1={breakpoints:[16,32,48,64,96,128,256,384,640,750,828,1080,1200,1920,2048,3840],placeholderResolution:30,disableImageSizeWarning:!1,disableImageLazyLoadWarning:!1},hb=new he("",{providedIn:"root",factory:()=>S1});function h6(){const t=new Xd;return"browser"===U(yn)&&(t.store=function m6(t,e){const a=t.getElementById(e+"-state");if(a?.textContent)try{return JSON.parse(a.textContent)}catch(u){console.warn("Exception while restoring TransferState for app "+e,u)}return{}}(g0(),U(B1))),t}class Xd{constructor(){this.store={},this.onSerializeCallbacks={}}static#e=this.\u0275prov=oe({token:Xd,providedIn:"root",factory:h6});get(e,a){return void 0!==this.store[e]?this.store[e]:a}set(e,a){this.store[e]=a}remove(e){delete this.store[e]}hasKey(e){return this.store.hasOwnProperty(e)}get isEmpty(){return 0===Object.keys(this.store).length}onSerialize(e,a){this.onSerializeCallbacks[e]=a}toJson(){for(const e in this.onSerializeCallbacks)if(this.onSerializeCallbacks.hasOwnProperty(e))try{this.store[e]=this.onSerializeCallbacks[e]()}catch(a){console.warn("Exception in onSerialize callback: ",a)}return JSON.stringify(this.store).replace(/null;function xb(t,e,a=!1){return p6(t,e,a)}var ec;!function(t){t.Hydrated="hydrated",t.Skipped="skipped",t.Mismatched="mismatched"}(ec||(ec={}));new he("");const Cb=new he("",{providedIn:"root",factory:()=>false});new he(""),new he(""),new he("");let $3,q3;function _b(){if(void 0===$3&&($3=null,qt.trustedTypes))try{$3=qt.trustedTypes.createPolicy("angular",{createHTML:t=>t,createScript:t=>t,createScriptURL:t=>t})}catch{}return $3}function L1(t){return _b()?.createHTML(t)||t}function Fb(){if(void 0===q3&&(q3=null,qt.trustedTypes))try{q3=qt.trustedTypes.createPolicy("angular#unsafe-bypass",{createHTML:t=>t,createScript:t=>t,createScriptURL:t=>t})}catch{}return q3}function F6(t){return Fb()?.createHTML(t)||t}function A6(t){return Fb()?.createScript(t)||t}function Ab(t){return Fb()?.createScriptURL(t)||t}class ac{constructor(e){this.changingThisBreaksApplicationSecurity=e}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see ${Ho})`}}class w6 extends ac{getTypeName(){return"HTML"}}class B6 extends ac{getTypeName(){return"Style"}}class Y3 extends ac{getTypeName(){return"Script"}}class Hw extends ac{getTypeName(){return"URL"}}class Vw extends ac{getTypeName(){return"ResourceURL"}}function rr(t){return t instanceof ac?t.changingThisBreaksApplicationSecurity:t}function Rl(t,e){const a=function Ow(t){return t instanceof ac&&t.getTypeName()||null}(t);if(null!=a&&a!==e){if("ResourceURL"===a&&"URL"===e)return!0;throw new Error(`Required a safe ${e}, got a ${a} (see ${Ho})`)}return a===e}function z6(t){const e=new Uw(t);return function Jw(){try{return!!(new window.DOMParser).parseFromString(L1(""),"text/html")}catch{return!1}}()?new Ww(e):e}class Ww{constructor(e){this.inertDocumentHelper=e}getInertBodyElement(e){e=""+e;try{const a=(new window.DOMParser).parseFromString(L1(e),"text/html").body;return null===a?this.inertDocumentHelper.getInertBodyElement(e):(a.removeChild(a.firstChild),a)}catch{return null}}}class Uw{constructor(e){this.defaultDoc=e,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert")}getInertBodyElement(e){const a=this.inertDocument.createElement("template");return a.innerHTML=L1(e),a}}const Zw=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:\/?#]*(?:[\/?#]|$))/i;function Q3(t){return(t=String(t)).match(Zw)?t:"unsafe:"+t}function v0(t){const e={};for(const a of t.split(","))e[a]=!0;return e}function n4(...t){const e={};for(const a of t)for(const u in a)a.hasOwnProperty(u)&&(e[u]=!0);return e}const r4=v0("area,br,col,hr,img,wbr"),M6=v0("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),L6=v0("rp,rt"),$w=n4(L6,M6),qw=n4(M6,v0("address,article,aside,blockquote,caption,center,del,details,dialog,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,main,map,menu,nav,ol,pre,section,summary,table,ul")),Yw=n4(L6,v0("a,abbr,acronym,audio,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,picture,q,ruby,rp,rt,s,samp,small,source,span,strike,strong,sub,sup,time,track,tt,u,var,video")),Bb=n4(r4,qw,Yw,$w),Sb=v0("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),Qw=v0("abbr,accesskey,align,alt,autoplay,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,controls,coords,datetime,default,dir,download,face,headers,height,hidden,hreflang,hspace,ismap,itemscope,itemprop,kind,label,lang,language,loop,media,muted,nohref,nowrap,open,preload,rel,rev,role,rows,rowspan,rules,scope,scrolling,shape,size,sizes,span,srclang,srcset,start,summary,tabindex,target,title,translate,type,usemap,valign,value,vspace,width"),T6=v0("aria-activedescendant,aria-atomic,aria-autocomplete,aria-busy,aria-checked,aria-colcount,aria-colindex,aria-colspan,aria-controls,aria-current,aria-describedby,aria-details,aria-disabled,aria-dropeffect,aria-errormessage,aria-expanded,aria-flowto,aria-grabbed,aria-haspopup,aria-hidden,aria-invalid,aria-keyshortcuts,aria-label,aria-labelledby,aria-level,aria-live,aria-modal,aria-multiline,aria-multiselectable,aria-orientation,aria-owns,aria-placeholder,aria-posinset,aria-pressed,aria-readonly,aria-relevant,aria-required,aria-roledescription,aria-rowcount,aria-rowindex,aria-rowspan,aria-selected,aria-setsize,aria-sort,aria-valuemax,aria-valuemin,aria-valuenow,aria-valuetext"),P6=n4(Sb,Qw,T6),Xw=v0("script,style,template");class e8{constructor(){this.sanitizedSomething=!1,this.buf=[]}sanitizeChildren(e){let a=e.firstChild,u=!0,i=[];for(;a;)if(a.nodeType===Node.ELEMENT_NODE?u=this.startElement(a):a.nodeType===Node.TEXT_NODE?this.chars(a.nodeValue):this.sanitizedSomething=!0,u&&a.firstChild)i.push(a),a=u8(a);else for(;a;){a.nodeType===Node.ELEMENT_NODE&&this.endElement(a);let r=t8(a);if(r){a=r;break}a=i.pop()}return this.buf.join("")}startElement(e){const a=N6(e).toLowerCase();if(!Bb.hasOwnProperty(a))return this.sanitizedSomething=!0,!Xw.hasOwnProperty(a);this.buf.push("<"),this.buf.push(a);const u=e.attributes;for(let i=0;i"),!0}endElement(e){const a=N6(e).toLowerCase();Bb.hasOwnProperty(a)&&!r4.hasOwnProperty(a)&&(this.buf.push(""))}chars(e){this.buf.push(R6(e))}}function t8(t){const e=t.nextSibling;if(e&&t!==e.previousSibling)throw I6(e);return e}function u8(t){const e=t.firstChild;if(e&&function a8(t,e){return(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_CONTAINED_BY)!==Node.DOCUMENT_POSITION_CONTAINED_BY}(t,e))throw I6(e);return e}function N6(t){const e=t.nodeName;return"string"==typeof e?e:"FORM"}function I6(t){return new Error(`Failed to sanitize html because the element is clobbered: ${t.outerHTML}`)}const i8=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,n8=/([^\#-~ |!])/g;function R6(t){return t.replace(/&/g,"&").replace(i8,function(e){return"&#"+(1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320)+65536)+";"}).replace(n8,function(e){return"&#"+e.charCodeAt(0)+";"}).replace(//g,">")}let X3;function H6(t,e){let a=null;try{X3=X3||z6(t);let u=e?String(e):"";a=X3.getInertBodyElement(u);let i=5,r=u;do{if(0===i)throw new Error("Failed to sanitize html because the input is unstable");i--,u=r,r=a.innerHTML,a=X3.getInertBodyElement(u)}while(u!==r);return L1((new e8).sanitizeChildren(zb(a)||a))}finally{if(a){const u=zb(a)||a;for(;u.firstChild;)u.removeChild(u.firstChild)}}}function zb(t){return"content"in t&&function r8(t){return t.nodeType===Node.ELEMENT_NODE&&"TEMPLATE"===t.nodeName}(t)?t.content:null}var Or;function V6(t){const e=o4();return e?e.sanitize(Or.URL,t)||"":Rl(t,"URL")?rr(t):Q3(Ca(t))}function O6(t){const e=o4();if(e)return Ab(e.sanitize(Or.RESOURCE_URL,t)||"");if(Rl(t,"ResourceURL"))return Ab(rr(t));throw new Z(904,!1)}function j6(t,e,a){return function h8(t,e){return"src"===e&&("embed"===t||"frame"===t||"iframe"===t||"media"===t||"script"===t)||"href"===e&&("base"===t||"link"===t)?O6:V6}(e,a)(t)}function o4(){const t=q();return t&&t[wl].sanitizer}!function(t){t[t.NONE=0]="NONE",t[t.HTML=1]="HTML",t[t.STYLE=2]="STYLE",t[t.SCRIPT=3]="SCRIPT",t[t.URL=4]="URL",t[t.RESOURCE_URL=5]="RESOURCE_URL"}(Or||(Or={}));const m8=/^>|^->||--!>|)/g,g8="\u200b$1\u200b";function G6(t){return t.replace(m8,e=>e.replace(p8,g8))}function Z6(t){return t.ownerDocument.body}function jr(t){return t instanceof Function?t():t}function Hn(t){return"browser"===(t??U(su)).get(yn)}var k0;let Nb;function Ib(t,e){return Nb(t,e)}function ws(t,e,a,u,i){if(null!=u){let r,o=!1;fn(u)?r=u:wi(u)&&(o=!0,u=u[ku]);const d=kt(u);0===t&&null!==a?null==i?X6(e,a,d):Bs(e,a,d,i||null,!0):1===t&&null!==a?Bs(e,a,d,i||null,!0):2===t?d4(e,d,o):3===t&&e.destroyNode(d),null!=r&&function z8(t,e,a,u,i){const r=a[Bl],o=kt(a);r!==o&&ws(e,t,u,r,i);for(let d=qu;d0&&(t[a-1][ho]=u[ho]);const r=bm(t,qu+e);!function $6(t,e){eg(t,e),e[ku]=null,e[un]=null}(u[Ee],u);const o=r[l0];null!==o&&o.detachView(r[Ee]),u[Qt]=null,u[ho]=null,u[Qe]&=-129}return u}function ag(t,e){if(!(256&e[Qe])){const a=e[ga];a.destroyNode&&P1(t,e,a,3,null,null),function Ob(t){let e=t[zm];if(!e)return s4(t[Ee],t);for(;e;){let a=null;if(wi(e))a=e[zm];else{const u=e[qu];u&&(a=u)}if(!a){for(;e&&!e[ho]&&e!==t;)wi(e)&&s4(e[Ee],e),e=e[Qt];null===e&&(e=t),wi(e)&&s4(e[Ee],e),a=e&&e[ho]}e=a}}(e)}}function s4(t,e){if(256&e[Qe])return;const a=pe(null);try{e[Qe]&=-129,e[Qe]|=256,e[mo]&&li(e[mo]),function w8(t,e){let a;if(null!=t&&null!=(a=t.destroyHooks))for(let u=0;u=0?u[o]():u[-o].unsubscribe(),r+=2}else{const o=u[a[r+1]];a[r].call(o)}null!==u&&(e[d1]=null);const i=e[s0];if(null!==i){e[s0]=null;for(let r=0;r-1){const{encapsulation:r}=t.data[u.directiveStart+i];if(r===Ga.None||r===Ga.Emulated)return null}return Dn(u,a)}}function Bs(t,e,a,u,i){t.insertBefore(e,a,u,i)}function X6(t,e,a){t.appendChild(e,a)}function eC(t,e,a,u,i){null!==u?Bs(t,e,a,u,i):X6(t,e,a)}function tg(t,e){return t.parentNode(e)}function ug(t,e,a){return aC(t,e,a)}function Kb(t,e,a){return 40&t.type?Dn(t,a):null}!function(t){t[t.Important=1]="Important",t[t.DashCase=2]="DashCase"}(k0||(k0={}));let Wb,aC=Kb;function tC(t,e){aC=t,Wb=e}function ig(t,e,a,u){const i=Gb(t,u,e),r=e[ga],d=ug(u.parent||e[un],u,e);if(null!=i)if(Array.isArray(a))for(let h=0;hGe&&rC(t,e,Ge,!1),Sl(o?2:0,i),a(u,i)}finally{Ds(r),Sl(o?3:1,i)}}function sg(t,e,a){if(z5(e)){const u=pe(null);try{const i=e.directiveStart,r=e.directiveEnd;for(let o=i;onull;function hC(t,e,a,u,i){for(let r in e){if(!e.hasOwnProperty(r))continue;const o=e[r];if(void 0===o)continue;u??={};let d,h=bn.None;Array.isArray(o)?(d=o[0],h=o[1]):d=o;let m=r;if(null!==i){if(!i.hasOwnProperty(r))continue;m=i[r]}0===t?$b(u,a,m,d,h):$b(u,a,m,d)}return u}function $b(t,e,a,u,i){let r;t.hasOwnProperty(a)?(r=t[a]).push(e,u):r=t[a]=[e,u],void 0!==i&&r.push(i)}function or(t,e,a,u,i,r,o,d){const h=Dn(e,a);let g,m=e.inputs;!d&&null!=m&&(g=m[u])?(Eg(t,a,g,u,i),B(e)&&function cg(t,e){const a=ar(e,t);16&a[Qe]||(a[Qe]|=64)}(a,e.index)):3&e.type?(u=function V8(t){return"class"===t?"className":"for"===t?"htmlFor":"formaction"===t?"formAction":"innerHtml"===t?"innerHTML":"readonly"===t?"readOnly":"tabindex"===t?"tabIndex":t}(u),i=null!=o?o(i,e.value||"",u):i,r.setProperty(h,u,i)):e.type}function qb(t,e,a,u){if(jd()){const i=null===u?null:{"":-1},r=function C0(t,e){const a=t.directiveRegistry;let u=null,i=null;if(a)for(let r=0;r0;){const a=t[--e];if("number"==typeof a&&a<0)return a}return 0})(o)!=d&&o.push(d),o.push(a,u,r)}}(t,e,u,zs(t,a,i.hostVars,Fa),i)}function Zo(t,e,a,u,i,r){const o=Dn(t,e);ak(e[ga],o,r,t.value,a,u,i)}function ak(t,e,a,u,i,r,o){if(null==r)t.removeAttribute(e,i,a);else{const d=null==o?Ca(r):o(r,u||"",i);t.setAttribute(e,i,d,a)}}function on(t,e,a,u,i,r){const o=r[e];if(null!==o)for(let d=0;d0&&(a[i-1][ho]=e),u{ks(t.lView)},consumerOnSignalRead(){this.lView[mo]=this}};const XP={...Wu,consumerIsAlwaysLive:!0,consumerMarkedDirty:t=>{let e=Rr(t.lView);for(;e&&!vg(e[Ee]);)e=Rr(e);e&&g1(e)},consumerOnSignalRead(){this.lView[mo]=this}};function vg(t){return 2!==t.type}const ok=100;function $o(t,e=!0,a=0){const u=t[wl],i=u.rendererFactory;i.begin?.();try{!function Y8(t,e){const a=Im();try{vD(!0),lk(t,e);let u=0;for(;zl(t);){if(u===ok)throw new Z(103,!1);u++,lk(t,1)}}finally{vD(a)}}(t,a)}catch(o){throw e&&m4(t,o),o}finally{i.end?.(),u.inlineEffectRunner?.flush()}}function Q8(t,e,a,u){const i=e[Qe];if(!(256&~i))return;e[wl].inlineEffectRunner?.flush(),f1(e);let d=!0,h=null,m=null;vg(t)?(m=J8(e),h=Cr(m)):null===wn()?(d=!1,m=function q8(t){const e=t[mo]??Object.create(XP);return e.lView=t,e}(e),h=Cr(m)):e[mo]&&(li(e[mo]),e[mo]=null);try{Ki(e),bD(t.bindingStartIndex),null!==a&&dC(t,e,a,2,u);const g=!(3&~i);if(g){const x=t.preOrderCheckHooks;null!==x&&w3(e,x,null)}else{const x=t.preOrderHooks;null!==x&&D1(e,x,0,null),G5(e,0)}if(function X8(t){for(let e=XD(t);null!==e;e=e6(e)){if(!(e[Qe]&Lm.HasTransplantedViews))continue;const a=e[h1];for(let u=0;u-1&&(l4(e,u),bm(a,u))}this._attachedToViewContainer=!1}ag(this._lView[Ee],this._lView)}onDestroy(e){xs(this._lView,e)}markForCheck(){p4(this._cdRefInjectingView||this._lView,4)}detach(){this._lView[Qe]&=-129}reattach(){Eo(this._lView),this._lView[Qe]|=128}detectChanges(){this._lView[Qe]|=1024,$o(this._lView,this.notifyErrorHandler)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new Z(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null;const e=Fu(this._lView),a=this._lView[o0];null!==a&&!e&&jb(a,this._lView),eg(this._lView[Ee],this._lView)}attachToAppRef(e){if(this._attachedToViewContainer)throw new Z(902,!1);this._appRef=e;const a=Fu(this._lView),u=this._lView[o0];null!==u&&!a&&uc(u,this._lView),Eo(this._lView)}}class st{static#e=this.__NG_ELEMENT_ID__=tB}const lr=st,aB=class extends lr{constructor(e,a,u){super(),this._declarationLView=e,this._declarationTContainer=a,this.elementRef=u}get ssrId(){return this._declarationTContainer.tView?.ssrId||null}createEmbeddedView(e,a){return this.createEmbeddedViewImpl(e,a)}createEmbeddedViewImpl(e,a,u){const i=nc(this._declarationLView,this._declarationTContainer,e,{embeddedViewInjector:a,dehydratedView:u});return new g4(i)}};function tB(){return bg(St(),q())}function bg(t,e){return 4&t.type?new aB(e,t,Nl(t,e)):null}function _n(t,e,a){const u=e.insertBeforeIndex,i=Array.isArray(u)?u[0]:u;return null===i?Kb(t,0,a):kt(a[i])}function mk(t,e,a,u,i){const r=e.insertBeforeIndex;if(Array.isArray(r)){let o=u,d=null;if(3&e.type||(d=o,o=i),null!==o&&-1===e.componentOffset)for(let h=1;h1)for(let a=t.length-2;a>=0;a--){const u=t[a];gk(u)||sB(u,e)&&null===zC(u)&&dB(u,e.index)}}function gk(t){return!(64&t.type)}function sB(t,e){return gk(e)||t.index>e.index}function zC(t){const e=t.insertBeforeIndex;return Array.isArray(e)?e[0]:e}function dB(t,e){const a=t.insertBeforeIndex;Array.isArray(a)?a[0]=e:(tC(_n,mk),t.insertBeforeIndex=e)}function k4(t,e){const a=t.data[e];return null===a||"string"==typeof a?null:a.hasOwnProperty("currentCaseLViewIndex")?a:a.value}function mB(t,e,a){const u=lg(t,a,64,null,null);return pk(e,u),u}function kg(t,e){const a=e[t.currentCaseLViewIndex];return null===a?a:a<0?~a:a}function xg(t){return t>>>17}function R1(t){return(131070&t)>>>1}function MC(t){return-1===t}function fg(t,e,a){t.index=0;const u=kg(e,a);t.removes=null!==u?e.remove[u]:La}function Dg(t){if(t.index0)return t.lView[e];{t.stack.push(t.index,t.removes);const a=~e;return fg(t,t.lView[Ee].data[a],t.lView),Dg(t)}}return 0===t.stack.length?null:(t.removes=t.stack.pop(),t.index=t.stack.pop(),Dg(t))}function gB(){const t={stack:[],index:-1};return function e(a,u){for(t.lView=u;t.stack.length;)t.stack.pop();return fg(t,a.value,u),Dg.bind(null,t)}}new RegExp(`^(\\d+)*(${pb}|${mb})*(.*)`);let HC=()=>{};let Ag=()=>{};let $C=()=>null;function sc(t,e){return $C(t,e)}class Hl{}const dc=new he("",{providedIn:"root",factory:()=>!1}),qC=(new he("",{providedIn:"root",factory:()=>!1}),new he(""));class SB{}class Ck{}const yk="ngComponent";class YC{resolveComponentFactory(e){throw function zB(t){const e=Error(`No component factory found for ${ou(t)}.`);return e[yk]=t,e}(e)}}class y4{static#e=this.NULL=new YC}class Sg{}class Vn{constructor(){this.destroyNode=null}static#e=this.__NG_ELEMENT_ID__=()=>function QC(){const t=q(),a=ar(St().index,t);return(wi(a)?a:t)[ga]}()}class _k{static#e=this.\u0275prov=oe({token:_k,providedIn:"root",factory:()=>null})}const XC=new Set;function Ui(t){XC.has(t)||(XC.add(t),performance?.mark?.("mark_feature_usage",{detail:{feature:t}}))}var Fn;!function(t){t[t.EarlyRead=0]="EarlyRead",t[t.Write=1]="Write",t[t.MixedReadWrite=2]="MixedReadWrite",t[t.Read=3]="Read"}(Fn||(Fn={}));const ey={destroy(){}};function zg(t,e){const a=e?.injector??U(su);(e?.runOnServer||Hn(a))&&a.get(Ps).internalCallbacks.push(t)}function Fk(t,e){!e&&k3();const a=e?.injector??U(su);return Hn(a)?(Ui("NgAfterNextRender"),ty(t,a,!0,e?.phase??Fn.MixedReadWrite)):ey}function ty(t,e,a,u){const i=function ay(t,e){if(t instanceof Function)switch(e){case Fn.EarlyRead:return{earlyRead:t};case Fn.Write:return{write:t};case Fn.MixedReadWrite:return{mixedReadWrite:t};case Fn.Read:return{read:t}}return t}(t,u),r=e.get(Ps),o=r.handler??=new iy,d=[],h=[],m=()=>{for(const x of h)o.unregister(x);g()},g=e.get(Gm).onDestroy(m);let v=0;const k=(x,D)=>{if(!D)return;const C=a?(...A)=>(v--,v<1&&m(),D(...A)):D,F=Pr(e,()=>new uy(x,d,C));o.register(F),h.push(F),v++};return k(Fn.EarlyRead,i.earlyRead),k(Fn.Write,i.write),k(Fn.MixedReadWrite,i.mixedReadWrite),k(Fn.Read,i.read),{destroy:m}}class uy{constructor(e,a,u){this.phase=e,this.pipelinedArgs=a,this.callbackFn=u,this.zone=U(rt),this.errorHandler=U(Uo,{optional:!0}),U(Hl,{optional:!0})?.notify(6)}invoke(){try{const e=this.zone.runOutsideAngular(()=>this.callbackFn.apply(null,this.pipelinedArgs));this.pipelinedArgs.splice(0,this.pipelinedArgs.length,e)}catch(e){this.errorHandler?.handleError(e)}}}class iy{constructor(){this.executingCallbacks=!1,this.buckets={[Fn.EarlyRead]:new Set,[Fn.Write]:new Set,[Fn.MixedReadWrite]:new Set,[Fn.Read]:new Set},this.deferredCallbacks=new Set}register(e){(this.executingCallbacks?this.deferredCallbacks:this.buckets[e.phase]).add(e)}unregister(e){this.buckets[e.phase].delete(e),this.deferredCallbacks.delete(e)}execute(){this.executingCallbacks=!0;for(const e of Object.values(this.buckets))for(const a of e)a.invoke();this.executingCallbacks=!1;for(const e of this.deferredCallbacks)this.buckets[e.phase].add(e);this.deferredCallbacks.clear()}destroy(){for(const e of Object.values(this.buckets))e.clear();this.deferredCallbacks.clear()}}class Ps{constructor(){this.handler=null,this.internalCallbacks=[]}execute(){this.executeInternalCallbacks(),this.handler?.execute()}executeInternalCallbacks(){const e=[...this.internalCallbacks];this.internalCallbacks.length=0;for(const a of e)a()}ngOnDestroy(){this.handler?.destroy(),this.handler=null,this.internalCallbacks.length=0}static#e=this.\u0275prov=oe({token:Ps,providedIn:"root",factory:()=>new Ps})}function Ak(t){return void 0!==t.ngModule}function Ns(t){return!!Nn(t)}function Mg(t){return!!Mt(t)}function ny(t){return!!mi(t)}function _4(t){return!!pa(t)}function TB(t,e){if(Cl(t)&&!(t=We(t)))throw new Error(`Expected forwardRef function, imported from "${Dt(e)}", to return a standalone entity or NgModule but got "${Dt(t)||t}".`);if(null==Nn(t)){const a=pa(t)||mi(t)||Mt(t);if(null==a)throw Ak(t)?new Error(`A module with providers was imported from "${Dt(e)}". Modules with providers are not supported in standalone components imports.`):new Error(`The "${Dt(t)}" type, imported from "${Dt(e)}", must be a standalone component / directive / pipe or an NgModule. Did you forget to add the required @Component / @Directive / @Pipe or @NgModule annotation?`);if(!a.standalone)throw new Error(`The "${Dt(t)}" ${function LB(t){return pa(t)?"component":mi(t)?"directive":Mt(t)?"pipe":"type"}(t)}, imported from "${Dt(e)}", is not standalone. Did you forget to add the standalone: true flag?`)}}const wk=!0;class ry{constructor(){this.ownerNgModule=new Map,this.ngModulesWithSomeUnresolvedDecls=new Set,this.ngModulesScopeCache=new Map,this.standaloneComponentsScopeCache=new Map}resolveNgModulesDecls(){if(0!==this.ngModulesWithSomeUnresolvedDecls.size){for(const e of this.ngModulesWithSomeUnresolvedDecls){const a=Nn(e);if(a?.declarations)for(const u of jr(a.declarations))_4(u)&&this.ownerNgModule.set(u,e)}this.ngModulesWithSomeUnresolvedDecls.clear()}}getComponentDependencies(e,a){this.resolveNgModulesDecls();const u=pa(e);if(null===u)throw new Error(`Attempting to get component dependencies for a type that is not a component: ${e}`);if(u.standalone){const i=this.getStandaloneComponentScope(e,a);return i.compilation.isPoisoned?{dependencies:[]}:{dependencies:[...i.compilation.directives,...i.compilation.pipes,...i.compilation.ngModules]}}{if(!this.ownerNgModule.has(e))return{dependencies:[]};const i=this.getNgModuleScope(this.ownerNgModule.get(e));return i.compilation.isPoisoned?{dependencies:[]}:{dependencies:[...i.compilation.directives,...i.compilation.pipes]}}}registerNgModule(e,a){if(!Ns(e))throw new Error(`Attempting to register a Type which is not NgModule as NgModule: ${e}`);this.ngModulesWithSomeUnresolvedDecls.add(e)}clearScopeCacheFor(e){this.ngModulesScopeCache.delete(e),this.standaloneComponentsScopeCache.delete(e)}getNgModuleScope(e){if(this.ngModulesScopeCache.has(e))return this.ngModulesScopeCache.get(e);const a=this.computeNgModuleScope(e);return this.ngModulesScopeCache.set(e,a),a}computeNgModuleScope(e){const a=Nn(e,!0),u={exported:{directives:new Set,pipes:new Set},compilation:{directives:new Set,pipes:new Set}};for(const i of jr(a.imports))if(Ns(i)){const r=this.getNgModuleScope(i);Vl(r.exported.directives,u.compilation.directives),Vl(r.exported.pipes,u.compilation.pipes)}else{if(!u0(i)){u.compilation.isPoisoned=!0;break}if(ny(i)||_4(i))u.compilation.directives.add(i);else{if(!Mg(i))throw new Z(1e3,"The standalone imported type is neither a component nor a directive nor a pipe");u.compilation.pipes.add(i)}}if(!u.compilation.isPoisoned)for(const i of jr(a.declarations)){if(Ns(i)||u0(i)){u.compilation.isPoisoned=!0;break}Mg(i)?u.compilation.pipes.add(i):u.compilation.directives.add(i)}for(const i of jr(a.exports))if(Ns(i)){const r=this.getNgModuleScope(i);Vl(r.exported.directives,u.exported.directives),Vl(r.exported.pipes,u.exported.pipes),Vl(r.exported.directives,u.compilation.directives),Vl(r.exported.pipes,u.compilation.pipes)}else Mg(i)?u.exported.pipes.add(i):u.exported.directives.add(i);return u}getStandaloneComponentScope(e,a){if(this.standaloneComponentsScopeCache.has(e))return this.standaloneComponentsScopeCache.get(e);const u=this.computeStandaloneComponentScope(e,a);return this.standaloneComponentsScopeCache.set(e,u),u}computeStandaloneComponentScope(e,a){const u={compilation:{directives:new Set([e]),pipes:new Set,ngModules:new Set}};for(const i of Yn(a??[])){const r=We(i);try{TB(r,e)}catch{return u.compilation.isPoisoned=!0,u}if(Ns(r)){u.compilation.ngModules.add(r);const o=this.getNgModuleScope(r);if(o.exported.isPoisoned)return u.compilation.isPoisoned=!0,u;Vl(o.exported.directives,u.compilation.directives),Vl(o.exported.pipes,u.compilation.pipes)}else if(Mg(r))u.compilation.pipes.add(r);else{if(!ny(r)&&!_4(r))return u.compilation.isPoisoned=!0,u;u.compilation.directives.add(r)}}return u}isOrphanComponent(e){const a=pa(e);return!(!a||a.standalone)&&(this.resolveNgModulesDecls(),!this.ownerNgModule.has(e))}}function Vl(t,e){for(const a of t)e.add(a)}const j1=new ry;function Lg(t,e,a){let u=a?t.styles:null,i=a?t.classes:null,r=0;if(null!==e)for(let o=0;o0&&Jb(t,a,r.join(" "))}}(x,G,C,u),void 0!==a&&function VB(t,e,a){const u=t.projection=[];for(let i=0;i0;)this.remove(this.length-1)}get(e){const a=hy(this._lContainer);return null!==a&&a[e]||null}get length(){return this._lContainer.length-qu}createEmbeddedView(e,a,u){let i,r;"number"==typeof u?i=u:null!=u&&(i=u.index,r=u.injector);const o=sc(this._lContainer,e.ssrId),d=e.createEmbeddedViewImpl(a||{},r,o);return this.insertImpl(d,i,rc(this._hostTNode,o)),d}createComponent(e,a,u,i,r){const o=e&&!Bm(e);let d;if(o)d=a;else{const D=a||{};d=D.index,u=D.injector,i=D.projectableNodes,r=D.environmentInjector||D.ngModuleRef}const h=o?e:new F4(pa(e)),m=u||this.parentInjector;if(!r&&null==h.ngModule){const C=(o?m:this.parentInjector).get(tn,null);C&&(r=C)}const g=pa(h.componentType??{}),v=sc(this._lContainer,g?.id??null),k=v?.firstChild??null,x=h.create(m,i,k,r);return this.insertImpl(x.hostView,d,rc(this._hostTNode,v)),x}insert(e,a){return this.insertImpl(e,a,!0)}insertImpl(e,a,u){const i=e._lView;if(function go(t){return fn(t[Qt])}(i)){const d=this.indexOf(e);if(-1!==d)this.detach(d);else{const h=i[Qt],m=new cy(h,h[un],h[Qt]);m.detach(m.indexOf(e))}}const r=this._adjustIndex(a),o=this._lContainer;return oc(o,i,r,u),e.attachToViewContainerRef(),os(Bk(o),r,e),e}move(e,a){return this.insert(e,a)}indexOf(e){const a=hy(this._lContainer);return null!==a?a.indexOf(e):-1}remove(e){const a=this._adjustIndex(e,-1),u=l4(this._lContainer,a);u&&(bm(Bk(this._lContainer),a),ag(u[Ee],u))}detach(e){const a=this._adjustIndex(e,-1),u=l4(this._lContainer,a);return u&&null!=bm(Bk(this._lContainer),a)?new g4(u):null}_adjustIndex(e,a=0){return e??this.length+a}};function hy(t){return t[8]}function Bk(t){return t[8]||(t[8]=[])}function Sk(t,e){let a;const u=e[t.index];return fn(u)?a=u:(a=h4(u,e,null,t),e[t.index]=a,pg(e,a)),my(a,e,t,u),new cy(a,t,e)}let my=py,zk=()=>!1;function cc(t,e,a){return zk(t,e,a)}function py(t,e,a,u){if(t[Bl])return;let i;i=8&a.type?kt(u):function jB(t,e){const a=t[ga],u=a.createComment(""),i=Dn(e,t);return Bs(a,tg(a,i),u,function S8(t,e){return t.nextSibling(e)}(a,i),!1),u}(e,a),t[Bl]=i}class Mk{constructor(e){this.queryList=e,this.matches=null}clone(){return new Mk(this.queryList)}setDirty(){this.queryList.setDirty()}}class Lk{constructor(e=[]){this.queries=e}createEmbeddedView(e){const a=e.queries;if(null!==a){const u=null!==e.contentQueries?e.contentQueries[0]:a.length,i=[];for(let r=0;re.trim())}(e):e}}class Pk{constructor(e=[]){this.queries=e}elementStart(e,a){for(let u=0;u0)u.push(o[d/2]);else{const m=r[d+1],g=e[-h];for(let v=qu;v(Bn(e),e.value);return a[va]=e,a}(t),u=a[va];return e?.equal&&(u.equal=e.equal),a.set=i=>cn(u,i),a.update=i=>function eo(t,e){ru()||Fr(),cn(t,e(t.value))}(u,i),a.asReadonly=Dy.bind(a),a}function Dy(){const t=this[va];if(void 0===t.readonlyFn){const e=()=>this();e[va]=t,t.readonlyFn=e}return t.readonlyFn}function Cy(t){return Vk(t)&&"function"==typeof t.set}function Ok(t,e){let a;const u=sd(()=>{a._dirtyCounter();const i=function Fy(t,e){const a=t._lView,u=t._queryIndex;if(void 0===a||void 0===u||4&a[Qe])return e?void 0:La;const i=Hk(a,u),r=fy(a,u);return i.reset(r,Zm),e?i.first:i._changesDetected||void 0===t._flatValue?t._flatValue=i.toArray():t._flatValue}(a,t);if(e&&void 0===i)throw new Z(-951,!1);return i});return a=u[va],a._dirtyCounter=Is(0),a._flatValue=void 0,u}function yy(){return Ok(!0,!1)}function _y(){return Ok(!0,!0)}function Gk(t,e){const a=t[va];a._lView=q(),a._queryIndex=e,a._queryList=Hk(a._lView,e),a._queryList.onDirty(()=>a._dirtyCounter.update(u=>u+1))}function Ay(t,e){return yy()}Ay.required=function $B(t,e){return _y()};function B4(t,e){return yy()}B4.required=function qB(t,e){return _y()};function YB(t){const e=Object.create(dA),a=new tb;function u(){return Bn(e),wy(e.value),e.value}return e.value=t,u[va]=e,u.asReadonly=Dy.bind(u),u.set=i=>{e.equal(e.value,i)||(cn(e,i),a.emit(i))},u.update=i=>{wy(e.value),u.set(i(e.value))},u.subscribe=a.subscribe.bind(a),u.destroyRef=a.destroyRef,u}function wy(t){if(t===Yc)throw new Z(952,!1)}function Kk(t){return YB(t)}Kk.required=function QB(){return YB(Yc)};class Wk{}e0("ContentChildren",(t,e={})=>({selector:t,first:!1,isViewQuery:!1,descendants:!1,emitDistinctChangesOnly:true,...e}),Wk);const Uk=e0("ContentChild",(t,e={})=>({selector:t,first:!0,isViewQuery:!1,descendants:!0,...e}),Wk),Jk=(e0("ViewChildren",(t,e={})=>({selector:t,first:!1,isViewQuery:!0,descendants:!0,emitDistinctChangesOnly:true,...e}),Wk),e0("ViewChild",(t,e)=>({selector:t,first:!0,isViewQuery:!0,descendants:!0,...e}),Wk));function tS(t){const e=[],a=new Map;function u(i){let r=a.get(i);if(!r){const o=t(i);a.set(i,r=o.then(uS))}return r}return G1.forEach((i,r)=>{const o=[];i.templateUrl&&o.push(u(i.templateUrl).then(m=>{i.template=m}));const d="string"==typeof i.styles?[i.styles]:i.styles||[];if(i.styles=d,i.styleUrl&&i.styleUrls?.length)throw new Error("@Component cannot define both `styleUrl` and `styleUrls`. Use `styleUrl` if the component has one stylesheet, or `styleUrls` if it has multiple");if(i.styleUrls?.length){const m=i.styles.length,g=i.styleUrls;i.styleUrls.forEach((v,k)=>{d.push(""),o.push(u(v).then(x=>{d[m+k]=x,g.splice(g.indexOf(v),1),0==g.length&&(i.styleUrls=void 0)}))})}else i.styleUrl&&o.push(u(i.styleUrl).then(m=>{d.push(m),i.styleUrl=void 0}));const h=Promise.all(o).then(()=>function Ly(t){Tg.delete(t)}(r));e.push(h)}),function zy(){const t=G1;return G1=new Map,t}(),Promise.all(e).then(()=>{})}let G1=new Map;const Tg=new Set;function Sy(t){return!!(t.templateUrl&&!t.hasOwnProperty("template")||t.styleUrls&&t.styleUrls.length||t.styleUrl)}function uS(t){return"string"==typeof t?t:t.text()}const z4=new Map;let Ty=!0;function Py(t,e){(function iS(t,e,a){if(e&&e!==a&&Ty)throw new Error(`Duplicate module registered for ${t} - ${ou(e)} vs ${ou(e.name)}`)})(e,z4.get(e)||null,t),z4.set(e,t)}function Ny(t){return Object.getPrototypeOf(t.prototype).constructor}function Ht(t){let e=Ny(t.type),a=!0;const u=[t];for(;e;){let i;if(_u(t))i=e.\u0275cmp||e.\u0275dir;else{if(e.\u0275cmp)throw new Z(903,!1);i=e.\u0275dir}if(i){if(a){u.push(i);const o=t;o.inputs=Zk(t.inputs),o.inputTransforms=Zk(t.inputTransforms),o.declaredInputs=Zk(t.declaredInputs),o.outputs=Zk(t.outputs);const d=i.hostBindings;d&&dS(t,d);const h=i.viewQuery,m=i.contentQueries;if(h&&sS(t,h),m&&hN(t,m),oS(t,i),o3(t.outputs,i.outputs),_u(i)&&i.data.animation){const g=t.data;g.animation=(g.animation||[]).concat(i.data.animation)}}const r=i.features;if(r)for(let o=0;o=0;u--){const i=t[u];i.hostVars=e+=i.hostVars,i.hostAttrs=n1(i.hostAttrs,a=n1(a,i.hostAttrs))}}(u)}function oS(t,e){for(const a in e.inputs){if(!e.inputs.hasOwnProperty(a)||t.inputs.hasOwnProperty(a))continue;const u=e.inputs[a];if(void 0!==u&&(t.inputs[a]=u,t.declaredInputs[a]=e.declaredInputs[a],null!==e.inputTransforms)){const i=Array.isArray(u)?u[0]:u;if(!e.inputTransforms.hasOwnProperty(i))continue;t.inputTransforms??={},t.inputTransforms[i]=e.inputTransforms[i]}}}function Zk(t){return t===Gi?{}:t===La?[]:t}function sS(t,e){const a=t.viewQuery;t.viewQuery=a?(u,i)=>{e(u,i),a(u,i)}:e}function hN(t,e){const a=t.contentQueries;t.contentQueries=a?(u,i,r)=>{e(u,i,r),a(u,i,r)}:e}function dS(t,e){const a=t.hostBindings;t.hostBindings=a?(u,i)=>{e(u,i),a(u,i)}:e}const cS=["providersResolver"],mN=["template","decls","consts","vars","onPush","ngContentSelectors","styles","encapsulation","schemas"];function pS(t,e,a){if(null!==t.hostDirectives)for(const u of t.hostDirectives){const i=mi(u.directive);gS(i.declaredInputs,u.inputs),pS(i,e,a),a.set(i,u),e.push(i)}}function Iy(t){if(void 0===t||0===t.length)return Gi;const e={};for(let a=0;aa()),this.destroyCbs=null}onDestroy(e){this.destroyCbs.push(e)}}class b extends l{constructor(e){super(),this.moduleType=e}create(e){return new E(this.moduleType,e,[])}}class y extends n{constructor(e){super(),this.componentFactoryResolver=new oy(this),this.instance=null;const a=new Pd([...e.providers,{provide:n,useValue:this},{provide:y4,useValue:this.componentFactoryResolver}],e.parent||b3(),e.debugName,new Set(["environment"]));this.injector=a,e.runEnvironmentInitializers&&a.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(e){this.injector.onDestroy(e)}}function _(t,e,a=null){return new y({providers:t,parent:e,debugName:a,runEnvironmentInitializers:!0}).injector}class S{constructor(){this.cachedInjectors=new Map}getOrCreateInjector(e,a,u,i){if(!this.cachedInjectors.has(e)){const r=u.length>0?_(u,a,i):null;this.cachedInjectors.set(e,r)}return this.cachedInjectors.get(e)}ngOnDestroy(){try{for(const e of this.cachedInjectors.values())null!==e&&e.destroy()}finally{this.cachedInjectors.clear()}}static#e=this.\u0275prov=oe({token:S,providedIn:"environment",factory:()=>new S})}function K(t){return!!_e(t)&&(Array.isArray(t)||!(t instanceof Map)&&Symbol.iterator in t)}function _e(t){return null!==t&&("function"==typeof t||"object"==typeof t)}function Fe(t,e,a){return t[e]=a}function Aa(t,e){return t[e]}function et(t,e,a){const u=t[e];return!Object.is(u,a)&&(t[e]=a,!0)}function Yu(t,e,a,u){const i=et(t,e,a);return et(t,e+1,u)||i}function xo(t,e,a,u,i){const r=Yu(t,e,a,u);return et(t,e+2,i)||r}function On(t,e,a,u,i,r){const o=Yu(t,e,a,u);return Yu(t,e+2,i,r)||o}function K1(t){return!(32&~t.flags)}function $k(t,e,a,u,i,r,o,d,h,m){const g=a+Ge,v=e.firstCreatePass?function M4(t,e,a,u,i,r,o,d,h){const m=e.consts,g=Ss(e,t,4,o||null,d||null);qb(e,a,g,Za(m,h)),A3(e,g);const v=g.tView=Zb(2,g,u,i,r,e.directiveRegistry,e.pipeRegistry,null,e.schemas,m,null);return null!==e.queries&&(e.queries.template(e,g),v.queries=e.queries.embeddedTView(g)),g}(g,e,t,u,i,r,o,d,h):e.data[g];In(v,!1);const k=pN(e,t,v,a);Vm()&&ig(e,t,k,v),Cn(k,t);const x=h4(k,t,k,v);return t[g]=x,pg(t,x),cc(x,v,t),we(v)&&x0(e,t,v),null!=h&&f0(t,v,m),v}function Ji(t,e,a,u,i,r,o,d){const h=q(),m=_a();return $k(h,m,t,e,a,u,i,Za(m.consts,r),o,d),Ji}let pN=gN;function gN(t,e,a,u){return Ll(!0),e[ga].createComment("")}var vi;!function(t){t[t.NOT_STARTED=0]="NOT_STARTED",t[t.IN_PROGRESS=1]="IN_PROGRESS",t[t.COMPLETE=2]="COMPLETE",t[t.FAILED=3]="FAILED"}(vi||(vi={}));const EN=0,PY=1;var bi,Pg;!function(t){t[t.Placeholder=0]="Placeholder",t[t.Loading=1]="Loading",t[t.Complete=2]="Complete",t[t.Error=3]="Error"}(bi||(bi={})),function(t){t[t.Initial=-1]="Initial"}(Pg||(Pg={}));const Ng=0,Hy=1,qk=2,Vy=3,vN=4,bN=5;var ES;function Oy(t,e,a){const u=1===t?bN:vN;null===e[u]&&(e[u]=[]),e[u].push(a)}function vS(t,e){const a=1===t?bN:vN,u=e[a];if(null!==u){for(const i of u)i();e[a]=null}}function kN(t){vS(1,t),vS(0,t)}function jy(t){return t+1}function L4(t,e){t[Ee];return t[jy(e.index)]}function Yo(t,e){const a=jy(e.index);return t.data[a]}function bS(t,e){return e===bi.Placeholder?t.placeholderBlockConfig?.[EN]??null:e===bi.Loading?t.loadingBlockConfig?.[EN]??null:null}function xN(t){return t.loadingBlockConfig?.[PY]??null}function fN(t,e){if(!t||0===t.length)return e;const a=new Set(t);for(const u of e)a.add(u);return t.length===a.size?t:Array.from(a)}!function(t){t[t.Manual=0]="Manual",t[t.Playthrough=1]="Playthrough"}(ES||(ES={}));const Gy={passive:!0,capture:!0},kS=new WeakMap,xS=new WeakMap,Ig=new WeakMap,DN=["click","keydown"],CN=["mouseenter","focusin"];let Rg=null,fS=0;class DS{constructor(){this.callbacks=new Set,this.listener=()=>{for(const e of this.callbacks)e()}}}function yN(t,e){let a=xS.get(t);if(!a){a=new DS,xS.set(t,a);for(const u of DN)t.addEventListener(u,a.listener,Gy)}return a.callbacks.add(e),()=>{const{callbacks:u,listener:i}=a;if(u.delete(e),0===u.size){xS.delete(t);for(const r of DN)t.removeEventListener(r,i,Gy)}}}function _N(t,e){let a=kS.get(t);if(!a){a=new DS,kS.set(t,a);for(const u of CN)t.addEventListener(u,a.listener,Gy)}return a.callbacks.add(e),()=>{const{callbacks:u,listener:i}=a;if(u.delete(e),0===u.size){for(const r of CN)t.removeEventListener(r,i,Gy);kS.delete(t)}}}function FN(t,e,a){const u=a.get(rt);let i=Ig.get(t);return Rg=Rg||u.runOutsideAngular(()=>new IntersectionObserver(r=>{for(const o of r)o.isIntersecting&&Ig.has(o.target)&&u.run(Ig.get(o.target).listener)})),i||(i=new DS,u.runOutsideAngular(()=>Rg.observe(t)),Ig.set(t,i),fS++),i.callbacks.add(e),()=>{Ig.has(t)&&(i.callbacks.delete(e),0===i.callbacks.size&&(Rg?.unobserve(t),Ig.delete(t),fS--),0===fS&&(Rg?.disconnect(),Rg=null))}}function Hg(t,e,a,u,i,r,o){const d=t[gi];zg(function h(){if(gs(t))return;const m=L4(t,e),g=m[Hy];if(g!==Pg.Initial&&g!==bi.Placeholder)return;const v=function OY(t,e,a){return null==a?t:a>=0?Vd(a,t):t[e.index][qu]??null}(t,e,u);if(!v)return void zg(h,{injector:d});if(gs(v))return;const k=function jY(t,e){return m1(Ge+e,t)}(v,a),x=i(k,()=>{t!==v&&E1(v,x),r()},d);t!==v&&xs(v,x),Oy(o,m,x)},{injector:d})}function AN(t,e){const u=e[gi].get(Ky);return u.add(t),()=>u.remove(t)}class Ky{constructor(){this.executingCallbacks=!1,this.idleId=null,this.current=new Set,this.deferred=new Set,this.ngZone=U(rt),this.requestIdleCallbackFn=(typeof requestIdleCallback<"u"?requestIdleCallback:setTimeout).bind(globalThis),this.cancelIdleCallbackFn=(typeof requestIdleCallback<"u"?cancelIdleCallback:clearTimeout).bind(globalThis)}add(e){(this.executingCallbacks?this.deferred:this.current).add(e),null===this.idleId&&this.scheduleIdleCallback()}remove(e){const{current:a,deferred:u}=this;a.delete(e),u.delete(e),0===a.size&&0===u.size&&this.cancelIdleCallback()}scheduleIdleCallback(){const e=()=>{this.cancelIdleCallback(),this.executingCallbacks=!0;for(const a of this.current)a();if(this.current.clear(),this.executingCallbacks=!1,this.deferred.size>0){for(const a of this.deferred)this.current.add(a);this.deferred.clear(),this.scheduleIdleCallback()}};this.idleId=this.requestIdleCallbackFn(()=>this.ngZone.run(e))}cancelIdleCallback(){null!==this.idleId&&(this.cancelIdleCallbackFn(this.idleId),this.idleId=null)}ngOnDestroy(){this.cancelIdleCallback(),this.current.clear(),this.deferred.clear()}static#e=this.\u0275prov=oe({token:Ky,providedIn:"root",factory:()=>new Ky})}function wN(t){return(e,a)=>BN(t,e,a)}function BN(t,e,a){const i=a[gi].get(Wy);return i.add(t,e),()=>i.remove(e)}class Wy{constructor(){this.executingCallbacks=!1,this.timeoutId=null,this.invokeTimerAt=null,this.current=[],this.deferred=[]}add(e,a){const u=this.executingCallbacks?this.deferred:this.current;this.addToQueue(u,Date.now()+e,a),this.scheduleTimer()}remove(e){const{current:a,deferred:u}=this;-1===this.removeFromQueue(a,e)&&this.removeFromQueue(u,e),0===a.length&&0===u.length&&this.clearTimeout()}addToQueue(e,a,u){let i=e.length;for(let r=0;ra){i=r;break}h3(e,i,a,u)}removeFromQueue(e,a){let u=-1;for(let i=0;i-1&&xm(e,u,2),u}scheduleTimer(){const e=()=>{this.clearTimeout(),this.executingCallbacks=!0;const u=[...this.current],i=Date.now();for(let o=0;o=0&&xm(this.current,0,r+1),this.executingCallbacks=!1,this.deferred.length>0){for(let o=0;o0){const u=Date.now(),i=this.current[0];if(null===this.timeoutId||this.invokeTimerAt&&this.invokeTimerAt-i>16){this.clearTimeout();const r=Math.max(i-u,16);this.invokeTimerAt=i,this.timeoutId=setTimeout(e,r)}}}clearTimeout(){null!==this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=null)}ngOnDestroy(){this.clearTimeout(),this.current.length=0,this.deferred.length=0}static#e=this.\u0275prov=oe({token:Wy,providedIn:"root",factory:()=>new Wy})}new he("DEFER_BLOCK_DEPENDENCY_INTERCEPTOR");const WY=new he("");function CS(t){return t.get(WY,null,{optional:!0})?.behavior!==ES.Manual&&Hn(t)}let yS=null;function SN(t){const e=q(),a=St();if(Vg(e,a),Hn(e[gi])){const u=t(()=>Og(e,a),e);Oy(0,L4(e,a),u)}}function zN(t){const e=q();if(Hn(e[gi])){const a=St(),i=Yo(e[Ee],a);if(i.loadingState===vi.NOT_STARTED){Oy(1,L4(e,a),t(()=>Yk(i,e,a),e))}}}function W1(t,e,a,u=!1){const i=a[Qt],r=i[Ee];if(gs(i))return;const o=L4(i,e);if(TN(o[Hy],t)&&TN(o[Ng]??-1,t)){const h=i[gi],m=Yo(r,e),v=u||!Hn(h)||null===xN(m)&&null===bS(m,bi.Loading)&&!bS(m,bi.Placeholder)?MN:yS;try{v(t,o,a,e,i)}catch(k){m4(i,k)}}}function _S(t,e,a){return t.get(S).getOrCreateInjector(e,t,a,"")}function MN(t,e,a,u,i){const r=function RY(t,e,a){const i=Yo(e[Ee],a);switch(t){case bi.Complete:return i.primaryTmplIndex;case bi.Loading:return i.loadingTmplIndex;case bi.Error:return i.errorTmplIndex;case bi.Placeholder:return i.placeholderTmplIndex;default:return null}}(t,i,u);if(null!==r){e[Hy]=t;const o=i[Ee],h=p1(o,r+Ge),m=0;let g;if(fC(a,m),t===bi.Complete){const x=Yo(o,u),D=x.providers;D&&D.length>0&&(g=function lQ(t,e,a){if(t instanceof Wd){const i=t.injector,o=_S(t.parentInjector,e,a);return new Wd(i,o)}const u=t.get(tn);if(u!==t){const i=_S(u,e,a);return new Wd(t,i)}return _S(t,e,a)}(i[gi],x,D))}const v=sc(a,h.tView.ssrId),k=nc(i,h,null,{dehydratedView:v,injector:g});oc(a,k,m,rc(h,v)),p4(k,2)}}function sQ(t,e,a,u,i){const r=Date.now(),d=Yo(i[Ee],u);if(null===e[qk]||e[qk]<=r){e[qk]=null;const h=xN(d),m=null!==e[Vy];if(t!==bi.Loading||null===h||m){t>bi.Loading&&m&&(e[Vy](),e[Vy]=null,e[Ng]=null),MN(t,e,a,u,i);const g=bS(d,t);null!==g&&(e[qk]=r+g,LN(g,e,u,a,i))}else{e[Ng]=t;const g=LN(h,e,u,a,i);e[Vy]=g}}else e[Ng]=t}function LN(t,e,a,u,i){return BN(t,()=>{const o=e[Ng];e[qk]=null,e[Ng]=null,null!==o&&W1(o,a,u)},i)}function TN(t,e){return t{let v=!1;const k=[],x=[];for(const D of g){if("fulfilled"!==D.status){v=!0;break}{const C=D.value,F=pa(C)||mi(C);if(F)k.push(F);else{const A=Mt(C);A&&x.push(A)}}}if(t.loadingPromise=null,h.remove(m),v){if(t.loadingState=vi.FAILED,null===t.errorTmplIndex){const C=new Z(750,!1);m4(e,C)}}else{t.loadingState=vi.COMPLETE;const D=o.tView;if(k.length>0){D.directiveRegistry=fN(D.directiveRegistry,k);const F=_m(!1,...k.map(A=>A.type));t.providers=F}x.length>0&&(D.pipeRegistry=fN(D.pipeRegistry,x))}}),t.loadingPromise):(t.loadingPromise=Promise.resolve().then(()=>{t.loadingPromise=null,t.loadingState=vi.COMPLETE,h.remove(m)}),t.loadingPromise)}function Vg(t,e){const a=t[e.index];W1(bi.Placeholder,e,a)}function PN(t,e,a){t.loadingPromise.then(()=>{t.loadingState===vi.COMPLETE?W1(bi.Complete,e,a):t.loadingState===vi.FAILED&&W1(bi.Error,e,a)})}function Og(t,e){const a=t[Ee],u=t[e.index];if(!CS(t[gi]))return;const r=L4(t,e),o=Yo(a,e);switch(kN(r),o.loadingState){case vi.NOT_STARTED:W1(bi.Loading,e,u),FS(o,t,e),o.loadingState===vi.IN_PROGRESS&&PN(o,e,u);break;case vi.IN_PROGRESS:W1(bi.Loading,e,u),PN(o,e,u);break;case vi.COMPLETE:W1(bi.Complete,e,u);break;case vi.FAILED:W1(bi.Error,e,u)}}function dr(t,e,a,u){const i=q();if(et(i,bo(),e)){_a();Zo(le(),i,t,e,a,u)}return dr}function jg(t,e){let a=!1,u=p0();for(let r=1;r>17&32767}function AS(t){return 2|t}function T4(t){return(131068&t)>>2}function wS(t,e){return-131069&t|e<<2}function BS(t){return 1|t}function mQ(t,e,a,u,i,r){let o=r?e.classBindings:e.styleBindings,d=U1(o),h=T4(o);t[u]=a;let g,m=!1;if(Array.isArray(a)){const v=a;g=v[1],(null===g||u1(v,g)>0)&&(m=!0)}else g=a;if(i)if(0!==h){const k=U1(t[d+1]);t[u+1]=Uy(k,d),0!==k&&(t[k+1]=wS(t[k+1],u)),t[d+1]=function cQ(t,e){return 131071&t|e<<17}(t[d+1],u)}else t[u+1]=Uy(d,0),0!==d&&(t[d+1]=wS(t[d+1],u)),d=u;else t[u+1]=Uy(h,0),0===d?d=u:t[h+1]=wS(t[h+1],u),h=u;m&&(t[u+1]=AS(t[u+1])),WN(t,g,u,!0),WN(t,g,u,!1),function pQ(t,e,a,u,i){const r=i?t.residualClasses:t.residualStyles;null!=r&&"string"==typeof e&&u1(r,e)>=0&&(a[u+1]=BS(a[u+1]))}(e,g,t,u,r),o=Uy(d,h),r?e.classBindings=o:e.styleBindings=o}function WN(t,e,a,u){const i=t[a+1],r=null===e;let o=u?U1(i):T4(i),d=!1;for(;0!==o&&(!1===d||r);){const h=t[o],m=t[o+1];gQ(h,e)&&(d=!0,t[o+1]=u?BS(m):AS(m)),o=u?U1(m):T4(m)}d&&(t[a+1]=u?AS(i):BS(i))}function gQ(t,e){return null===t||null==e||(Array.isArray(t)?t[1]:t)===e||!(!Array.isArray(t)||"string"!=typeof e)&&u1(t,e)>=0}const ln={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function UN(t){return t.substring(ln.key,ln.keyEnd)}function EQ(t){return t.substring(ln.value,ln.valueEnd)}function JN(t,e){const a=ln.textEnd;return a===e?-1:(e=ln.keyEnd=function kQ(t,e,a){for(;e32;)e++;return e}(t,ln.key=e,a),Yg(t,e,a))}function ZN(t,e){const a=ln.textEnd;let u=ln.key=Yg(t,e,a);return a===u?-1:(u=ln.keyEnd=function xQ(t,e,a){let u;for(;e=65&&(-33&u)<=90||u>=48&&u<=57);)e++;return e}(t,u,a),u=qN(t,u,a,58),u=ln.value=Yg(t,u,a),u=ln.valueEnd=function fQ(t,e,a){let u=-1,i=-1,r=-1,o=e,d=o;for(;o32&&(d=o),r=i,i=u,u=-33&h}return d}(t,u,a),qN(t,u,a,59))}function $N(t){ln.key=0,ln.keyEnd=0,ln.value=0,ln.valueEnd=0,ln.textEnd=t.length}function Yg(t,e,a){for(;e=0;a=ZN(e,a))eI(t,UN(e),EQ(e))}function Hs(t,e){for(let a=function vQ(t){return $N(t),JN(t,Yg(t,0,ln.textEnd))}(e);a>=0;a=JN(e,a))Qn(t,UN(e),!0)}function F0(t,e,a,u){const i=q(),r=_a(),o=Wo(2);if(r.firstUpdatePass&&XN(r,t,o,u),e!==Fa&&et(i,o,e)){aI(r,r.data[rn()],i,i[ga],t,i[o+1]=function zQ(t,e){return null==t||""===t||("string"==typeof e?t+=e:"object"==typeof t&&(t=ou(rr(t)))),t}(e,a),u,o)}}function A0(t,e,a,u){const i=_a(),r=Wo(2);i.firstUpdatePass&&XN(i,null,r,u);const o=q();if(a!==Fa&&et(o,r,a)){const d=i.data[rn()];if(uI(d,u)&&!QN(i,r)){let h=u?d.classesWithoutHost:d.stylesWithoutHost;null!==h&&(a=e1(h,a||"")),SS(i,d,o,a,u)}else!function SQ(t,e,a,u,i,r,o,d){i===Fa&&(i=La);let h=0,m=0,g=0=t.expandoStartIndex}function XN(t,e,a,u){const i=t.data;if(null===i[a+1]){const r=i[rn()],o=QN(t,a);uI(r,u)&&null===e&&!o&&(e=!1),e=function yQ(t,e,a,u){const i=ur(t);let r=u?e.residualClasses:e.residualStyles;if(null===i)0===(u?e.classBindings:e.styleBindings)&&(a=MS(null,t,e,a,u),a=Qk(a,e.attrs,u),r=null);else{const o=e.directiveStylingLast;if(-1===o||t[o]!==i)if(a=MS(i,t,e,a,u),null===r){let h=function _Q(t,e,a){const u=a?e.classBindings:e.styleBindings;if(0!==T4(u))return t[U1(u)]}(t,e,u);void 0!==h&&Array.isArray(h)&&(h=MS(null,t,e,h[1],u),h=Qk(h,e.attrs,u),function FQ(t,e,a,u){const i=a?e.classBindings:e.styleBindings;t[U1(i)]=u}(t,e,u,h))}else r=function AQ(t,e,a){let u;const i=e.directiveEnd;for(let r=1+e.directiveStylingLast;r0;){const h=t[i],m=Array.isArray(h),g=m?h[1]:h,v=null===g;let k=a[i+1];k===Fa&&(k=v?La:void 0);let x=v?fm(k,u):g===u?k:void 0;if(m&&!Jy(x)&&(x=fm(h,u)),Jy(x)&&(d=x,o))return d;const D=t[i+1];i=o?U1(D):T4(D)}if(null!==e){let h=r?e.residualClasses:e.residualStyles;null!=h&&(d=fm(h,u))}return d}function Jy(t){return void 0!==t}function uI(t,e){return!!(t.flags&(e?8:16))}function LS(){return q()[xu][Bt]}class OQ{destroy(e){}updateValue(e,a){}swap(e,a){const u=Math.min(e,a),i=Math.max(e,a),r=this.detach(i);if(i-u>1){const o=this.detach(u);this.attach(u,r),this.attach(i,o)}else this.attach(u,r)}move(e,a){this.attach(a,this.detach(e))}}function TS(t,e,a,u,i){return t===a&&Object.is(e,u)?1:Object.is(i(t,e),i(a,u))?-1:0}function PS(t,e,a,u){return!(void 0===e||!e.has(u))&&(t.attach(a,e.get(u)),e.delete(u),!0)}function iI(t,e,a,u,i){if(PS(t,e,u,a(u,i)))t.updateValue(u,i);else{const r=t.create(u,i);t.attach(u,r)}}function nI(t,e,a,u){const i=new Set;for(let r=e;r<=a;r++)i.add(u(r,t.at(r)));return i}class rI{constructor(){this.kvMap=new Map,this._vMap=void 0}has(e){return this.kvMap.has(e)}delete(e){if(!this.has(e))return!1;const a=this.kvMap.get(e);return void 0!==this._vMap&&this._vMap.has(a)?(this.kvMap.set(e,this._vMap.get(a)),this._vMap.delete(a)):this.kvMap.delete(e),!0}get(e){return this.kvMap.get(e)}set(e,a){if(this.kvMap.has(e)){let u=this.kvMap.get(e);void 0===this._vMap&&(this._vMap=new Map);const i=this._vMap;for(;i.has(u);)u=i.get(u);i.set(u,a)}else this.kvMap.set(e,a)}forEach(e){for(let[a,u]of this.kvMap)if(e(u,a),void 0!==this._vMap){const i=this._vMap;for(;i.has(u);)u=i.get(u),e(u,a)}}}function Qo(t,e){Ui("NgControlFlow");const a=q(),u=bo(),i=a[u]!==Fa?a[u]:-1,r=-1!==i?Zy(a,Ge+i):void 0;if(et(a,u,t)){const d=pe(null);try{if(void 0!==r&&fC(r,0),-1!==t){const h=Ge+t,m=Zy(a,h),g=RS(a[Ee],h),v=sc(m,g.tView.ssrId);oc(m,nc(a,g,e,{dehydratedView:v}),0,rc(g,v))}}finally{pe(d)}}else if(void 0!==r){const d=ik(r,0);void 0!==d&&(d[Bt]=e)}}class GQ{constructor(e,a,u){this.lContainer=e,this.$implicit=a,this.$index=u}get $count(){return this.lContainer.length-qu}}class UQ{constructor(e,a,u){this.hasEmptyBlock=e,this.trackByFn=a,this.liveCollection=u}}function NS(t,e,a,u,i,r,o,d,h,m,g,v,k){Ui("NgControlFlow");const x=q(),D=_a(),C=void 0!==h,F=q(),A=d?o.bind(F[xu][Bt]):o,z=new UQ(C,A);F[Ge+t]=z,$k(x,D,t+1,e,a,u,i,Za(D.consts,r)),C&&$k(x,D,t+2,h,m,g,v,Za(D.consts,k))}class JQ extends OQ{constructor(e,a,u){super(),this.lContainer=e,this.hostLView=a,this.templateTNode=u,this.operationsCounter=void 0,this.needsIndexUpdate=!1}get length(){return this.lContainer.length-qu}at(e){return this.getLView(e)[Bt].$implicit}attach(e,a){const u=a[xn];this.needsIndexUpdate||=e!==this.length,oc(this.lContainer,a,e,rc(this.templateTNode,u))}detach(e){return this.needsIndexUpdate||=e!==this.length-1,function ZQ(t,e){return l4(t,e)}(this.lContainer,e)}create(e,a){const u=sc(this.lContainer,this.templateTNode.tView.ssrId),i=nc(this.hostLView,this.templateTNode,new GQ(this.lContainer,a,e),{dehydratedView:u});return this.operationsCounter?.recordCreate(),i}destroy(e){ag(e[Ee],e),this.operationsCounter?.recordDestroy()}updateValue(e,a){this.getLView(e)[Bt].$implicit=a}reset(){this.needsIndexUpdate=!1,this.operationsCounter?.reset()}updateIndexes(){if(this.needsIndexUpdate)for(let e=0;e{t.destroy(h)})}(h,t,r.trackByFn),h.updateIndexes(),r.hasEmptyBlock){const m=bo(),g=0===h.length;if(et(u,m,g)){const v=a+2,k=Zy(u,v);if(g){const x=RS(i,v),D=sc(k,x.tView.ssrId);oc(k,nc(u,x,void 0,{dehydratedView:D}),0,rc(x,D))}else fC(k,0)}}}finally{pe(e)}}function Zy(t,e){return t[e]}function RS(t,e){return p1(t,e)}function eu(t,e,a,u){const i=q(),r=_a(),o=Ge+t,d=i[ga],h=r.firstCreatePass?function qQ(t,e,a,u,i,r){const o=e.consts,h=Ss(e,t,2,u,Za(o,i));return qb(e,a,h,Za(o,r)),null!==h.attrs&&Lg(h,h.attrs,!1),null!==h.mergedAttrs&&Lg(h,h.mergedAttrs,!0),null!==e.queries&&e.queries.elementStart(e,h),h}(o,r,i,e,a,u):r.data[o],m=oI(r,i,h,d,e,t);i[o]=m;const g=we(h);return In(h,!0),nC(d,m,h),!K1(h)&&Vm()&&ig(r,i,m,h),0===function Od(){return oa.lFrame.elementDepthCount}()&&Cn(m,i),function _3(){oa.lFrame.elementDepthCount++}(),g&&(x0(r,i,h),sg(r,h,i)),null!==u&&f0(i,h),eu}function wu(){let t=St();F3()?J():(t=t.parent,In(t,!1));const e=t;(function k1(t){return oa.skipHydrationRootTNode===t})(e)&&function Nm(){oa.skipHydrationRootTNode=null}(),function b1(){oa.lFrame.elementDepthCount--}();const a=_a();return a.firstCreatePass&&(A3(a,t),z5(t)&&a.queries.elementEnd(t)),null!=e.classesWithoutHost&&function qA(t){return!!(8&t.flags)}(e)&&SS(a,e,q(),e.classesWithoutHost,!0),null!=e.stylesWithoutHost&&function YA(t){return!!(16&t.flags)}(e)&&SS(a,e,q(),e.stylesWithoutHost,!1),wu}function J1(t,e,a,u){return eu(t,e,a,u),wu(),J1}let oI=(t,e,a,u,i,r)=>(Ll(!0),Jo(u,i,j5()));function $y(t,e,a){const u=q(),i=_a(),r=t+Ge,o=i.firstCreatePass?function XQ(t,e,a,u,i){const r=e.consts,o=Za(r,u),d=Ss(e,t,8,"ng-container",o);return null!==o&&Lg(d,o,!0),qb(e,a,d,Za(r,i)),null!==e.queries&&e.queries.elementStart(e,d),d}(r,i,u,e,a):i.data[r];In(o,!0);const d=lI(i,u,o,t);return u[r]=d,Vm()&&ig(i,u,d,o),Cn(d,u),we(o)&&(x0(i,u,o),sg(i,o,u)),null!=a&&f0(u,o),$y}function qy(){let t=St();const e=_a();return F3()?J():(t=t.parent,In(t,!1)),e.firstCreatePass&&(A3(e,t),z5(t)&&e.queries.elementEnd(t)),qy}function Yy(t,e,a){return $y(t,e,a),qy(),Yy}let lI=(t,e,a,u)=>(Ll(!0),Vb(e[ga],""));function Z1(){return q()}const P4=void 0;var uX=["en",[["a","p"],["AM","PM"],P4],[["AM","PM"],P4,P4],[["S","M","T","W","T","F","S"],["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],["Su","Mo","Tu","We","Th","Fr","Sa"]],P4,[["J","F","M","A","M","J","J","A","S","O","N","D"],["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],["January","February","March","April","May","June","July","August","September","October","November","December"]],P4,[["B","A"],["BC","AD"],["Before Christ","Anno Domini"]],0,[6,0],["M/d/yy","MMM d, y","MMMM d, y","EEEE, MMMM d, y"],["h:mm a","h:mm:ss a","h:mm:ss a z","h:mm:ss a zzzz"],["{1}, {0}",P4,"{1} 'at' {0}",P4],[".",",",";","%","+","-","E","\xd7","\u2030","\u221e","NaN",":"],["#,##0.###","#,##0%","\xa4#,##0.00","#E0"],"USD","$","US Dollar",{},"ltr",function tX(t){const a=Math.floor(Math.abs(t)),u=t.toString().replace(/^[^.]*\.?/,"").length;return 1===a&&0===u?1:5}];let Qg={};function Gr(t){const e=function iX(t){return t.toLowerCase().replace(/_/g,"-")}(t);let a=hI(e);if(a)return a;const u=e.split("-")[0];if(a=hI(u),a)return a;if("en"===u)return uX;throw new Z(701,!1)}function cI(t){return Gr(t)[du.PluralCase]}function hI(t){return t in Qg||(Qg[t]=qt.ng&&qt.ng.common&&qt.ng.common.locales&&qt.ng.common.locales[t]),Qg[t]}var du;!function(t){t[t.LocaleId=0]="LocaleId",t[t.DayPeriodsFormat=1]="DayPeriodsFormat",t[t.DayPeriodsStandalone=2]="DayPeriodsStandalone",t[t.DaysFormat=3]="DaysFormat",t[t.DaysStandalone=4]="DaysStandalone",t[t.MonthsFormat=5]="MonthsFormat",t[t.MonthsStandalone=6]="MonthsStandalone",t[t.Eras=7]="Eras",t[t.FirstDayOfWeek=8]="FirstDayOfWeek",t[t.WeekendRange=9]="WeekendRange",t[t.DateFormat=10]="DateFormat",t[t.TimeFormat=11]="TimeFormat",t[t.DateTimeFormat=12]="DateTimeFormat",t[t.NumberSymbols=13]="NumberSymbols",t[t.NumberFormats=14]="NumberFormats",t[t.CurrencyCode=15]="CurrencyCode",t[t.CurrencySymbol=16]="CurrencySymbol",t[t.CurrencyName=17]="CurrencyName",t[t.Currencies=18]="Currencies",t[t.Directionality=19]="Directionality",t[t.PluralCase=20]="PluralCase",t[t.ExtraData=21]="ExtraData"}(du||(du={}));const nX=["zero","one","two","few","many"];const Xg="en-US",Qy={marker:"element"},Xy={marker:"ICU"};var Kr;!function(t){t[t.SHIFT=2]="SHIFT",t[t.APPEND_EAGERLY=1]="APPEND_EAGERLY",t[t.COMMENT=2]="COMMENT"}(Kr||(Kr={}));let mI=Xg;function pI(t){"string"==typeof t&&(mI=t.toLowerCase().replace(/_/g,"-"))}let Xk=0,ex=0;function gI(t,e,a){const u=t[ga];switch(a){case Node.COMMENT_NODE:return Vb(u,e);case Node.TEXT_NODE:return Rb(u,e);case Node.ELEMENT_NODE:return Jo(u,e,null)}}let ax=(t,e,a,u)=>(Ll(!0),gI(t,a,u));function EI(t,e,a,u){const i=a[ga];let o,r=null;for(let d=0;d>>1,x=e[++d],D=e[++d];ak(i,m1(k,a),null,null,x,D,null)}else switch(h){case Xy:const m=e[++d],g=e[++d];if(null===a[g]){Cn(a[g]=ax(a,g,m,Node.COMMENT_NODE),a)}break;case Qy:const v=e[++d],k=e[++d];if(null===a[k]){Cn(a[k]=ax(a,k,v,Node.ELEMENT_NODE),a)}}}}function vI(t,e,a,u,i){for(let r=0;r>>2;switch(3&g){case 1:const k=a[++m],x=a[++m],D=t.data[v];"string"==typeof D?ak(e[ga],e[v],null,D,k,h,x):or(t,D,e,k,h,e[ga],x,!1);break;case 0:const C=e[v];null!==C&&Hb(e[ga],C,h);break;case 2:pX(t,k4(t,v),e,h);break;case 3:bI(t,k4(t,v),u,e)}}}}else{const h=a[r+1];if(h>0&&!(3&~h)){const g=k4(t,h>>>2);e[g.currentCaseLViewIndex]<0&&bI(t,g,u,e)}}r+=d}}function bI(t,e,a,u){let i=u[e.currentCaseLViewIndex];if(null!==i){let r=Xk;i<0&&(i=u[e.currentCaseLViewIndex]=~i,r=-1),vI(t,u,e.update[i],a,r)}}function pX(t,e,a,u){const i=function gX(t,e){let a=t.cases.indexOf(e);if(-1===a)switch(t.type){case 1:{const u=function rX(t,e){const a=cI(e)(parseInt(t,10)),u=nX[a];return void 0!==u?u:"other"}(e,function lX(){return mI}());a=t.cases.indexOf(u),-1===a&&"other"!==u&&(a=t.cases.indexOf("other"));break}case 0:a=t.cases.indexOf("other")}return-1===a?null:a}(e,u);if(kg(e,a)!==i&&(kI(t,e,a),a[e.currentCaseLViewIndex]=null===i?null:~i,null!==i)){const o=a[e.anchorIdx];o&&EI(t,e.create[i],a,o),function fk(t,e,a){Ag(t,e,a)}(a,e.anchorIdx,i)}}function kI(t,e,a){let u=kg(e,a);if(null!==u){const i=e.remove[u];for(let r=0;r0){const d=m1(o,a);null!==d&&d4(a[ga],d)}else kI(t,k4(t,~o),a)}}}const e_=/\ufffd(\d+):?\d*\ufffd/gi,EX=/({\s*\ufffd\d+:?\d*\ufffd\s*,\s*\S{6}\s*,[\s\S]*})/gi,vX=/\ufffd(\d+)\ufffd/,fI=/^\s*(\ufffd\d+:?\d*\ufffd)\s*,\s*(select|plural)\s*,/,tx="\ufffd",bX=/\ufffd\/?\*(\d+:\d+)\ufffd/gi,kX=/\ufffd(\/?[#*]\d+):?\d*\ufffd/gi,xX=/\uE500/g;function DX(t,e,a,u,i,r){const o=fe(),d=[],h=[],m=[[]],g=[[]];i=function FX(t,e){if(MC(e))return yI(t);{const a=t.indexOf(`:${e}${tx}`)+2+e.toString().length,u=t.search(new RegExp(`${tx}\\/\\*\\d+:${e}${tx}`));return yI(t.substring(a,u))}}(i,r);const v=function fX(t){return t.replace(xX," ")}(i).split(kX);for(let k=0;ka.length&&a.push(h)}return{type:u,mainBinding:i,cases:e,values:a}}function HS(t){if(!t)return[];let e=0;const a=[],u=[],i=/[{}]/g;let r;for(i.lastIndex=0;r=i.exec(t);){const d=r.index;if("}"==r[0]){if(a.pop(),0==a.length){const h=t.substring(e,d);fI.test(h)?u.push(AX(h)):u.push(h),e=d+1}}else{if(0==a.length){const h=t.substring(e,d);u.push(h),e=d+1}a.push("{")}}const o=t.substring(e);return u.push(o),u}function wX(t,e,a,u,i,r,o,d,h){const m=[],g=[],v=[];a.cases.push(o),a.create.push(m),a.remove.push(g),a.update.push(v);const x=z6(g0()).getInertBodyElement(d),D=zb(x)||x;return D?FI(t,e,a,u,i,m,g,v,D,r,h,0):0}function FI(t,e,a,u,i,r,o,d,h,m,g,v){let k=0,x=h.firstChild;for(;x;){const D=zs(e,u,1,null);switch(x.nodeType){case Node.ELEMENT_NODE:const C=x,F=C.tagName.toLowerCase();if(Bb.hasOwnProperty(F)){VS(r,Qy,F,m,D),e.data[D]=F;const L=C.attributes;for(let G=0;G>>Kr.SHIFT;let v=t[g],k=!1;null===v&&(v=t[g]=ax(t,g,d,h?Node.COMMENT_NODE:Node.TEXT_NODE),k=Vm()),m&&null!==a&&k&&Bs(i,a,v,u,!1)}}(i,h.create,g,v),R5(!0)}function SI(){R5(!1)}let MI=(t,e,a)=>{};function Qu(t,e,a,u){const i=q(),r=_a(),o=St();return OS(r,i,i[ga],o,t,e,u),Qu}function OS(t,e,a,u,i,r,o){const d=we(u),m=t.firstCreatePass&&bC(t),g=e[Bt],v=tk(e);let k=!0;if(3&u.type||o){const C=Dn(u,e),F=o?o(C):C,A=v.length,z=o?L=>o(kt(L[u.index])):u.index;let M=null;if(!o&&d&&(M=function WX(t,e,a,u){const i=t.cleanup;if(null!=i)for(let r=0;rh?d[h]:null}"string"==typeof o&&(r+=2)}return null}(t,e,i,u.index)),null!==M){(M.__ngLastListenerFn__||M).__ngNextListenerFn__=r,M.__ngLastListenerFn__=r,k=!1}else{r=NI(u,e,g,r),MI(C,i,r);const L=a.listen(F,i,r);v.push(r,L),m&&m.push(i,z,A,A+1)}}else r=NI(u,e,g,r);const x=u.outputs;let D;if(k&&null!==x&&(D=x[i])){const C=D.length;if(C)for(let F=0;F-1?ar(t.index,e):e,5);let d=PI(e,a,u,r),h=i.__ngNextListenerFn__;for(;h;)d=PI(e,a,h,r)&&d,h=h.__ngNextListenerFn__;return d}}function dt(t=1){return function yD(t){return(oa.lFrame.contextLView=Vd(t,oa.lFrame.contextLView))[Bt]}(t)}function UX(t,e){let a=null;const u=function Dm(t){const e=t.attrs;if(null!=e){const a=e.indexOf(5);if(!(1&a))return e[a+1]}return null}(t);for(let i=0;i=t.data.length&&(t.data[a]=null,t.blueprint[a]=null),e[a]=u}function w0(t){return bs(Hr(),Ge+t)}function B0(t,e=""){const a=q(),u=_a(),i=t+Ge,r=u.firstCreatePass?Ss(u,i,1,e,null):u.data[i],o=eR(u,a,r,e,t);a[i]=o,Vm()&&ig(u,a,o,r),In(r,!1)}let eR=(t,e,a,u,i)=>(Ll(!0),Rb(e[ga],u));function $1(t){return u_("",t,""),$1}function u_(t,e,a){const u=q(),i=Gg(u,t,e,a);return i!==Fa&&y0(u,rn(),i),u_}const cR={};function WS(t,e,a,u,i){if(t=We(t),Array.isArray(t))for(let r=0;r>20;if(Ld(t)||!t.multi){const x=new Om(m,i,X),D=JS(h,e,i?g:g+k,v);-1===D?($5(B3(d,o),r,h),US(r,t,e.length),e.push(h),d.directiveStart++,d.directiveEnd++,i&&(d.providerIndexes+=1048576),a.push(x),o.push(x)):(a[D]=x,o[D]=x)}else{const x=JS(h,e,g+k,v),D=JS(h,e,g,g+k),C=x>=0&&a[x],F=D>=0&&a[D];if(i&&!F||!i&&!C){$5(B3(d,o),r,h);const A=function pee(t,e,a,u,i){const r=new Om(t,a,X);return r.multi=[],r.index=e,r.componentProviders=0,mR(r,i,u&&!a),r}(i?mee:hee,a.length,i,u,m);!i&&F&&(a[D].providerFactory=A),US(r,t,e.length,0),e.push(h),d.directiveStart++,d.directiveEnd++,i&&(d.providerIndexes+=1048576),a.push(A),o.push(A)}else{US(r,t,x>-1?x:D,mR(a[i?D:x],m,!i&&u))}!i&&u&&F&&a[D].componentProviders++}}}function US(t,e,a,u){const i=Ld(e),r=function zA(t){return!!t.useClass}(e);if(i||r){const h=(r?We(e.useClass):e).prototype.ngOnDestroy;if(h){const m=t.destroyHooks||(t.destroyHooks=[]);if(!i&&e.multi){const g=m.indexOf(a);-1===g?m.push(a,[u,h]):m[g+1].push(u,h)}else m.push(a,h)}}}function mR(t,e,a){return a&&t.componentProviders++,t.multi.push(e)-1}function JS(t,e,a,u){for(let i=a;i{a.providersResolver=(u,i)=>function cee(t,e,a){const u=_a();if(u.firstCreatePass){const i=_u(t);WS(a,u.data,u.blueprint,i,!0),WS(e,u.data,u.blueprint,i,!1)}}(u,i?i(t):t,e)}}class i_{constructor(e){this._injector=e,this.cachedInjectors=new Map}getOrCreateStandaloneInjector(e){if(!e.standalone)return null;if(!this.cachedInjectors.has(e)){const a=_m(0,e.type),u=a.length>0?_([a],this._injector,`Standalone[${e.type.name}]`):null;this.cachedInjectors.set(e,u)}return this.cachedInjectors.get(e)}ngOnDestroy(){try{for(const e of this.cachedInjectors.values())null!==e&&e.destroy()}finally{this.cachedInjectors.clear()}}static#e=this.\u0275prov=oe({token:i_,providedIn:"environment",factory:()=>new i_(ye(tn))})}function ix(t){Ui("NgStandalone"),t.getStandaloneInjector=e=>e.get(i_).getOrCreateStandaloneInjector(t)}function n_(t){if("function"==typeof t)return t;const e=Yn(t);return e.some(Cl)?()=>e.map(We).map(pR):e.map(pR)}function pR(t){return Ak(t)?t.ngModule:t}function I4(t,e,a,u){return kR(q(),Rn(),t,e,a,u)}function ER(t,e,a,u,i){return xR(q(),Rn(),t,e,a,u,i)}function vR(t,e,a,u,i,r){return fR(q(),Rn(),t,e,a,u,i,r)}function bR(t,e,a,u,i,r,o){return DR(q(),Rn(),t,e,a,u,i,r,o)}function nx(t,e){const a=t[e];return a===Fa?void 0:a}function kR(t,e,a,u,i,r){const o=e+a;return et(t,o,i)?Fe(t,o+1,r?u.call(r,i):u(i)):nx(t,o+1)}function xR(t,e,a,u,i,r,o){const d=e+a;return Yu(t,d,i,r)?Fe(t,d+2,o?u.call(o,i,r):u(i,r)):nx(t,d+2)}function fR(t,e,a,u,i,r,o,d){const h=e+a;return xo(t,h,i,r,o)?Fe(t,h+3,d?u.call(d,i,r,o):u(i,r,o)):nx(t,h+3)}function DR(t,e,a,u,i,r,o,d,h){const m=e+a;return On(t,m,i,r,o,d)?Fe(t,m+4,h?u.call(h,i,r,o,d):u(i,r,o,d)):nx(t,m+4)}function CR(t,e,a,u,i,r){let o=e+a,d=!1;for(let h=0;h{const u=(Array.isArray(t)?t:t()).map(i=>"function"==typeof i?{directive:We(i),inputs:Gi,outputs:Gi}:{directive:We(i.directive),inputs:Iy(i.inputs),outputs:Iy(i.outputs)});null===a.hostDirectives?(a.findHostDirectiveDefs=pS,a.hostDirectives=u):a.hostDirectives.unshift(...u)};return e.ngInherit=!0,e},\u0275\u0275NgOnChangesFeature:nn,\u0275\u0275ProvidersFeature:Bu,\u0275\u0275CopyDefinitionFeature:function hS(t){let a,e=Ny(t.type);a=_u(t)?e.\u0275cmp:e.\u0275dir;const u=t;for(const i of cS)u[i]=a[i];if(_u(a))for(const i of mN)u[i]=a[i]},\u0275\u0275InheritDefinitionFeature:Ht,\u0275\u0275InputTransformsFeature:s,\u0275\u0275StandaloneFeature:ix,\u0275\u0275nextContext:dt,\u0275\u0275namespaceHTML:function FD(){!function Cs(){oa.lFrame.currentNamespace=null}()},\u0275\u0275namespaceMathML:function O5(){oa.lFrame.currentNamespace="math"},\u0275\u0275namespaceSVG:function _D(){oa.lFrame.currentNamespace="svg"},\u0275\u0275enableBindings:function x1(){oa.bindingsEnabled=!0},\u0275\u0275disableBindings:function m0(){oa.bindingsEnabled=!1},\u0275\u0275elementStart:eu,\u0275\u0275elementEnd:wu,\u0275\u0275element:J1,\u0275\u0275elementContainerStart:$y,\u0275\u0275elementContainerEnd:qy,\u0275\u0275elementContainer:Yy,\u0275\u0275pureFunction0:function bee(t,e,a){const u=Rn()+t,i=q();return i[u]===Fa?Fe(i,u,a?e.call(a):e()):Aa(i,u)},\u0275\u0275pureFunction1:I4,\u0275\u0275pureFunction2:ER,\u0275\u0275pureFunction3:vR,\u0275\u0275pureFunction4:bR,\u0275\u0275pureFunction5:function kee(t,e,a,u,i,r,o,d){const h=Rn()+t,m=q(),g=On(m,h,a,u,i,r);return et(m,h+4,o)||g?Fe(m,h+5,d?e.call(d,a,u,i,r,o):e(a,u,i,r,o)):Aa(m,h+5)},\u0275\u0275pureFunction6:function xee(t,e,a,u,i,r,o,d,h){const m=Rn()+t,g=q(),v=On(g,m,a,u,i,r);return Yu(g,m+4,o,d)||v?Fe(g,m+6,h?e.call(h,a,u,i,r,o,d):e(a,u,i,r,o,d)):Aa(g,m+6)},\u0275\u0275pureFunction7:function fee(t,e,a,u,i,r,o,d,h,m){const g=Rn()+t,v=q();let k=On(v,g,a,u,i,r);return xo(v,g+4,o,d,h)||k?Fe(v,g+7,m?e.call(m,a,u,i,r,o,d,h):e(a,u,i,r,o,d,h)):Aa(v,g+7)},\u0275\u0275pureFunction8:function Dee(t,e,a,u,i,r,o,d,h,m,g){const v=Rn()+t,k=q(),x=On(k,v,a,u,i,r);return On(k,v+4,o,d,h,m)||x?Fe(k,v+8,g?e.call(g,a,u,i,r,o,d,h,m):e(a,u,i,r,o,d,h,m)):Aa(k,v+8)},\u0275\u0275pureFunctionV:function Cee(t,e,a,u){return CR(q(),Rn(),t,e,a,u)},\u0275\u0275getCurrentView:Z1,\u0275\u0275restoreView:nt,\u0275\u0275listener:Qu,\u0275\u0275projection:t_,\u0275\u0275syntheticHostProperty:function dI(t,e,a){const u=q();if(et(u,bo(),e)){const r=_a(),o=le();or(r,o,u,t,e,kC(ur(r.data),o,u),a,!0)}return dI},\u0275\u0275syntheticHostListener:function TI(t,e){const a=St(),u=q(),i=_a();return OS(i,u,kC(ur(i.data),a,u),a,t,e),TI},\u0275\u0275pipeBind1:function Fee(t,e,a){const u=t+Ge,i=q(),r=bs(i,u);return rx(i,u)?kR(i,Rn(),e,r.transform,a,r):r.transform(a)},\u0275\u0275pipeBind2:function Aee(t,e,a,u){const i=t+Ge,r=q(),o=bs(r,i);return rx(r,i)?xR(r,Rn(),e,o.transform,a,u,o):o.transform(a,u)},\u0275\u0275pipeBind3:function wee(t,e,a,u,i){const r=t+Ge,o=q(),d=bs(o,r);return rx(o,r)?fR(o,Rn(),e,d.transform,a,u,i,d):d.transform(a,u,i)},\u0275\u0275pipeBind4:function Bee(t,e,a,u,i,r){const o=t+Ge,d=q(),h=bs(d,o);return rx(d,o)?DR(d,Rn(),e,h.transform,a,u,i,r,h):h.transform(a,u,i,r)},\u0275\u0275pipeBindV:function See(t,e,a){const u=t+Ge,i=q(),r=bs(i,u);return rx(i,u)?CR(i,Rn(),e,r.transform,a,r):r.transform.apply(r,a)},\u0275\u0275projectionDef:a_,\u0275\u0275hostProperty:function sI(t,e,a){const u=q();if(et(u,bo(),e)){or(_a(),le(),u,t,e,u[ga],a,!0)}return sI},\u0275\u0275property:ki,\u0275\u0275propertyInterpolate:jS,\u0275\u0275propertyInterpolate1:GS,\u0275\u0275propertyInterpolate2:function II(t,e,a,u,i,r,o){const d=q(),h=Kg(d,e,a,u,i,r);if(h!==Fa){or(_a(),le(),d,t,h,d[ga],o,!1)}return II},\u0275\u0275propertyInterpolate3:function RI(t,e,a,u,i,r,o,d,h){const m=q(),g=Wg(m,e,a,u,i,r,o,d);if(g!==Fa){or(_a(),le(),m,t,g,m[ga],h,!1)}return RI},\u0275\u0275propertyInterpolate4:function HI(t,e,a,u,i,r,o,d,h,m,g){const v=q(),k=Ug(v,e,a,u,i,r,o,d,h,m);if(k!==Fa){or(_a(),le(),v,t,k,v[ga],g,!1)}return HI},\u0275\u0275propertyInterpolate5:function VI(t,e,a,u,i,r,o,d,h,m,g,v,k){const x=q(),D=Jg(x,e,a,u,i,r,o,d,h,m,g,v);if(D!==Fa){or(_a(),le(),x,t,D,x[ga],k,!1)}return VI},\u0275\u0275propertyInterpolate6:function OI(t,e,a,u,i,r,o,d,h,m,g,v,k,x,D){const C=q(),F=Zg(C,e,a,u,i,r,o,d,h,m,g,v,k,x);if(F!==Fa){or(_a(),le(),C,t,F,C[ga],D,!1)}return OI},\u0275\u0275propertyInterpolate7:function jI(t,e,a,u,i,r,o,d,h,m,g,v,k,x,D,C,F){const A=q(),z=$g(A,e,a,u,i,r,o,d,h,m,g,v,k,x,D,C);if(z!==Fa){or(_a(),le(),A,t,z,A[ga],F,!1)}return jI},\u0275\u0275propertyInterpolate8:function GI(t,e,a,u,i,r,o,d,h,m,g,v,k,x,D,C,F,A,z){const M=q(),L=qg(M,e,a,u,i,r,o,d,h,m,g,v,k,x,D,C,F,A);if(L!==Fa){or(_a(),le(),M,t,L,M[ga],z,!1)}return GI},\u0275\u0275propertyInterpolateV:function KI(t,e,a){const u=q(),i=jg(u,e);if(i!==Fa){or(_a(),le(),u,t,i,u[ga],a,!1)}return KI},\u0275\u0275pipe:function yee(t,e){const a=_a();let u;const i=t+Ge;a.firstCreatePass?(u=function _ee(t,e){if(e)for(let a=e.length-1;a>=0;a--){const u=e[a];if(t===u.name)return u}}(e,a.pipeRegistry),a.data[i]=u,u.onDestroy&&(a.destroyHooks??=[]).push(i,u.onDestroy)):u=a.data[i];const r=u.factory||(u.factory=ns(u.type)),d=En(X);try{const h=y1(!1),m=r();return y1(h),KS(a,q(),i,m),m}finally{En(d)}},\u0275\u0275queryRefresh:Li,\u0275\u0275queryAdvance:function qX(t=1){Ml(V5()+t)},\u0275\u0275viewQuery:N4,\u0275\u0275viewQuerySignal:function $X(t,e,a,u){Gk(t,by(e,a,u))},\u0275\u0275loadQuery:Ti,\u0275\u0275contentQuery:Wr,\u0275\u0275contentQuerySignal:function ZX(t,e,a,u,i){Gk(e,ky(t,a,u,i))},\u0275\u0275reference:w0,\u0275\u0275classMap:function CQ(t){A0(BQ,Hs,t,!0)},\u0275\u0275classMapInterpolate1:function MQ(t,e,a){A0(Qn,Hs,Gg(q(),t,e,a),!0)},\u0275\u0275classMapInterpolate2:function LQ(t,e,a,u,i){A0(Qn,Hs,Kg(q(),t,e,a,u,i),!0)},\u0275\u0275classMapInterpolate3:function TQ(t,e,a,u,i,r,o){A0(Qn,Hs,Wg(q(),t,e,a,u,i,r,o),!0)},\u0275\u0275classMapInterpolate4:function PQ(t,e,a,u,i,r,o,d,h){A0(Qn,Hs,Ug(q(),t,e,a,u,i,r,o,d,h),!0)},\u0275\u0275classMapInterpolate5:function NQ(t,e,a,u,i,r,o,d,h,m,g){A0(Qn,Hs,Jg(q(),t,e,a,u,i,r,o,d,h,m,g),!0)},\u0275\u0275classMapInterpolate6:function IQ(t,e,a,u,i,r,o,d,h,m,g,v,k){A0(Qn,Hs,Zg(q(),t,e,a,u,i,r,o,d,h,m,g,v,k),!0)},\u0275\u0275classMapInterpolate7:function RQ(t,e,a,u,i,r,o,d,h,m,g,v,k,x,D){A0(Qn,Hs,$g(q(),t,e,a,u,i,r,o,d,h,m,g,v,k,x,D),!0)},\u0275\u0275classMapInterpolate8:function HQ(t,e,a,u,i,r,o,d,h,m,g,v,k,x,D,C,F){A0(Qn,Hs,qg(q(),t,e,a,u,i,r,o,d,h,m,g,v,k,x,D,C,F),!0)},\u0275\u0275classMapInterpolateV:function VQ(t){A0(Qn,Hs,jg(q(),t),!0)},\u0275\u0275styleMap:Rs,\u0275\u0275styleMapInterpolate1:function YX(t,e,a){Rs(Gg(q(),t,e,a))},\u0275\u0275styleMapInterpolate2:function QX(t,e,a,u,i){Rs(Kg(q(),t,e,a,u,i))},\u0275\u0275styleMapInterpolate3:function XX(t,e,a,u,i,r,o){Rs(Wg(q(),t,e,a,u,i,r,o))},\u0275\u0275styleMapInterpolate4:function eee(t,e,a,u,i,r,o,d,h){Rs(Ug(q(),t,e,a,u,i,r,o,d,h))},\u0275\u0275styleMapInterpolate5:function aee(t,e,a,u,i,r,o,d,h,m,g){Rs(Jg(q(),t,e,a,u,i,r,o,d,h,m,g))},\u0275\u0275styleMapInterpolate6:function tee(t,e,a,u,i,r,o,d,h,m,g,v,k){Rs(Zg(q(),t,e,a,u,i,r,o,d,h,m,g,v,k))},\u0275\u0275styleMapInterpolate7:function uee(t,e,a,u,i,r,o,d,h,m,g,v,k,x,D){Rs($g(q(),t,e,a,u,i,r,o,d,h,m,g,v,k,x,D))},\u0275\u0275styleMapInterpolate8:function iee(t,e,a,u,i,r,o,d,h,m,g,v,k,x,D,C,F){Rs(qg(q(),t,e,a,u,i,r,o,d,h,m,g,v,k,x,D,C,F))},\u0275\u0275styleMapInterpolateV:function nee(t){Rs(jg(q(),t))},\u0275\u0275styleProp:zS,\u0275\u0275stylePropInterpolate1:function WI(t,e,a,u,i){return F0(t,Gg(q(),e,a,u),i,!1),WI},\u0275\u0275stylePropInterpolate2:function UI(t,e,a,u,i,r,o){return F0(t,Kg(q(),e,a,u,i,r),o,!1),UI},\u0275\u0275stylePropInterpolate3:function JI(t,e,a,u,i,r,o,d,h){return F0(t,Wg(q(),e,a,u,i,r,o,d),h,!1),JI},\u0275\u0275stylePropInterpolate4:function ZI(t,e,a,u,i,r,o,d,h,m,g){return F0(t,Ug(q(),e,a,u,i,r,o,d,h,m),g,!1),ZI},\u0275\u0275stylePropInterpolate5:function $I(t,e,a,u,i,r,o,d,h,m,g,v,k){return F0(t,Jg(q(),e,a,u,i,r,o,d,h,m,g,v),k,!1),$I},\u0275\u0275stylePropInterpolate6:function qI(t,e,a,u,i,r,o,d,h,m,g,v,k,x,D){return F0(t,Zg(q(),e,a,u,i,r,o,d,h,m,g,v,k,x),D,!1),qI},\u0275\u0275stylePropInterpolate7:function YI(t,e,a,u,i,r,o,d,h,m,g,v,k,x,D,C,F){return F0(t,$g(q(),e,a,u,i,r,o,d,h,m,g,v,k,x,D,C),F,!1),YI},\u0275\u0275stylePropInterpolate8:function QI(t,e,a,u,i,r,o,d,h,m,g,v,k,x,D,C,F,A,z){return F0(t,qg(q(),e,a,u,i,r,o,d,h,m,g,v,k,x,D,C,F,A),z,!1),QI},\u0275\u0275stylePropInterpolateV:function XI(t,e,a){return F0(t,jg(q(),e),a,!1),XI},\u0275\u0275classProp:cr,\u0275\u0275advance:$a,\u0275\u0275template:Ji,\u0275\u0275conditional:Qo,\u0275\u0275defer:function JY(t,e,a,u,i,r,o,d,h){const m=q(),g=_a(),v=t+Ge,k=$k(m,g,t,null,0,0);if(g.firstCreatePass){Ui("NgDefer");const F={primaryTmplIndex:e,loadingTmplIndex:u??null,placeholderTmplIndex:i??null,errorTmplIndex:r??null,placeholderBlockConfig:null,loadingBlockConfig:null,dependencyResolverFn:a??null,loadingState:vi.NOT_STARTED,loadingPromise:null,providers:null};h?.(g,F,d,o),function IY(t,e,a){const u=jy(e);t.data[u]=a}(g,v,F)}cc(m[v],k,m);const D=[null,Pg.Initial,null,null,null,null];!function NY(t,e,a){t[Ee],t[jy(e)]=a}(m,v,D);const C=()=>kN(D);Oy(0,D,()=>E1(m,C)),xs(m,C)},\u0275\u0275deferWhen:function ZY(t){const e=q();if(et(e,bo(),t)){const u=pe(null);try{const i=!!t,r=le(),d=L4(e,r)[Hy];!1===i&&d===Pg.Initial?Vg(e,r):!0===i&&(d===Pg.Initial||d===bi.Placeholder)&&Og(e,r)}finally{pe(u)}}},\u0275\u0275deferOnIdle:function qY(){SN(AN)},\u0275\u0275deferOnImmediate:function QY(){const t=q(),e=St(),a=t[Ee],u=t[gi],i=Yo(a,e);(!CS(u)||null===i.loadingTmplIndex)&&Vg(t,e),Og(t,e)},\u0275\u0275deferOnTimer:function eQ(t){SN(wN(t))},\u0275\u0275deferOnHover:function tQ(t,e){const a=q(),u=St();Vg(a,u),Hg(a,u,t,e,_N,()=>Og(a,u),0)},\u0275\u0275deferOnInteraction:function iQ(t,e){const a=q(),u=St();Vg(a,u),Hg(a,u,t,e,yN,()=>Og(a,u),0)},\u0275\u0275deferOnViewport:function rQ(t,e){const a=q(),u=St();Vg(a,u),Hg(a,u,t,e,FN,()=>Og(a,u),0)},\u0275\u0275deferPrefetchWhen:function $Y(t){const e=q();if(et(e,bo(),t)){const u=pe(null);try{const i=!!t,r=e[Ee],o=le(),d=Yo(r,o);!0===i&&d.loadingState===vi.NOT_STARTED&&Yk(d,e,o)}finally{pe(u)}}},\u0275\u0275deferPrefetchOnIdle:function YY(){zN(AN)},\u0275\u0275deferPrefetchOnImmediate:function XY(){const t=q(),e=St(),u=Yo(t[Ee],e);u.loadingState===vi.NOT_STARTED&&FS(u,t,e)},\u0275\u0275deferPrefetchOnTimer:function aQ(t){zN(wN(t))},\u0275\u0275deferPrefetchOnHover:function uQ(t,e){const a=q(),u=St(),r=Yo(a[Ee],u);r.loadingState===vi.NOT_STARTED&&Hg(a,u,t,e,_N,()=>Yk(r,a,u),1)},\u0275\u0275deferPrefetchOnInteraction:function nQ(t,e){const a=q(),u=St(),r=Yo(a[Ee],u);r.loadingState===vi.NOT_STARTED&&Hg(a,u,t,e,yN,()=>Yk(r,a,u),1)},\u0275\u0275deferPrefetchOnViewport:function oQ(t,e){const a=q(),u=St(),r=Yo(a[Ee],u);r.loadingState===vi.NOT_STARTED&&Hg(a,u,t,e,FN,()=>Yk(r,a,u),1)},\u0275\u0275deferEnableTimerScheduling:function UY(t,e,a,u){const i=t.consts;null!=a&&(e.placeholderBlockConfig=Za(i,a)),null!=u&&(e.loadingBlockConfig=Za(i,u)),null===yS&&(yS=sQ)},\u0275\u0275repeater:IS,\u0275\u0275repeaterCreate:NS,\u0275\u0275repeaterTrackByIndex:function KQ(t){return t},\u0275\u0275repeaterTrackByIdentity:function WQ(t,e){return e},\u0275\u0275componentInstance:LS,\u0275\u0275text:B0,\u0275\u0275textInterpolate:$1,\u0275\u0275textInterpolate1:u_,\u0275\u0275textInterpolate2:function aR(t,e,a,u,i){const r=q(),o=Kg(r,t,e,a,u,i);return o!==Fa&&y0(r,rn(),o),aR},\u0275\u0275textInterpolate3:function tR(t,e,a,u,i,r,o){const d=q(),h=Wg(d,t,e,a,u,i,r,o);return h!==Fa&&y0(d,rn(),h),tR},\u0275\u0275textInterpolate4:function uR(t,e,a,u,i,r,o,d,h){const m=q(),g=Ug(m,t,e,a,u,i,r,o,d,h);return g!==Fa&&y0(m,rn(),g),uR},\u0275\u0275textInterpolate5:function iR(t,e,a,u,i,r,o,d,h,m,g){const v=q(),k=Jg(v,t,e,a,u,i,r,o,d,h,m,g);return k!==Fa&&y0(v,rn(),k),iR},\u0275\u0275textInterpolate6:function nR(t,e,a,u,i,r,o,d,h,m,g,v,k){const x=q(),D=Zg(x,t,e,a,u,i,r,o,d,h,m,g,v,k);return D!==Fa&&y0(x,rn(),D),nR},\u0275\u0275textInterpolate7:function rR(t,e,a,u,i,r,o,d,h,m,g,v,k,x,D){const C=q(),F=$g(C,t,e,a,u,i,r,o,d,h,m,g,v,k,x,D);return F!==Fa&&y0(C,rn(),F),rR},\u0275\u0275textInterpolate8:function oR(t,e,a,u,i,r,o,d,h,m,g,v,k,x,D,C,F){const A=q(),z=qg(A,t,e,a,u,i,r,o,d,h,m,g,v,k,x,D,C,F);return z!==Fa&&y0(A,rn(),z),oR},\u0275\u0275textInterpolateV:function lR(t){const e=q(),a=jg(e,t);return a!==Fa&&y0(e,rn(),a),lR},\u0275\u0275i18n:function OX(t,e,a){BI(t,e,a),SI()},\u0275\u0275i18nAttributes:function jX(t,e){const a=_a(),u=Za(a.consts,e);!function yX(t,e,a){const i=St().index,r=[];if(t.firstCreatePass&&null===t.data[e]){for(let o=0;o0){const u=t.data[a];vI(t,e,Array.isArray(u)?u:u.update,p0()-ex-1,Xk)}Xk=0,ex=0}(_a(),q(),t+Ge)},\u0275\u0275i18nPostprocess:function KX(t,e={}){return function VX(t,e={}){let a=t;if(LX.test(t)){const u={},i=[wI];a=a.replace(TX,(r,o,d)=>{const h=o||d,m=u[h]||[];if(m.length||(h.split("|").forEach(C=>{const F=C.match(HX),A=F?parseInt(F[1],10):wI,z=RX.test(C);m.push([A,z,C])}),u[h]=m),!m.length)throw new Error(`i18n postprocess: unmatched placeholder - ${h}`);const g=i[i.length-1];let v=0;for(let C=0;Ce.hasOwnProperty(r)?`${i}${e[r]}${h}`:u),a=a.replace(NX,(u,i)=>e.hasOwnProperty(i)?e[i]:u),a=a.replace(IX,(u,i)=>{if(e.hasOwnProperty(i)){const r=e[i];if(!r.length)throw new Error(`i18n postprocess: unmatched ICU - ${u} with key: ${i}`);return r.shift()}return u})),a}(t,e)},\u0275\u0275resolveWindow:function D8(t){return t.ownerDocument.defaultView},\u0275\u0275resolveDocument:function C8(t){return t.ownerDocument},\u0275\u0275resolveBody:Z6,\u0275\u0275setComponentScope:function gee(t,e,a){const u=t.\u0275cmp;u.directiveDefs=v3(e,!1),u.pipeDefs=v3(a,!0)},\u0275\u0275setNgModuleScope:function Eee(t,e){return Zu(()=>{const a=Nn(t,!0);a.declarations=n_(e.declarations||La),a.imports=n_(e.imports||La),a.exports=n_(e.exports||La),e.bootstrap&&(a.bootstrap=n_(e.bootstrap)),j1.registerNgModule(t,e)})},\u0275\u0275registerNgModuleType:Py,\u0275\u0275getComponentDepsFactory:function zee(t,e){return()=>{try{return j1.getComponentDependencies(t,e).dependencies}catch(a){throw console.error(`Computing dependencies in local compilation mode for the component "${t.name}" failed with the exception:`,a),a}}},\u0275setClassDebugInfo:function Mee(t,e){const a=pa(t);null!==a&&(a.debugInfo=e)},\u0275\u0275declareLet:function hR(t){const e=_a(),a=q(),u=t+Ge;return In(Ss(e,u,128,null,null),!1),KS(e,a,u,cR),hR},\u0275\u0275storeLet:function see(t){return Ui("NgLet"),KS(_a(),q(),rn(),t),t},\u0275\u0275readContextLet:function dee(t){const a=bs(Hr(),Ge+t);if(a===cR)throw new Z(314,!1);return a},\u0275\u0275sanitizeHtml:function o8(t){const e=o4();return e?F6(e.sanitize(Or.HTML,t)||""):Rl(t,"HTML")?F6(rr(t)):H6(g0(),Ca(t))},\u0275\u0275sanitizeStyle:function l8(t){const e=o4();return e?e.sanitize(Or.STYLE,t)||"":Rl(t,"Style")?rr(t):Ca(t)},\u0275\u0275sanitizeResourceUrl:O6,\u0275\u0275sanitizeScript:function s8(t){const e=o4();if(e)return A6(e.sanitize(Or.SCRIPT,t)||"");if(Rl(t,"Script"))return A6(rr(t));throw new Z(905,!1)},\u0275\u0275sanitizeUrl:V6,\u0275\u0275sanitizeUrlOrResourceUrl:j6,\u0275\u0275trustConstantHtml:function d8(t){return L1(t[0])},\u0275\u0275trustConstantResourceUrl:function c8(t){return function i4(t){return _b()?.createScriptURL(t)||t}(t[0])},\u0275\u0275validateIframeAttribute:function rS(t,e,a){const u=q(),i=le(),r=Dn(i,u);if(2===i.type&&"iframe"===e.toLowerCase()){const o=r;o.src="",o.srcdoc=L1(""),d4(u[ga],o);throw new Z(-910,!1)}return t},forwardRef:It,resolveForwardRef:We,\u0275\u0275twoWayProperty:function sR(t,e,a){Cy(e)&&(e=e());const u=q();if(et(u,bo(),e)){or(_a(),le(),u,t,e,u[ga],a,!1)}return sR},\u0275\u0275twoWayBindingSet:function lee(t,e){const a=Cy(t);return a&&t.set(e),a},\u0275\u0275twoWayListener:function dR(t,e){const a=q(),u=_a(),i=St();return OS(u,a,a[ga],i,t,e),dR}};let eE=null;const ox=[];let $S=!1;function yR(t){return Array.isArray(t)?t.every(yR):!!We(t)}function Iee(t,e={}){(function Ree(t,e,a=!1){const u=Yn(e.declarations||La);let i=null;Object.defineProperty(t,pt,{configurable:!0,get:()=>(null===i&&(i=pi().compileNgModule(Ur,`ng:///${t.name}/\u0275mod.js`,{type:t,bootstrap:Yn(e.bootstrap||La).map(We),declarations:u.map(We),imports:Yn(e.imports||La).map(We).map(wR),exports:Yn(e.exports||La).map(We).map(wR),schemas:e.schemas?Yn(e.schemas):null,id:e.id||null}),i.schemas||(i.schemas=[])),i)});let r=null;Object.defineProperty(t,Ba,{get:()=>{if(null===r){const d=pi();r=d.compileFactory(Ur,`ng:///${t.name}/\u0275fac.js`,{name:t.name,type:t,deps:L3(t),target:d.FactoryTarget.NgModule,typeArgumentCount:0})}return r},configurable:!1});let o=null;Object.defineProperty(t,Lr,{get:()=>{if(null===o){const d={name:t.name,type:t,providers:e.providers||La,imports:[(e.imports||La).map(We),(e.exports||La).map(We)]};o=pi().compileInjector(Ur,`ng:///${t.name}/\u0275inj.js`,d)}return o},configurable:!1})})(t,e),void 0!==e.id&&Py(t,e.id),function Pee(t,e){ox.push({moduleType:t,ngModule:e})}(t,e)}function Oee(t,e){const a=Yn(e.declarations||La),u=aE(t);a.forEach(i=>{if((i=We(i)).hasOwnProperty(Fd)){AR(pa(i),u)}else!i.hasOwnProperty(p5)&&!i.hasOwnProperty(ha)&&(i.ngSelectorScope=t)})}function AR(t,e){t.directiveDefs=()=>Array.from(e.compilation.directives).map(a=>a.hasOwnProperty(Fd)?pa(a):mi(a)).filter(a=>!!a),t.pipeDefs=()=>Array.from(e.compilation.pipes).map(a=>Mt(a)),t.schemas=e.schemas,t.tView=null}function aE(t){if(Ns(t)){if(wk){const e=j1.getNgModuleScope(t);return{schemas:Nn(t,!0).schemas||null,...e}}return function jee(t){const e=Nn(t,!0);if(null!==e.transitiveCompileScopes)return e.transitiveCompileScopes;const a={schemas:e.schemas||null,compilation:{directives:new Set,pipes:new Set},exported:{directives:new Set,pipes:new Set}};return jr(e.imports).forEach(u=>{const i=aE(u);i.exported.directives.forEach(r=>a.compilation.directives.add(r)),i.exported.pipes.forEach(r=>a.compilation.pipes.add(r))}),jr(e.declarations).forEach(u=>{Mt(u)?a.compilation.pipes.add(u):a.compilation.directives.add(u)}),jr(e.exports).forEach(u=>{const i=u;if(Ns(i)){const r=aE(i);r.exported.directives.forEach(o=>{a.compilation.directives.add(o),a.exported.directives.add(o)}),r.exported.pipes.forEach(o=>{a.compilation.pipes.add(o),a.exported.pipes.add(o)})}else Mt(i)?a.exported.pipes.add(i):a.exported.directives.add(i)}),e.transitiveCompileScopes=a,a}(t)}if(u0(t)){if(null!==(pa(t)||mi(t)))return{schemas:null,compilation:{directives:new Set,pipes:new Set},exported:{directives:new Set([t]),pipes:new Set}};if(null!==Mt(t))return{schemas:null,compilation:{directives:new Set,pipes:new Set},exported:{directives:new Set,pipes:new Set([t])}}}throw new Error(`${t.name} does not have a module def (\u0275mod property)`)}function wR(t){return Ak(t)?t.ngModule:t}let QS=0;function Gee(t,e){let a=null;(function S4(t,e){Sy(e)&&(G1.set(t,e),Tg.add(t))})(t,e),zR(t,e),Object.defineProperty(t,Fd,{get:()=>{if(null===a){const u=pi();if(Sy(e)){const m=[`Component '${t.name}' is not resolved:`];throw e.templateUrl&&m.push(` - templateUrl: ${e.templateUrl}`),e.styleUrls&&e.styleUrls.length&&m.push(` - styleUrls: ${JSON.stringify(e.styleUrls)}`),e.styleUrl&&m.push(` - styleUrl: ${e.styleUrl}`),m.push("Did you run and wait for 'resolveComponentResources()'?"),new Error(m.join("\n"))}const i=function Tee(){return eE}();let r=e.preserveWhitespaces;void 0===r&&(r=null!==i&&void 0!==i.preserveWhitespaces&&i.preserveWhitespaces);let o=e.encapsulation;void 0===o&&(o=null!==i&&void 0!==i.defaultEncapsulation?i.defaultEncapsulation:Ga.Emulated);const d=e.templateUrl||`ng:///${t.name}/template.html`,h={...MR(t,e),typeSourceSpan:u.createParseSourceSpan("Component",t.name,d),template:e.template||"",preserveWhitespaces:r,styles:"string"==typeof e.styles?[e.styles]:e.styles||La,animations:e.animations,declarations:[],changeDetection:e.changeDetection,encapsulation:o,interpolation:e.interpolation,viewProviders:e.viewProviders||null};QS++;try{if(h.usesInheritance&&LR(t),a=u.compileComponent(Ur,d,h),e.standalone){const m=Yn(e.imports||La),{directiveDefs:g,pipeDefs:v}=function Kee(t,e){let a=null,u=null;return{directiveDefs:()=>{if(wk)return _4(t)?[...j1.getStandaloneComponentScope(t,e).compilation.directives].map(d=>pa(d)||mi(d)).filter(d=>null!==d):[];if(null===a){a=[pa(t)];const o=new Set([t]);for(const d of e){const h=We(d);if(!o.has(h))if(o.add(h),Nn(h)){const m=aE(h);for(const g of m.exported.directives){const v=pa(g)||mi(g);v&&!o.has(g)&&(o.add(g),a.push(v))}}else{const m=pa(h)||mi(h);m&&a.push(m)}}}return a},pipeDefs:()=>{if(wk)return _4(t)?[...j1.getStandaloneComponentScope(t,e).compilation.pipes].map(d=>Mt(d)).filter(d=>null!==d):[];if(null===u){u=[];const o=new Set;for(const d of e){const h=We(d);if(!o.has(h))if(o.add(h),Nn(h)){const m=aE(h);for(const g of m.exported.pipes){const v=Mt(g);v&&!o.has(g)&&(o.add(g),u.push(v))}}else{const m=Mt(h);m&&u.push(m)}}}return u}}}(t,m);a.directiveDefs=g,a.pipeDefs=v,a.dependencies=()=>m.map(We)}}finally{QS--}if(0===QS&&function Nee(){if(!$S){$S=!0;try{for(let t=ox.length-1;t>=0;t--){const{moduleType:e,ngModule:a}=ox[t];a.declarations&&a.declarations.every(yR)&&(ox.splice(t,1),Oee(e,a))}}finally{$S=!1}}}(),function Wee(t){return void 0!==t.ngSelectorScope}(t)){const m=aE(t.ngSelectorScope);AR(a,m)}if(e.schemas){if(!e.standalone)throw new Error(`The 'schemas' was specified for the ${Dt(t)} but is only valid on a component that is standalone.`);a.schemas=e.schemas}else e.standalone&&(a.schemas=[])}return a},configurable:!1})}function BR(t,e){let a=null;zR(t,e||{}),Object.defineProperty(t,p5,{get:()=>{if(null===a){const u=SR(t,e||{});a=pi().compileDirective(Ur,u.sourceMapUrl,u.metadata)}return a},configurable:!1})}function SR(t,e){const a=t&&t.name,u=`ng:///${a}/\u0275dir.js`,i=pi(),r=MR(t,e);return r.typeSourceSpan=i.createParseSourceSpan("Directive",a,u),r.usesInheritance&&LR(t),{metadata:r,sourceMapUrl:u}}function zR(t,e){let a=null;Object.defineProperty(t,Ba,{get:()=>{if(null===a){const u=SR(t,e),i=pi();a=i.compileFactory(Ur,`ng:///${t.name}/\u0275fac.js`,{name:u.metadata.name,type:u.metadata.type,typeArgumentCount:0,deps:L3(t),target:i.FactoryTarget.Directive})}return a},configurable:!1})}function Uee(t){return Object.getPrototypeOf(t.prototype)===Object.prototype}function MR(t,e){const a=M3(),u=a.ownPropMetadata(t);return{name:t.name,type:t,selector:void 0!==e.selector?e.selector:null,host:e.host||Gi,propMetadata:u,inputs:e.inputs||La,outputs:e.outputs||La,queries:TR(t,u,PR),lifecycle:{usesOnChanges:a.hasLifecycleHook(t,"ngOnChanges")},typeSourceSpan:null,usesInheritance:!Uee(t),exportAs:$ee(e.exportAs),providers:e.providers||null,viewQueries:TR(t,u,NR),isStandalone:!!e.standalone,isSignal:!!e.signals,hostDirectives:e.hostDirectives?.map(i=>"function"==typeof i?{directive:i}:i)||null}}function LR(t){const e=Object.prototype;let a=Object.getPrototypeOf(t.prototype).constructor;for(;a&&a!==e;)!mi(a)&&!pa(a)&&Yee(a)&&BR(a,null),a=Object.getPrototypeOf(a)}function Jee(t){return"string"==typeof t?RR(t):We(t)}function Zee(t,e){return{propertyName:t,predicate:Jee(e.selector),descendants:e.descendants,first:e.first,read:e.read?e.read:null,static:!!e.static,emitDistinctChangesOnly:!!e.emitDistinctChangesOnly,isSignal:!!e.isSignal}}function TR(t,e,a){const u=[];for(const i in e)if(e.hasOwnProperty(i)){const r=e[i];r.forEach(o=>{if(a(o)){if(!o.selector)throw new Error(`Can't construct a query for the property "${i}" of "${Dt(t)}" since the query selector wasn't defined.`);if(r.some(IR))throw new Error("Cannot combine @Input decorators with query decorators");u.push(Zee(i,o))}})}return u}function $ee(t){return void 0===t?null:RR(t)}function PR(t){const e=t.ngMetadataName;return"ContentChild"===e||"ContentChildren"===e}function NR(t){const e=t.ngMetadataName;return"ViewChild"===e||"ViewChildren"===e}function IR(t){return"Input"===t.ngMetadataName}function RR(t){return t.split(",").map(e=>e.trim())}const qee=["ngOnChanges","ngOnInit","ngOnDestroy","ngDoCheck","ngAfterViewInit","ngAfterViewChecked","ngAfterContentInit","ngAfterContentChecked"];function Yee(t){const e=M3();if(qee.some(u=>e.hasLifecycleHook(t,u)))return!0;const a=e.propMetadata(t);for(const u in a){const i=a[u];for(let r=0;rt,void 0,void 0,(t,e)=>BR(t,e)),ca=Xc("Component",(t={})=>({changeDetection:Oo.Default,...t}),Xee,void 0,(t,e)=>Gee(t,e)),Xo=(Xc("Pipe",t=>({pure:!0,...t}),void 0,void 0,(t,e)=>function Qee(t,e){let a=null,u=null;Object.defineProperty(t,Ba,{get:()=>{if(null===u){const i=HR(t,e),r=pi(i.type);u=r.compileFactory(Ur,`ng:///${i.name}/\u0275fac.js`,{name:i.name,type:i.type,typeArgumentCount:0,deps:L3(t),target:r.FactoryTarget.Pipe})}return u},configurable:!1}),Object.defineProperty(t,ha,{get:()=>{if(null===a){const i=HR(t,e);a=pi(i.type).compilePipe(Ur,`ng:///${i.name}/\u0275pipe.js`,i)}return a},configurable:!1})}(t,e)),e0("Input",t=>t?"string"==typeof t?{alias:t}:t:{})),l_=e0("Output",t=>({alias:t})),XS=(e0("HostBinding",t=>({hostPropertyName:t})),e0("HostListener",(t,e)=>({eventName:t,args:e})),Xc("NgModule",t=>t,void 0,void 0,(t,e)=>Iee(t,e)));class tE{constructor(e){this.full=e;const a=e.split(".");this.major=a[0],this.minor=a[1],this.patch=a.slice(2).join(".")}}new tE("18.1.3");class q1{log(e){console.log(e)}warn(e){console.warn(e)}static#e=this.\u0275fac=function(a){return new(a||q1)};static#a=this.\u0275prov=oe({token:q1,factory:q1.\u0275fac,providedIn:"platform"})}new class eae{constructor(){this.resolverToTokenToDependencies=new WeakMap,this.resolverToProviders=new WeakMap,this.standaloneInjectorToComponent=new WeakMap}reset(){this.resolverToTokenToDependencies=new WeakMap,this.resolverToProviders=new WeakMap,this.standaloneInjectorToComponent=new WeakMap}};const KR=new he(""),d_=new he("");class R4{constructor(e,a,u){this._ngZone=e,this.registry=a,this._isZoneStable=!0,this._callbacks=[],this.taskTrackingZone=null,az||(function _ae(t){az=t}(u),u.addToWindow(a)),this._watchAngularEvents(),e.run(()=>{this.taskTrackingZone=typeof Zone>"u"?null:Zone.current.get("TaskTrackingZone")})}_watchAngularEvents(){this._ngZone.onUnstable.subscribe({next:()=>{this._isZoneStable=!1}}),this._ngZone.runOutsideAngular(()=>{this._ngZone.onStable.subscribe({next:()=>{rt.assertNotInAngularZone(),queueMicrotask(()=>{this._isZoneStable=!0,this._runCallbacksIfReady()})}})})}isStable(){return this._isZoneStable&&!this._ngZone.hasPendingMacrotasks}_runCallbacksIfReady(){if(this.isStable())queueMicrotask(()=>{for(;0!==this._callbacks.length;){let e=this._callbacks.pop();clearTimeout(e.timeoutId),e.doneCb()}});else{let e=this.getPendingTasks();this._callbacks=this._callbacks.filter(a=>!a.updateCb||!a.updateCb(e)||(clearTimeout(a.timeoutId),!1))}}getPendingTasks(){return this.taskTrackingZone?this.taskTrackingZone.macroTasks.map(e=>({source:e.source,creationLocation:e.creationLocation,data:e.data})):[]}addCallback(e,a,u){let i=-1;a&&a>0&&(i=setTimeout(()=>{this._callbacks=this._callbacks.filter(r=>r.timeoutId!==i),e()},a)),this._callbacks.push({doneCb:e,timeoutId:i,updateCb:u})}whenStable(e,a,u){if(u&&!this.taskTrackingZone)throw new Error('Task tracking zone is required when passing an update callback to whenStable(). Is "zone.js/plugins/task-tracking" loaded?');this.addCallback(e,a,u),this._runCallbacksIfReady()}registerApplication(e){this.registry.registerApplication(e,this)}unregisterApplication(e){this.registry.unregisterApplication(e)}findProviders(e,a,u){return[]}static#e=this.\u0275fac=function(a){return new(a||R4)(ye(rt),ye(H4),ye(d_))};static#a=this.\u0275prov=oe({token:R4,factory:R4.\u0275fac})}class H4{constructor(){this._applications=new Map}registerApplication(e,a){this._applications.set(e,a)}unregisterApplication(e){this._applications.delete(e)}unregisterAllApplications(){this._applications.clear()}getTestability(e){return this._applications.get(e)||null}getAllTestabilities(){return Array.from(this._applications.values())}getAllRootElements(){return Array.from(this._applications.keys())}findTestabilityInTree(e,a=!0){return az?.findTestabilityInTree(this,e,a)??null}static#e=this.\u0275fac=function(a){return new(a||H4)};static#a=this.\u0275prov=oe({token:H4,factory:H4.\u0275fac,providedIn:"platform"})}let az;function sx(t){return!!t&&"function"==typeof t.then}function WR(t){return!!t&&"function"==typeof t.subscribe}const c_=new he("");class V4{constructor(){this.initialized=!1,this.done=!1,this.donePromise=new Promise((e,a)=>{this.resolve=e,this.reject=a}),this.appInits=U(c_,{optional:!0})??[]}runInitializers(){if(this.initialized)return;const e=[];for(const u of this.appInits){const i=u();if(sx(i))e.push(i);else if(WR(i)){const r=new Promise((o,d)=>{i.subscribe({complete:o,error:d})});e.push(r)}}const a=()=>{this.done=!0,this.resolve()};Promise.all(e).then(()=>{a()}).catch(u=>{this.reject(u)}),0===e.length&&a(),this.initialized=!0}static#e=this.\u0275fac=function(a){return new(a||V4)};static#a=this.\u0275prov=oe({token:V4,factory:V4.\u0275fac,providedIn:"root"})}const h_=new he("");function UR(){!function U0(t){Jn=t}(()=>{throw new Z(600,!1)})}function JR(t,e,a){try{const u=a();return sx(u)?u.catch(i=>{throw e.runOutsideAngular(()=>t.handleError(i)),i}):u}catch(u){throw e.runOutsideAngular(()=>t.handleError(u)),u}}function ZR(t,e){return Array.isArray(e)?e.reduce(ZR,t):{...t,...e}}class An{constructor(){this._bootstrapListeners=[],this._runningTick=!1,this._destroyed=!1,this._destroyListeners=[],this._views=[],this.internalErrorHandler=U(xw),this.afterRenderEffectManager=U(Ps),this.zonelessEnabled=U(dc),this.externalTestViews=new Set,this.beforeRender=new sa,this.afterTick=new sa,this.componentTypes=[],this.components=[],this.isStable=U(na).hasPendingTasks.pipe(aa(e=>!e)),this._injector=U(tn)}get allViews(){return[...this.externalTestViews.keys(),...this._views]}get destroyed(){return this._destroyed}get injector(){return this._injector}bootstrap(e,a){const u=e instanceof Ck;if(!this._injector.get(V4).done){!u&&u0(e);throw new Z(405,!1)}let r;r=u?e:this._injector.get(y4).resolveComponentFactory(e),this.componentTypes.push(r.componentType);const o=function Fae(t){return t.isBoundToModule}(r)?void 0:this._injector.get(n),d=a||r.selector,h=r.create(su.NULL,[],d,o),m=h.location.nativeElement,g=h.injector.get(KR,null);return g?.registerApplication(m),h.onDestroy(()=>{this.detachView(h.hostView),m_(this.components,h),g?.unregisterApplication(m)}),this._loadComponent(h),h}tick(){this._tick(!0)}_tick(e){if(this._runningTick)throw new Z(101,!1);const a=pe(null);try{this._runningTick=!0,this.detectChangesInAttachedViews(e)}catch(u){this.internalErrorHandler(u)}finally{this._runningTick=!1,pe(a),this.afterTick.next()}}detectChangesInAttachedViews(e){let a=null;this._injector.destroyed||(a=this._injector.get(Sg,null,{optional:!0}));let u=0;const i=this.afterRenderEffectManager;for(;u<10;){const r=0===u;if(e||!r){this.beforeRender.next(r);for(let{_lView:o,notifyErrorHandler:d}of this._views)wae(o,d,r,this.zonelessEnabled)}else a?.begin?.(),a?.end?.();if(u++,i.executeInternalCallbacks(),!this.allViews.some(({_lView:o})=>zl(o))&&(i.execute(),!this.allViews.some(({_lView:o})=>zl(o))))break}}attachView(e){const a=e;this._views.push(a),a.attachToAppRef(this)}detachView(e){const a=e;m_(this._views,a),a.detachFromAppRef()}_loadComponent(e){this.attachView(e.hostView),this.tick(),this.components.push(e);const a=this._injector.get(h_,[]);[...this._bootstrapListeners,...a].forEach(u=>u(e))}ngOnDestroy(){if(!this._destroyed)try{this._destroyListeners.forEach(e=>e()),this._views.slice().forEach(e=>e.destroy())}finally{this._destroyed=!0,this._views=[],this._bootstrapListeners=[],this._destroyListeners=[]}}onDestroy(e){return this._destroyListeners.push(e),()=>m_(this._destroyListeners,e)}destroy(){if(this._destroyed)throw new Z(406,!1);const e=this._injector;e.destroy&&!e.destroyed&&e.destroy()}get viewCount(){return this._views.length}warnIfDestroyed(){}static#e=this.\u0275fac=function(a){return new(a||An)};static#a=this.\u0275prov=oe({token:An,factory:An.\u0275fac,providedIn:"root"})}function m_(t,e){const a=t.indexOf(e);a>-1&&t.splice(a,1)}function wae(t,e,a,u){(a||zl(t))&&$o(t,e,a&&!u?0:1)}class Bae{constructor(e,a){this.ngModuleFactory=e,this.componentFactories=a}}class pc{compileModuleSync(e){return new b(e)}compileModuleAsync(e){return Promise.resolve(this.compileModuleSync(e))}compileModuleAndAllComponentsSync(e){const a=this.compileModuleSync(e),i=jr(Nn(e).declarations).reduce((r,o)=>{const d=pa(o);return d&&r.push(new F4(d)),r},[]);return new Bae(a,i)}compileModuleAndAllComponentsAsync(e){return Promise.resolve(this.compileModuleAndAllComponentsSync(e))}clearCache(){}clearCacheFor(e){}getModuleId(e){}static#e=this.\u0275fac=function(a){return new(a||pc)};static#a=this.\u0275prov=oe({token:pc,factory:pc.\u0275fac,providedIn:"root"})}const g_=new he("");function zae(t,e,a){const u=new b(a);if(typeof ngJitMode<"u"&&!ngJitMode)return Promise.resolve(u);const i=t.get(g_,[]).concat(e);if(function Lee(t){null!==eE&&(t.defaultEncapsulation!==eE.defaultEncapsulation||t.preserveWhitespaces!==eE.preserveWhitespaces)||(eE=t)}({defaultEncapsulation:$R(i.map(m=>m.defaultEncapsulation)),preserveWhitespaces:$R(i.map(m=>m.preserveWhitespaces))}),function My(){return 0===G1.size}())return Promise.resolve(u);const r=i.flatMap(m=>m.providers??[]);if(0===r.length)return Promise.resolve(u);const o=pi(),h=su.create({providers:r}).get(o.ResourceLoader);return tS(m=>Promise.resolve(h.get(m))).then(()=>u)}function $R(t){for(let e=t.length-1;e>=0;e--)if(void 0!==t[e])return t[e]}class dx{constructor(){this.zone=U(rt),this.changeDetectionScheduler=U(Hl),this.applicationRef=U(An)}initialize(){this._onMicrotaskEmptySubscription||(this._onMicrotaskEmptySubscription=this.zone.onMicrotaskEmpty.subscribe({next:()=>{this.changeDetectionScheduler.runningTick||this.zone.run(()=>{this.applicationRef.tick()})}}))}ngOnDestroy(){this._onMicrotaskEmptySubscription?.unsubscribe()}static#e=this.\u0275fac=function(a){return new(a||dx)};static#a=this.\u0275prov=oe({token:dx,factory:dx.\u0275fac,providedIn:"root"})}new he("",{factory:()=>!1});function uz({ngZoneFactory:t,ignoreChangesOutsideZone:e}){return t??=()=>new rt(iz()),[{provide:rt,useFactory:t},{provide:Vo,multi:!0,useFactory:()=>{const a=U(dx,{optional:!0});return()=>a.initialize()}},{provide:Vo,multi:!0,useFactory:()=>{const a=U(cx);return()=>{a.initialize()}}},!0===e?{provide:qC,useValue:!0}:[]]}function iz(t){return{enableLongStackTrace:!1,shouldCoalesceEventChangeDetection:t?.eventCoalescing??!1,shouldCoalesceRunChangeDetection:t?.runCoalescing??!1}}class cx{constructor(){this.subscription=new wa,this.initialized=!1,this.zone=U(rt),this.pendingTasks=U(na)}initialize(){if(this.initialized)return;this.initialized=!0;let e=null;!this.zone.isStable&&!this.zone.hasPendingMacrotasks&&!this.zone.hasPendingMicrotasks&&(e=this.pendingTasks.add()),this.zone.runOutsideAngular(()=>{this.subscription.add(this.zone.onStable.subscribe(()=>{rt.assertNotInAngularZone(),queueMicrotask(()=>{null!==e&&!this.zone.hasPendingMacrotasks&&!this.zone.hasPendingMicrotasks&&(this.pendingTasks.remove(e),e=null)})}))}),this.subscription.add(this.zone.onUnstable.subscribe(()=>{rt.assertInAngularZone(),e??=this.pendingTasks.add()}))}ngOnDestroy(){this.subscription.unsubscribe()}static#e=this.\u0275fac=function(a){return new(a||cx)};static#a=this.\u0275prov=oe({token:cx,factory:cx.\u0275fac,providedIn:"root"})}class gc{constructor(){this.appRef=U(An),this.taskService=U(na),this.ngZone=U(rt),this.zonelessEnabled=U(dc),this.disableScheduling=U(qC,{optional:!0})??!1,this.zoneIsDefined=typeof Zone<"u"&&!!Zone.root.run,this.schedulerTickApplyArgs=[{data:{__scheduler_tick__:!0}}],this.subscriptions=new wa,this.cancelScheduledCallback=null,this.shouldRefreshViews=!1,this.useMicrotaskScheduler=!1,this.runningTick=!1,this.pendingRenderTaskId=null,this.subscriptions.add(this.appRef.afterTick.subscribe(()=>{this.runningTick||this.cleanup()})),this.subscriptions.add(this.ngZone.onUnstable.subscribe(()=>{this.runningTick||this.cleanup()})),this.disableScheduling||=!this.zonelessEnabled&&(this.ngZone instanceof Wm||!this.zoneIsDefined)}notify(e){if(!this.zonelessEnabled&&5===e)return;switch(e){case 3:case 2:case 0:case 4:case 5:case 1:this.shouldRefreshViews=!0}if(!this.shouldScheduleTick())return;const a=this.useMicrotaskScheduler?GD:jD;this.pendingRenderTaskId=this.taskService.add(),this.zoneIsDefined?Zone.root.run(()=>{this.cancelScheduledCallback=a(()=>{this.tick(this.shouldRefreshViews)})}):this.cancelScheduledCallback=a(()=>{this.tick(this.shouldRefreshViews)})}shouldScheduleTick(){return!(this.disableScheduling||null!==this.pendingRenderTaskId||this.runningTick||this.appRef._runningTick||!this.zonelessEnabled&&this.zoneIsDefined&&rt.isInAngularZone())}tick(e){if(this.runningTick||this.appRef.destroyed)return;const a=this.taskService.add();try{this.ngZone.run(()=>{this.runningTick=!0,this.appRef._tick(e)},void 0,this.schedulerTickApplyArgs)}catch(u){throw this.taskService.remove(a),u}finally{this.cleanup()}this.useMicrotaskScheduler=!0,GD(()=>{this.useMicrotaskScheduler=!1,this.taskService.remove(a)})}ngOnDestroy(){this.subscriptions.unsubscribe(),this.cleanup()}cleanup(){if(this.shouldRefreshViews=!1,this.runningTick=!1,this.cancelScheduledCallback?.(),this.cancelScheduledCallback=null,null!==this.pendingRenderTaskId){const e=this.pendingRenderTaskId;this.pendingRenderTaskId=null,this.taskService.remove(e)}}static#e=this.\u0275fac=function(a){return new(a||gc)};static#a=this.\u0275prov=oe({token:gc,factory:gc.\u0275fac,providedIn:"root"})}const Ec=new he("",{providedIn:"root",factory:()=>U(Ec,Ja.Optional|Ja.SkipSelf)||function Lae(){return typeof $localize<"u"&&$localize.locale||Xg}()}),Tae=new he("",{providedIn:"root",factory:()=>"USD"});new he(""),new he("");var QR;!function(t){t[t.Error=0]="Error",t[t.Warning=1]="Warning",t[t.Ignore=2]="Ignore"}(QR||(QR={}));const rz=new he("");class uE{constructor(e){this._injector=e,this._modules=[],this._destroyListeners=[],this._destroyed=!1}bootstrapModuleFactory(e,a){const u=function kw(t="zone.js",e){return"noop"===t?new Wm:"zone.js"===t?new rt(e):t}(a?.ngZone,iz({eventCoalescing:a?.ngZoneEventCoalescing,runCoalescing:a?.ngZoneRunCoalescing}));return u.run(()=>{const i=a?.ignoreChangesOutsideZone,r=function f(t,e,a){return new E(t,e,a)}(e.moduleType,this.injector,[...uz({ngZoneFactory:()=>u,ignoreChangesOutsideZone:i}),{provide:Hl,useExisting:gc}]),o=r.injector.get(Uo,null);return u.runOutsideAngular(()=>{const d=u.onError.subscribe({next:h=>{o.handleError(h)}});r.onDestroy(()=>{m_(this._modules,r),d.unsubscribe()})}),JR(o,u,()=>{const d=r.injector.get(V4);return d.runInitializers(),d.donePromise.then(()=>(pI(r.injector.get(Ec,Xg)||Xg),this._moduleDoBootstrap(r),r))})})}bootstrapModule(e,a=[]){const u=ZR({},a);return zae(this.injector,u,e).then(i=>this.bootstrapModuleFactory(i,u))}_moduleDoBootstrap(e){const a=e.injector.get(An);if(e._bootstrapComponents.length>0)e._bootstrapComponents.forEach(u=>a.bootstrap(u));else{if(!e.instance.ngDoBootstrap)throw new Z(-403,!1);e.instance.ngDoBootstrap(a)}this._modules.push(e)}onDestroy(e){this._destroyListeners.push(e)}get injector(){return this._injector}destroy(){if(this._destroyed)throw new Z(404,!1);this._modules.slice().forEach(a=>a.destroy()),this._destroyListeners.forEach(a=>a());const e=this._injector.get(rz,null);e&&(e.forEach(a=>a()),e.clear()),this._destroyed=!0}get destroyed(){return this._destroyed}static#e=this.\u0275fac=function(a){return new(a||uE)(ye(su))};static#a=this.\u0275prov=oe({token:uE,factory:uE.\u0275fac,providedIn:"platform"})}let Y1=null;const XR=new he("");function E_(t,e,a=[]){const u=`Platform: ${e}`,i=new he(u);return(r=[])=>{let o=oz();if(!o||o.injector.get(XR,!1)){const d=[...a,...r,{provide:i,useValue:!0}];t?t(d):function Pae(t){if(Y1&&!Y1.get(XR,!1))throw new Z(400,!1);UR(),Y1=t;const e=t.get(uE);return aH(t),e}(eH(d,u))}return function Nae(t){const e=oz();if(!e)throw new Z(401,!1);return e}()}}function eH(t=[],e){return su.create({name:e,providers:[{provide:Td,useValue:"platform"},{provide:rz,useValue:new Set([()=>Y1=null])},...t]})}function oz(){return Y1?.get(uE)??null}function aH(t){t.get(s6,null)?.forEach(a=>a())}class Xu{static#e=this.__NG_ELEMENT_ID__=Rae}function Rae(t){return function Hae(t,e,a){if(B(t)&&!a){const u=ar(t.index,e);return new g4(u,u)}if(175&t.type){const u=e[xu];return new g4(u,e)}return null}(St(),q(),!(16&~t))}class rH{constructor(){}supports(e){return K(e)}create(e){return new Kae(e)}}const Gae=(t,e)=>e;class Kae{constructor(e){this.length=0,this._linkedRecords=null,this._unlinkedRecords=null,this._previousItHead=null,this._itHead=null,this._itTail=null,this._additionsHead=null,this._additionsTail=null,this._movesHead=null,this._movesTail=null,this._removalsHead=null,this._removalsTail=null,this._identityChangesHead=null,this._identityChangesTail=null,this._trackByFn=e||Gae}forEachItem(e){let a;for(a=this._itHead;null!==a;a=a._next)e(a)}forEachOperation(e){let a=this._itHead,u=this._removalsHead,i=0,r=null;for(;a||u;){const o=!u||a&&a.currentIndex{o=this._trackByFn(i,d),null!==a&&Object.is(a.trackById,o)?(u&&(a=this._verifyReinsertion(a,d,o,i)),Object.is(a.item,d)||this._addIdentityChange(a,d)):(a=this._mismatch(a,d,o,i),u=!0),a=a._next,i++}),this.length=i;return this._truncate(a),this.collection=e,this.isDirty}get isDirty(){return null!==this._additionsHead||null!==this._movesHead||null!==this._removalsHead||null!==this._identityChangesHead}_reset(){if(this.isDirty){let e;for(e=this._previousItHead=this._itHead;null!==e;e=e._next)e._nextPrevious=e._next;for(e=this._additionsHead;null!==e;e=e._nextAdded)e.previousIndex=e.currentIndex;for(this._additionsHead=this._additionsTail=null,e=this._movesHead;null!==e;e=e._nextMoved)e.previousIndex=e.currentIndex;this._movesHead=this._movesTail=null,this._removalsHead=this._removalsTail=null,this._identityChangesHead=this._identityChangesTail=null}}_mismatch(e,a,u,i){let r;return null===e?r=this._itTail:(r=e._prev,this._remove(e)),null!==(e=null===this._unlinkedRecords?null:this._unlinkedRecords.get(u,null))?(Object.is(e.item,a)||this._addIdentityChange(e,a),this._reinsertAfter(e,r,i)):null!==(e=null===this._linkedRecords?null:this._linkedRecords.get(u,i))?(Object.is(e.item,a)||this._addIdentityChange(e,a),this._moveAfter(e,r,i)):e=this._addAfter(new Wae(a,u),r,i),e}_verifyReinsertion(e,a,u,i){let r=null===this._unlinkedRecords?null:this._unlinkedRecords.get(u,null);return null!==r?e=this._reinsertAfter(r,e._prev,i):e.currentIndex!=i&&(e.currentIndex=i,this._addToMoves(e,i)),e}_truncate(e){for(;null!==e;){const a=e._next;this._addToRemovals(this._unlink(e)),e=a}null!==this._unlinkedRecords&&this._unlinkedRecords.clear(),null!==this._additionsTail&&(this._additionsTail._nextAdded=null),null!==this._movesTail&&(this._movesTail._nextMoved=null),null!==this._itTail&&(this._itTail._next=null),null!==this._removalsTail&&(this._removalsTail._nextRemoved=null),null!==this._identityChangesTail&&(this._identityChangesTail._nextIdentityChange=null)}_reinsertAfter(e,a,u){null!==this._unlinkedRecords&&this._unlinkedRecords.remove(e);const i=e._prevRemoved,r=e._nextRemoved;return null===i?this._removalsHead=r:i._nextRemoved=r,null===r?this._removalsTail=i:r._prevRemoved=i,this._insertAfter(e,a,u),this._addToMoves(e,u),e}_moveAfter(e,a,u){return this._unlink(e),this._insertAfter(e,a,u),this._addToMoves(e,u),e}_addAfter(e,a,u){return this._insertAfter(e,a,u),null===this._additionsTail?this._additionsTail=this._additionsHead=e:this._additionsTail=this._additionsTail._nextAdded=e,e}_insertAfter(e,a,u){const i=null===a?this._itHead:a._next;return e._next=i,e._prev=a,null===i?this._itTail=e:i._prev=e,null===a?this._itHead=e:a._next=e,null===this._linkedRecords&&(this._linkedRecords=new oH),this._linkedRecords.put(e),e.currentIndex=u,e}_remove(e){return this._addToRemovals(this._unlink(e))}_unlink(e){null!==this._linkedRecords&&this._linkedRecords.remove(e);const a=e._prev,u=e._next;return null===a?this._itHead=u:a._next=u,null===u?this._itTail=a:u._prev=a,e}_addToMoves(e,a){return e.previousIndex===a||(null===this._movesTail?this._movesTail=this._movesHead=e:this._movesTail=this._movesTail._nextMoved=e),e}_addToRemovals(e){return null===this._unlinkedRecords&&(this._unlinkedRecords=new oH),this._unlinkedRecords.put(e),e.currentIndex=null,e._nextRemoved=null,null===this._removalsTail?(this._removalsTail=this._removalsHead=e,e._prevRemoved=null):(e._prevRemoved=this._removalsTail,this._removalsTail=this._removalsTail._nextRemoved=e),e}_addIdentityChange(e,a){return e.item=a,null===this._identityChangesTail?this._identityChangesTail=this._identityChangesHead=e:this._identityChangesTail=this._identityChangesTail._nextIdentityChange=e,e}}class Wae{constructor(e,a){this.item=e,this.trackById=a,this.currentIndex=null,this.previousIndex=null,this._nextPrevious=null,this._prev=null,this._next=null,this._prevDup=null,this._nextDup=null,this._prevRemoved=null,this._nextRemoved=null,this._nextAdded=null,this._nextMoved=null,this._nextIdentityChange=null}}class Uae{constructor(){this._head=null,this._tail=null}add(e){null===this._head?(this._head=this._tail=e,e._nextDup=null,e._prevDup=null):(this._tail._nextDup=e,e._prevDup=this._tail,e._nextDup=null,this._tail=e)}get(e,a){let u;for(u=this._head;null!==u;u=u._nextDup)if((null===a||a<=u.currentIndex)&&Object.is(u.trackById,e))return u;return null}remove(e){const a=e._prevDup,u=e._nextDup;return null===a?this._head=u:a._nextDup=u,null===u?this._tail=a:u._prevDup=a,null===this._head}}class oH{constructor(){this.map=new Map}put(e){const a=e.trackById;let u=this.map.get(a);u||(u=new Uae,this.map.set(a,u)),u.add(e)}get(e,a){const u=e,i=this.map.get(u);return i?i.get(e,a):null}remove(e){const a=e.trackById;return this.map.get(a).remove(e)&&this.map.delete(a),e}get isEmpty(){return 0===this.map.size}clear(){this.map.clear()}}function lH(t,e,a){const u=t.previousIndex;if(null===u)return u;let i=0;return a&&u{if(a&&a.key===i)this._maybeAddToChanges(a,u),this._appendAfter=a,a=a._next;else{const r=this._getOrCreateRecordForKey(i,u);a=this._insertBeforeOrAppend(a,r)}}),a){a._prev&&(a._prev._next=null),this._removalsHead=a;for(let u=a;null!==u;u=u._nextRemoved)u===this._mapHead&&(this._mapHead=null),this._records.delete(u.key),u._nextRemoved=u._next,u.previousValue=u.currentValue,u.currentValue=null,u._prev=null,u._next=null}return this._changesTail&&(this._changesTail._nextChanged=null),this._additionsTail&&(this._additionsTail._nextAdded=null),this.isDirty}_insertBeforeOrAppend(e,a){if(e){const u=e._prev;return a._next=e,a._prev=u,e._prev=a,u&&(u._next=a),e===this._mapHead&&(this._mapHead=a),this._appendAfter=e,e}return this._appendAfter?(this._appendAfter._next=a,a._prev=this._appendAfter):this._mapHead=a,this._appendAfter=a,null}_getOrCreateRecordForKey(e,a){if(this._records.has(e)){const i=this._records.get(e);this._maybeAddToChanges(i,a);const r=i._prev,o=i._next;return r&&(r._next=o),o&&(o._prev=r),i._next=null,i._prev=null,i}const u=new Zae(e);return this._records.set(e,u),u.currentValue=a,this._addToAdditions(u),u}_reset(){if(this.isDirty){let e;for(this._previousMapHead=this._mapHead,e=this._previousMapHead;null!==e;e=e._next)e._nextPrevious=e._next;for(e=this._changesHead;null!==e;e=e._nextChanged)e.previousValue=e.currentValue;for(e=this._additionsHead;null!=e;e=e._nextAdded)e.previousValue=e.currentValue;this._changesHead=this._changesTail=null,this._additionsHead=this._additionsTail=null,this._removalsHead=null}}_maybeAddToChanges(e,a){Object.is(a,e.currentValue)||(e.previousValue=e.currentValue,e.currentValue=a,this._addToChanges(e))}_addToAdditions(e){null===this._additionsHead?this._additionsHead=this._additionsTail=e:(this._additionsTail._nextAdded=e,this._additionsTail=e)}_addToChanges(e){null===this._changesHead?this._changesHead=this._changesTail=e:(this._changesTail._nextChanged=e,this._changesTail=e)}_forEach(e,a){e instanceof Map?e.forEach(a):Object.keys(e).forEach(u=>a(e[u],u))}}class Zae{constructor(e){this.key=e,this.previousValue=null,this.currentValue=null,this._nextPrevious=null,this._next=null,this._prev=null,this._nextAdded=null,this._nextRemoved=null,this._nextChanged=null}}function dH(){return new vc([new rH])}class vc{static#e=this.\u0275prov=oe({token:vc,providedIn:"root",factory:dH});constructor(e){this.factories=e}static create(e,a){if(null!=a){const u=a.factories.slice();e=e.concat(u)}return new vc(e)}static extend(e){return{provide:vc,useFactory:a=>vc.create(e,a||dH()),deps:[[vc,new Bd,new is]]}}find(e){const a=this.factories.find(u=>u.supports(e));if(null!=a)return a;throw new Z(901,!1)}}function cH(){return new Vs([new sH])}class Vs{static#e=this.\u0275prov=oe({token:Vs,providedIn:"root",factory:cH});constructor(e){this.factories=e}static create(e,a){if(a){const u=a.factories.slice();e=e.concat(u)}return new Vs(e)}static extend(e){return{provide:Vs,useFactory:a=>Vs.create(e,a||cH()),deps:[[Vs,new Bd,new is]]}}find(e){const a=this.factories.find(u=>u.supports(e));if(a)return a;throw new Z(901,!1)}}const $ae=[new sH],qae=[new rH],hH=(new vc(qae),new Vs($ae),E_(null,"core",[]));class hx{constructor(e){}static#e=this.\u0275fac=function(a){return new(a||hx)(ye(An))};static#a=this.\u0275mod=kn({type:hx});static#t=this.\u0275inj=$u({})}class y_{constructor(){this.window=null,this.observer=null,this.options=U(hb),this.ngZone=U(rt)}start(){if(typeof PerformanceObserver>"u"||this.options?.disableImageSizeWarning&&this.options?.disableImageLazyLoadWarning)return;this.observer=this.initPerformanceObserver();const e=g0(),a=e.defaultView;if(typeof a<"u"){this.window=a;const u=()=>{setTimeout(this.scanImages.bind(this),200)};this.ngZone.runOutsideAngular(()=>{"complete"===e.readyState?u():this.window?.addEventListener("load",u,{once:!0})})}}ngOnDestroy(){this.observer?.disconnect()}initPerformanceObserver(){if(typeof PerformanceObserver>"u")return null;const e=new PerformanceObserver(a=>{const u=a.getEntries();if(0===u.length)return;const r=u[u.length-1].element?.src??"";r.startsWith("data:")||r.startsWith("blob:")||(this.lcpImageUrl=r)});return e.observe({type:"largest-contentful-paint",buffered:!0}),e}scanImages(){const e=g0().querySelectorAll("img");let a,u=!1;e.forEach(i=>{if(!this.options?.disableImageSizeWarning)for(const r of e)!r.getAttribute("ng-img")&&this.isOversized(r)&&dte(r.src);!this.options?.disableImageLazyLoadWarning&&this.lcpImageUrl&&i.src===this.lcpImageUrl&&(a=!0,("lazy"!==i.loading||i.getAttribute("ng-img"))&&(u=!0))}),a&&!u&&this.lcpImageUrl&&!this.options?.disableImageLazyLoadWarning&&function ste(t){console.warn(Fi(-913,`An image with src ${t} is the Largest Contentful Paint (LCP) element but was given a "loading" value of "lazy", which can negatively impact application loading performance. This warning can be addressed by changing the loading value of the LCP image to "eager", or by using the NgOptimizedImage directive's prioritization utilities. For more information about addressing or disabling this warning, see https://angular.dev/errors/NG0913`))}(this.lcpImageUrl)}isOversized(e){if(!this.window)return!1;const a=this.window.getComputedStyle(e);let u=parseFloat(a.getPropertyValue("width")),i=parseFloat(a.getPropertyValue("height"));const r=a.getPropertyValue("box-sizing");if("cover"===a.getPropertyValue("object-fit"))return!1;if("border-box"===r){const x=a.getPropertyValue("padding-top"),D=a.getPropertyValue("padding-right"),C=a.getPropertyValue("padding-bottom"),F=a.getPropertyValue("padding-left");u-=parseFloat(D)+parseFloat(F),i-=parseFloat(x)+parseFloat(C)}const d=e.naturalWidth,h=e.naturalHeight,m=this.window.devicePixelRatio*u,g=this.window.devicePixelRatio*i;return d-m>=1200||h-g>=1200}static#e=this.\u0275fac=function(a){return new(a||y_)};static#a=this.\u0275prov=oe({token:y_,factory:y_.\u0275fac,providedIn:"root"})}function dte(t){console.warn(Fi(-913,`An image with src ${t} has intrinsic file dimensions much larger than its rendered size. This can negatively impact application loading performance. For more information about addressing or disabling this warning, see https://angular.dev/errors/NG0913`))}const wH=(t,e,a)=>{const u=t,i=u.__jsaction_fns??new Map,r=i.get(e)??[];r.push(a),i.set(e,r),u.__jsaction_fns=i},mz=new he("",{providedIn:"root",factory:()=>({})}),BH=new he("");class gx{constructor(){this.eventContractDetails=U(mz)}ngOnDestroy(){this.eventContractDetails.instance?.cleanUp()}supports(e){return(t=>bl.indexOf(t)>=0)(e)}addEventListener(e,a,u){return this.eventContractDetails.instance.addEvent(a),wH(e,a,u),di(e)[a]="",()=>this.removeEventListener(e,a,u)}removeEventListener(e,a,u){di(e)[a]=void 0}static#e=this.\u0275fac=function(a){return new(a||gx)};static#a=this.\u0275prov=oe({token:gx,factory:gx.\u0275fac})}function au(t){return"boolean"==typeof t?t:null!=t&&"false"!==t}function iE(t,e=NaN){return isNaN(parseFloat(t))||isNaN(Number(t))?e:Number(t)}function vx(t,e){Ui("NgSignals");const a=sd(t);return e?.equal&&(a[va].equal=e.equal),a}function Os(t){const e=pe(null);try{return t()}finally{pe(e)}}new he("",{providedIn:"root",factory:()=>U(gz)});class gz{static#e=this.\u0275prov=oe({token:gz,providedIn:"root",factory:()=>new Mte})}class Mte{constructor(){this.queuedEffectCount=0,this.queues=new Map,this.pendingTasks=U(na),this.taskId=null}scheduleEffect(e){if(this.enqueue(e),null===this.taskId){const a=this.taskId=this.pendingTasks.add();queueMicrotask(()=>{this.flush(),this.pendingTasks.remove(a),this.taskId=null})}}enqueue(e){const a=e.creationZone;this.queues.has(a)||this.queues.set(a,new Set);const u=this.queues.get(a);u.has(e)||(this.queuedEffectCount++,u.add(e))}flush(){for(;this.queuedEffectCount>0;)for(const[e,a]of this.queues)null===e?this.flushQueue(a):e.run(()=>this.flushQueue(a))}flushQueue(e){for(const a of e)e.delete(a),this.queuedEffectCount--,a.run()}}var F_=O(837);function HH(t,e,a,u,i,r,o){try{var d=t[r](o),h=d.value}catch(m){return void a(m)}d.done?e(h):Promise.resolve(h).then(u,i)}function Su(t){return function(){var e=this,a=arguments;return new Promise(function(u,i){var r=t.apply(e,a);function o(h){HH(r,u,i,o,d,"next",h)}function d(h){HH(r,u,i,o,d,"throw",h)}o(void 0)})}}let VH=null;function bc(){return VH}class Ite{}class Ez{static#e=this.\u0275fac=function(a){return new(a||Ez)};static#a=this.\u0275prov=oe({token:Ez,factory:()=>window.navigation,providedIn:"platform"})}const ei=new he("");class nE{historyGo(e){throw new Error("")}static#e=this.\u0275fac=function(a){return new(a||nE)};static#a=this.\u0275prov=oe({token:nE,factory:()=>U(bx),providedIn:"platform"})}const OH=new he("");class bx extends nE{constructor(){super(),this._doc=U(ei),this._location=window.location,this._history=window.history}getBaseHrefFromDOM(){return bc().getBaseHref(this._doc)}onPopState(e){const a=bc().getGlobalEventTarget(this._doc,"window");return a.addEventListener("popstate",e,!1),()=>a.removeEventListener("popstate",e)}onHashChange(e){const a=bc().getGlobalEventTarget(this._doc,"window");return a.addEventListener("hashchange",e,!1),()=>a.removeEventListener("hashchange",e)}get href(){return this._location.href}get protocol(){return this._location.protocol}get hostname(){return this._location.hostname}get port(){return this._location.port}get pathname(){return this._location.pathname}get search(){return this._location.search}get hash(){return this._location.hash}set pathname(e){this._location.pathname=e}pushState(e,a,u){this._history.pushState(e,a,u)}replaceState(e,a,u){this._history.replaceState(e,a,u)}forward(){this._history.forward()}back(){this._history.back()}historyGo(e=0){this._history.go(e)}getState(){return this._history.state}static#e=this.\u0275fac=function(a){return new(a||bx)};static#a=this.\u0275prov=oe({token:bx,factory:()=>new bx,providedIn:"platform"})}function vz(t,e){if(0==t.length)return e;if(0==e.length)return t;let a=0;return t.endsWith("/")&&a++,e.startsWith("/")&&a++,2==a?t+e.substring(1):1==a?t+e:t+"/"+e}function jH(t){const e=t.match(/#|\?|$/),a=e&&e.index||t.length,u=a-("/"===t[a-1]?1:0);return t.slice(0,u)+t.slice(a)}function kc(t){return t&&"?"!==t[0]?"?"+t:t}class js{historyGo(e){throw new Error("")}static#e=this.\u0275fac=function(a){return new(a||js)};static#a=this.\u0275prov=oe({token:js,factory:()=>U(rE),providedIn:"root"})}const GH=new he("");class rE extends js{constructor(e,a){super(),this._platformLocation=e,this._removeListenerFns=[],this._baseHref=a??this._platformLocation.getBaseHrefFromDOM()??U(ei).location?.origin??""}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(e){this._removeListenerFns.push(this._platformLocation.onPopState(e),this._platformLocation.onHashChange(e))}getBaseHref(){return this._baseHref}prepareExternalUrl(e){return vz(this._baseHref,e)}path(e=!1){const a=this._platformLocation.pathname+kc(this._platformLocation.search),u=this._platformLocation.hash;return u&&e?`${a}${u}`:a}pushState(e,a,u,i){const r=this.prepareExternalUrl(u+kc(i));this._platformLocation.pushState(e,a,r)}replaceState(e,a,u,i){const r=this.prepareExternalUrl(u+kc(i));this._platformLocation.replaceState(e,a,r)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(e=0){this._platformLocation.historyGo?.(e)}static#e=this.\u0275fac=function(a){return new(a||rE)(ye(nE),ye(GH,8))};static#a=this.\u0275prov=oe({token:rE,factory:rE.\u0275fac,providedIn:"root"})}class kx extends js{constructor(e,a){super(),this._platformLocation=e,this._baseHref="",this._removeListenerFns=[],null!=a&&(this._baseHref=a)}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(e){this._removeListenerFns.push(this._platformLocation.onPopState(e),this._platformLocation.onHashChange(e))}getBaseHref(){return this._baseHref}path(e=!1){const a=this._platformLocation.hash??"#";return a.length>0?a.substring(1):a}prepareExternalUrl(e){const a=vz(this._baseHref,e);return a.length>0?"#"+a:a}pushState(e,a,u,i){let r=this.prepareExternalUrl(u+kc(i));0==r.length&&(r=this._platformLocation.pathname),this._platformLocation.pushState(e,a,r)}replaceState(e,a,u,i){let r=this.prepareExternalUrl(u+kc(i));0==r.length&&(r=this._platformLocation.pathname),this._platformLocation.replaceState(e,a,r)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(e=0){this._platformLocation.historyGo?.(e)}static#e=this.\u0275fac=function(a){return new(a||kx)(ye(nE),ye(GH,8))};static#a=this.\u0275prov=oe({token:kx,factory:kx.\u0275fac})}class xc{constructor(e){this._subject=new Ue,this._urlChangeListeners=[],this._urlChangeSubscription=null,this._locationStrategy=e;const a=this._locationStrategy.getBaseHref();this._basePath=function Vte(t){if(new RegExp("^(https?:)?//").test(t)){const[,a]=t.split(/\/\/[^\/]+/);return a}return t}(jH(KH(a))),this._locationStrategy.onPopState(u=>{this._subject.emit({url:this.path(!0),pop:!0,state:u.state,type:u.type})})}ngOnDestroy(){this._urlChangeSubscription?.unsubscribe(),this._urlChangeListeners=[]}path(e=!1){return this.normalize(this._locationStrategy.path(e))}getState(){return this._locationStrategy.getState()}isCurrentPathEqualTo(e,a=""){return this.path()==this.normalize(e+kc(a))}normalize(e){return xc.stripTrailingSlash(function Hte(t,e){if(!t||!e.startsWith(t))return e;const a=e.substring(t.length);return""===a||["/",";","?","#"].includes(a[0])?a:e}(this._basePath,KH(e)))}prepareExternalUrl(e){return e&&"/"!==e[0]&&(e="/"+e),this._locationStrategy.prepareExternalUrl(e)}go(e,a="",u=null){this._locationStrategy.pushState(u,"",e,a),this._notifyUrlChangeListeners(this.prepareExternalUrl(e+kc(a)),u)}replaceState(e,a="",u=null){this._locationStrategy.replaceState(u,"",e,a),this._notifyUrlChangeListeners(this.prepareExternalUrl(e+kc(a)),u)}forward(){this._locationStrategy.forward()}back(){this._locationStrategy.back()}historyGo(e=0){this._locationStrategy.historyGo?.(e)}onUrlChange(e){return this._urlChangeListeners.push(e),this._urlChangeSubscription??=this.subscribe(a=>{this._notifyUrlChangeListeners(a.url,a.state)}),()=>{const a=this._urlChangeListeners.indexOf(e);this._urlChangeListeners.splice(a,1),0===this._urlChangeListeners.length&&(this._urlChangeSubscription?.unsubscribe(),this._urlChangeSubscription=null)}}_notifyUrlChangeListeners(e="",a){this._urlChangeListeners.forEach(u=>u(e,a))}subscribe(e,a,u){return this._subject.subscribe({next:e,error:a,complete:u})}static#e=this.normalizeQueryParams=kc;static#a=this.joinWithSlash=vz;static#t=this.stripTrailingSlash=jH;static#u=this.\u0275fac=function(a){return new(a||xc)(ye(js))};static#i=this.\u0275prov=oe({token:xc,factory:()=>function Rte(){return new xc(ye(js))}(),providedIn:"root"})}function KH(t){return t.replace(/\/index.html$/,"")}const WH={ADP:[void 0,void 0,0],AFN:[void 0,"\u060b",0],ALL:[void 0,void 0,0],AMD:[void 0,"\u058f",2],AOA:[void 0,"Kz"],ARS:[void 0,"$"],AUD:["A$","$"],AZN:[void 0,"\u20bc"],BAM:[void 0,"KM"],BBD:[void 0,"$"],BDT:[void 0,"\u09f3"],BHD:[void 0,void 0,3],BIF:[void 0,void 0,0],BMD:[void 0,"$"],BND:[void 0,"$"],BOB:[void 0,"Bs"],BRL:["R$"],BSD:[void 0,"$"],BWP:[void 0,"P"],BYN:[void 0,void 0,2],BYR:[void 0,void 0,0],BZD:[void 0,"$"],CAD:["CA$","$",2],CHF:[void 0,void 0,2],CLF:[void 0,void 0,4],CLP:[void 0,"$",0],CNY:["CN\xa5","\xa5"],COP:[void 0,"$",2],CRC:[void 0,"\u20a1",2],CUC:[void 0,"$"],CUP:[void 0,"$"],CZK:[void 0,"K\u010d",2],DJF:[void 0,void 0,0],DKK:[void 0,"kr",2],DOP:[void 0,"$"],EGP:[void 0,"E\xa3"],ESP:[void 0,"\u20a7",0],EUR:["\u20ac"],FJD:[void 0,"$"],FKP:[void 0,"\xa3"],GBP:["\xa3"],GEL:[void 0,"\u20be"],GHS:[void 0,"GH\u20b5"],GIP:[void 0,"\xa3"],GNF:[void 0,"FG",0],GTQ:[void 0,"Q"],GYD:[void 0,"$",2],HKD:["HK$","$"],HNL:[void 0,"L"],HRK:[void 0,"kn"],HUF:[void 0,"Ft",2],IDR:[void 0,"Rp",2],ILS:["\u20aa"],INR:["\u20b9"],IQD:[void 0,void 0,0],IRR:[void 0,void 0,0],ISK:[void 0,"kr",0],ITL:[void 0,void 0,0],JMD:[void 0,"$"],JOD:[void 0,void 0,3],JPY:["\xa5",void 0,0],KHR:[void 0,"\u17db"],KMF:[void 0,"CF",0],KPW:[void 0,"\u20a9",0],KRW:["\u20a9",void 0,0],KWD:[void 0,void 0,3],KYD:[void 0,"$"],KZT:[void 0,"\u20b8"],LAK:[void 0,"\u20ad",0],LBP:[void 0,"L\xa3",0],LKR:[void 0,"Rs"],LRD:[void 0,"$"],LTL:[void 0,"Lt"],LUF:[void 0,void 0,0],LVL:[void 0,"Ls"],LYD:[void 0,void 0,3],MGA:[void 0,"Ar",0],MGF:[void 0,void 0,0],MMK:[void 0,"K",0],MNT:[void 0,"\u20ae",2],MRO:[void 0,void 0,0],MUR:[void 0,"Rs",2],MXN:["MX$","$"],MYR:[void 0,"RM"],NAD:[void 0,"$"],NGN:[void 0,"\u20a6"],NIO:[void 0,"C$"],NOK:[void 0,"kr",2],NPR:[void 0,"Rs"],NZD:["NZ$","$"],OMR:[void 0,void 0,3],PHP:["\u20b1"],PKR:[void 0,"Rs",2],PLN:[void 0,"z\u0142"],PYG:[void 0,"\u20b2",0],RON:[void 0,"lei"],RSD:[void 0,void 0,0],RUB:[void 0,"\u20bd"],RWF:[void 0,"RF",0],SBD:[void 0,"$"],SEK:[void 0,"kr",2],SGD:[void 0,"$"],SHP:[void 0,"\xa3"],SLE:[void 0,void 0,2],SLL:[void 0,void 0,0],SOS:[void 0,void 0,0],SRD:[void 0,"$"],SSP:[void 0,"\xa3"],STD:[void 0,void 0,0],STN:[void 0,"Db"],SYP:[void 0,"\xa3",0],THB:[void 0,"\u0e3f"],TMM:[void 0,void 0,0],TND:[void 0,void 0,3],TOP:[void 0,"T$"],TRL:[void 0,void 0,0],TRY:[void 0,"\u20ba"],TTD:[void 0,"$"],TWD:["NT$","$",2],TZS:[void 0,void 0,2],UAH:[void 0,"\u20b4"],UGX:[void 0,void 0,0],USD:["$"],UYI:[void 0,void 0,0],UYU:[void 0,"$"],UYW:[void 0,void 0,4],UZS:[void 0,void 0,2],VEF:[void 0,"Bs",2],VND:["\u20ab",void 0,0],VUV:[void 0,void 0,0],XAF:["FCFA",void 0,0],XCD:["EC$","$"],XOF:["F\u202fCFA",void 0,0],XPF:["CFPF",void 0,0],XXX:["\xa4"],YER:[void 0,void 0,0],ZAR:[void 0,"R"],ZMK:[void 0,void 0,0],ZMW:[void 0,"ZK"],ZWD:[void 0,void 0,0]};var xx,j4,hr,tu,fo;!function(t){t[t.Decimal=0]="Decimal",t[t.Percent=1]="Percent",t[t.Currency=2]="Currency",t[t.Scientific=3]="Scientific"}(xx||(xx={})),function(t){t[t.Zero=0]="Zero",t[t.One=1]="One",t[t.Two=2]="Two",t[t.Few=3]="Few",t[t.Many=4]="Many",t[t.Other=5]="Other"}(j4||(j4={})),function(t){t[t.Format=0]="Format",t[t.Standalone=1]="Standalone"}(hr||(hr={})),function(t){t[t.Narrow=0]="Narrow",t[t.Abbreviated=1]="Abbreviated",t[t.Wide=2]="Wide",t[t.Short=3]="Short"}(tu||(tu={})),function(t){t[t.Short=0]="Short",t[t.Medium=1]="Medium",t[t.Long=2]="Long",t[t.Full=3]="Full"}(fo||(fo={}));const Zi={Decimal:0,Group:1,List:2,PercentSign:3,PlusSign:4,MinusSign:5,Exponential:6,SuperscriptingExponent:7,PerMille:8,Infinity:9,NaN:10,TimeSeparator:11,CurrencyDecimal:12,CurrencyGroup:13};var UH;function A_(t,e){return jl(Gr(t)[du.DateFormat],e)}function w_(t,e){return jl(Gr(t)[du.TimeFormat],e)}function B_(t,e){return jl(Gr(t)[du.DateTimeFormat],e)}function Ol(t,e){const a=Gr(t),u=a[du.NumberSymbols][e];if(typeof u>"u"){if(e===Zi.CurrencyDecimal)return a[du.NumberSymbols][Zi.Decimal];if(e===Zi.CurrencyGroup)return a[du.NumberSymbols][Zi.Group]}return u}function bz(t,e){return Gr(t)[du.NumberFormats][e]}!function(t){t[t.Sunday=0]="Sunday",t[t.Monday=1]="Monday",t[t.Tuesday=2]="Tuesday",t[t.Wednesday=3]="Wednesday",t[t.Thursday=4]="Thursday",t[t.Friday=5]="Friday",t[t.Saturday=6]="Saturday"}(UH||(UH={}));const Jte=cI;function JH(t){if(!t[du.ExtraData])throw new Error(`Missing extra locale data for the locale "${t[du.LocaleId]}". Use "registerLocaleData" to load new data. See the "I18n guide" on angular.io to know more.`)}function jl(t,e){for(let a=e;a>-1;a--)if(typeof t[a]<"u")return t[a];throw new Error("Locale data API: locale data undefined")}function kz(t){const[e,a]=t.split(":");return{hours:+e,minutes:+a}}function qte(t,e,a="en"){const u=function Ute(t){return Gr(t)[du.Currencies]}(a)[t]||WH[t]||[],i=u[1];return"narrow"===e&&"string"==typeof i?i:u[0]||t}const Yte=2;const Xte=/^(\d{4,})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/,S_={},eue=/((?:[^BEGHLMOSWYZabcdhmswyz']+)|(?:'(?:[^']|'')*')|(?:G{1,5}|y{1,4}|Y{1,4}|M{1,5}|L{1,5}|w{1,2}|W{1}|d{1,2}|E{1,6}|c{1,6}|a{1,5}|b{1,5}|B{1,5}|h{1,2}|H{1,2}|m{1,2}|s{1,2}|S{1,3}|z{1,4}|Z{1,5}|O{1,4}))([\s\S]*)/;var Gs,Tt,Pt;function aue(t,e,a,u){let i=function due(t){if(qH(t))return t;if("number"==typeof t&&!isNaN(t))return new Date(t);if("string"==typeof t){if(t=t.trim(),/^(\d{4}(-\d{1,2}(-\d{1,2})?)?)$/.test(t)){const[i,r=1,o=1]=t.split("-").map(d=>+d);return z_(i,r-1,o)}const a=parseFloat(t);if(!isNaN(t-a))return new Date(a);let u;if(u=t.match(Xte))return function cue(t){const e=new Date(0);let a=0,u=0;const i=t[8]?e.setUTCFullYear:e.setFullYear,r=t[8]?e.setUTCHours:e.setHours;t[9]&&(a=Number(t[9]+t[10]),u=Number(t[9]+t[11])),i.call(e,Number(t[1]),Number(t[2])-1,Number(t[3]));const o=Number(t[4]||0)-a,d=Number(t[5]||0)-u,h=Number(t[6]||0),m=Math.floor(1e3*parseFloat("0."+(t[7]||0)));return r.call(e,o,d,h,m),e}(u)}const e=new Date(t);if(!qH(e))throw new Error(`Unable to convert "${t}" into a date`);return e}(t);e=fc(a,e)||e;let d,o=[];for(;e;){if(d=eue.exec(e),!d){o.push(e);break}{o=o.concat(d.slice(1));const g=o.pop();if(!g)break;e=g}}let h=i.getTimezoneOffset();u&&(h=$H(u,h),i=function sue(t,e,a){const u=a?-1:1,i=t.getTimezoneOffset(),r=$H(e,i);return function lue(t,e){return t=new Date(t.getTime()),t.setMinutes(t.getMinutes()+e),t}(t,u*(r-i))}(i,u,!0));let m="";return o.forEach(g=>{const v=function oue(t){if(fz[t])return fz[t];let e;switch(t){case"G":case"GG":case"GGG":e=fu(Pt.Eras,tu.Abbreviated);break;case"GGGG":e=fu(Pt.Eras,tu.Wide);break;case"GGGGG":e=fu(Pt.Eras,tu.Narrow);break;case"y":e=$i(Tt.FullYear,1,0,!1,!0);break;case"yy":e=$i(Tt.FullYear,2,0,!0,!0);break;case"yyy":e=$i(Tt.FullYear,3,0,!1,!0);break;case"yyyy":e=$i(Tt.FullYear,4,0,!1,!0);break;case"Y":e=P_(1);break;case"YY":e=P_(2,!0);break;case"YYY":e=P_(3);break;case"YYYY":e=P_(4);break;case"M":case"L":e=$i(Tt.Month,1,1);break;case"MM":case"LL":e=$i(Tt.Month,2,1);break;case"MMM":e=fu(Pt.Months,tu.Abbreviated);break;case"MMMM":e=fu(Pt.Months,tu.Wide);break;case"MMMMM":e=fu(Pt.Months,tu.Narrow);break;case"LLL":e=fu(Pt.Months,tu.Abbreviated,hr.Standalone);break;case"LLLL":e=fu(Pt.Months,tu.Wide,hr.Standalone);break;case"LLLLL":e=fu(Pt.Months,tu.Narrow,hr.Standalone);break;case"w":e=xz(1);break;case"ww":e=xz(2);break;case"W":e=xz(1,!0);break;case"d":e=$i(Tt.Date,1);break;case"dd":e=$i(Tt.Date,2);break;case"c":case"cc":e=$i(Tt.Day,1);break;case"ccc":e=fu(Pt.Days,tu.Abbreviated,hr.Standalone);break;case"cccc":e=fu(Pt.Days,tu.Wide,hr.Standalone);break;case"ccccc":e=fu(Pt.Days,tu.Narrow,hr.Standalone);break;case"cccccc":e=fu(Pt.Days,tu.Short,hr.Standalone);break;case"E":case"EE":case"EEE":e=fu(Pt.Days,tu.Abbreviated);break;case"EEEE":e=fu(Pt.Days,tu.Wide);break;case"EEEEE":e=fu(Pt.Days,tu.Narrow);break;case"EEEEEE":e=fu(Pt.Days,tu.Short);break;case"a":case"aa":case"aaa":e=fu(Pt.DayPeriods,tu.Abbreviated);break;case"aaaa":e=fu(Pt.DayPeriods,tu.Wide);break;case"aaaaa":e=fu(Pt.DayPeriods,tu.Narrow);break;case"b":case"bb":case"bbb":e=fu(Pt.DayPeriods,tu.Abbreviated,hr.Standalone,!0);break;case"bbbb":e=fu(Pt.DayPeriods,tu.Wide,hr.Standalone,!0);break;case"bbbbb":e=fu(Pt.DayPeriods,tu.Narrow,hr.Standalone,!0);break;case"B":case"BB":case"BBB":e=fu(Pt.DayPeriods,tu.Abbreviated,hr.Format,!0);break;case"BBBB":e=fu(Pt.DayPeriods,tu.Wide,hr.Format,!0);break;case"BBBBB":e=fu(Pt.DayPeriods,tu.Narrow,hr.Format,!0);break;case"h":e=$i(Tt.Hours,1,-12);break;case"hh":e=$i(Tt.Hours,2,-12);break;case"H":e=$i(Tt.Hours,1);break;case"HH":e=$i(Tt.Hours,2);break;case"m":e=$i(Tt.Minutes,1);break;case"mm":e=$i(Tt.Minutes,2);break;case"s":e=$i(Tt.Seconds,1);break;case"ss":e=$i(Tt.Seconds,2);break;case"S":e=$i(Tt.FractionalSeconds,1);break;case"SS":e=$i(Tt.FractionalSeconds,2);break;case"SSS":e=$i(Tt.FractionalSeconds,3);break;case"Z":case"ZZ":case"ZZZ":e=L_(Gs.Short);break;case"ZZZZZ":e=L_(Gs.Extended);break;case"O":case"OO":case"OOO":case"z":case"zz":case"zzz":e=L_(Gs.ShortGMT);break;case"OOOO":case"ZZZZ":case"zzzz":e=L_(Gs.Long);break;default:return null}return fz[t]=e,e}(g);m+=v?v(i,a,h):"''"===g?"'":g.replace(/(^'|'$)/g,"").replace(/''/g,"'")}),m}function z_(t,e,a){const u=new Date(0);return u.setFullYear(t,e,a),u.setHours(0,0,0),u}function fc(t,e){const a=function Ote(t){return Gr(t)[du.LocaleId]}(t);if(S_[a]??={},S_[a][e])return S_[a][e];let u="";switch(e){case"shortDate":u=A_(t,fo.Short);break;case"mediumDate":u=A_(t,fo.Medium);break;case"longDate":u=A_(t,fo.Long);break;case"fullDate":u=A_(t,fo.Full);break;case"shortTime":u=w_(t,fo.Short);break;case"mediumTime":u=w_(t,fo.Medium);break;case"longTime":u=w_(t,fo.Long);break;case"fullTime":u=w_(t,fo.Full);break;case"short":const i=fc(t,"shortTime"),r=fc(t,"shortDate");u=M_(B_(t,fo.Short),[i,r]);break;case"medium":const o=fc(t,"mediumTime"),d=fc(t,"mediumDate");u=M_(B_(t,fo.Medium),[o,d]);break;case"long":const h=fc(t,"longTime"),m=fc(t,"longDate");u=M_(B_(t,fo.Long),[h,m]);break;case"full":const g=fc(t,"fullTime"),v=fc(t,"fullDate");u=M_(B_(t,fo.Full),[g,v])}return u&&(S_[a][e]=u),u}function M_(t,e){return e&&(t=t.replace(/\{([^}]+)}/g,function(a,u){return null!=e&&u in e?e[u]:a})),t}function S0(t,e,a="-",u,i){let r="";(t<0||i&&t<=0)&&(i?t=1-t:(t=-t,r=a));let o=String(t);for(;o.length0||d>-a)&&(d+=a),t===Tt.Hours)0===d&&-12===a&&(d=12);else if(t===Tt.FractionalSeconds)return function tue(t,e){return S0(t,3).substring(0,e)}(d,e);const h=Ol(o,Zi.MinusSign);return S0(d,e,h,u,i)}}function fu(t,e,a=hr.Format,u=!1){return function(i,r){return function iue(t,e,a,u,i,r){switch(a){case Pt.Months:return function Kte(t,e,a){const u=Gr(t),r=jl([u[du.MonthsFormat],u[du.MonthsStandalone]],e);return jl(r,a)}(e,i,u)[t.getMonth()];case Pt.Days:return function Gte(t,e,a){const u=Gr(t),r=jl([u[du.DaysFormat],u[du.DaysStandalone]],e);return jl(r,a)}(e,i,u)[t.getDay()];case Pt.DayPeriods:const o=t.getHours(),d=t.getMinutes();if(r){const m=function Zte(t){const e=Gr(t);return JH(e),(e[du.ExtraData][2]||[]).map(u=>"string"==typeof u?kz(u):[kz(u[0]),kz(u[1])])}(e),g=function $te(t,e,a){const u=Gr(t);JH(u);const r=jl([u[du.ExtraData][0],u[du.ExtraData][1]],e)||[];return jl(r,a)||[]}(e,i,u),v=m.findIndex(k=>{if(Array.isArray(k)){const[x,D]=k,C=o>=x.hours&&d>=x.minutes,F=o0?Math.floor(i/60):Math.ceil(i/60);switch(t){case Gs.Short:return(i>=0?"+":"")+S0(o,2,r)+S0(Math.abs(i%60),2,r);case Gs.ShortGMT:return"GMT"+(i>=0?"+":"")+S0(o,1,r);case Gs.Long:return"GMT"+(i>=0?"+":"")+S0(o,2,r)+":"+S0(Math.abs(i%60),2,r);case Gs.Extended:return 0===u?"Z":(i>=0?"+":"")+S0(o,2,r)+":"+S0(Math.abs(i%60),2,r);default:throw new Error(`Unknown zone width "${t}"`)}}}!function(t){t[t.Short=0]="Short",t[t.ShortGMT=1]="ShortGMT",t[t.Long=2]="Long",t[t.Extended=3]="Extended"}(Gs||(Gs={})),function(t){t[t.FullYear=0]="FullYear",t[t.Month=1]="Month",t[t.Date=2]="Date",t[t.Hours=3]="Hours",t[t.Minutes=4]="Minutes",t[t.Seconds=5]="Seconds",t[t.FractionalSeconds=6]="FractionalSeconds",t[t.Day=7]="Day"}(Tt||(Tt={})),function(t){t[t.DayPeriods=0]="DayPeriods",t[t.Days=1]="Days",t[t.Months=2]="Months",t[t.Eras=3]="Eras"}(Pt||(Pt={}));const nue=0,T_=4;function ZH(t){const e=t.getDay(),a=0===e?-3:T_-e;return z_(t.getFullYear(),t.getMonth(),t.getDate()+a)}function xz(t,e=!1){return function(a,u){let i;if(e){const r=new Date(a.getFullYear(),a.getMonth(),1).getDay()-1,o=a.getDate();i=1+Math.floor((o+r)/7)}else{const r=ZH(a),o=function rue(t){const e=z_(t,nue,1).getDay();return z_(t,0,1+(e<=T_?T_:T_+7)-e)}(r.getFullYear()),d=r.getTime()-o.getTime();i=1+Math.round(d/6048e5)}return S0(i,t,Ol(u,Zi.MinusSign))}}function P_(t,e=!1){return function(a,u){return S0(ZH(a).getFullYear(),t,Ol(u,Zi.MinusSign),e)}}const fz={};function $H(t,e){t=t.replace(/:/g,"");const a=Date.parse("Jan 01, 1970 00:00:00 "+t)/6e4;return isNaN(a)?e:a}function qH(t){return t instanceof Date&&!isNaN(t.valueOf())}const hue=/^(\d+)?\.((\d+)(-(\d+))?)?$/,YH=22,N_=".",fx="0",mue=";",pue=",",Dz="#";function Cz(t,e,a,u,i,r,o=!1){let d="",h=!1;if(isFinite(t)){let m=function xue(t){let u,i,r,o,d,e=Math.abs(t)+"",a=0;for((i=e.indexOf(N_))>-1&&(e=e.replace(N_,"")),(r=e.search(/e/i))>0?(i<0&&(i=r),i+=+e.slice(r+1),e=e.substring(0,r)):i<0&&(i=e.length),r=0;e.charAt(r)===fx;r++);if(r===(d=e.length))u=[0],i=1;else{for(d--;e.charAt(d)===fx;)d--;for(i-=r,u=[],o=0;r<=d;r++,o++)u[o]=Number(e.charAt(r))}return i>YH&&(u=u.splice(0,YH-1),a=i-1,i=1),{digits:u,exponent:a,integerLen:i}}(t);o&&(m=function kue(t){if(0===t.digits[0])return t;const e=t.digits.length-t.integerLen;return t.exponent?t.exponent+=2:(0===e?t.digits.push(0,0):1===e&&t.digits.push(0),t.integerLen+=2),t}(m));let g=e.minInt,v=e.minFrac,k=e.maxFrac;if(r){const z=r.match(hue);if(null===z)throw new Error(`${r} is not a valid digit info`);const M=z[1],L=z[3],R=z[5];null!=M&&(g=_z(M)),null!=L&&(v=_z(L)),null!=R?k=_z(R):null!=L&&v>k&&(k=v)}!function fue(t,e,a){if(e>a)throw new Error(`The minimum number of digits after fraction (${e}) is higher than the maximum (${a}).`);let u=t.digits,i=u.length-t.integerLen;const r=Math.min(Math.max(e,i),a);let o=r+t.integerLen,d=u[o];if(o>0){u.splice(Math.max(t.integerLen,o));for(let v=o;v=5)if(o-1<0){for(let v=0;v>o;v--)u.unshift(0),t.integerLen++;u.unshift(1),t.integerLen++}else u[o-1]++;for(;i=m?D.pop():h=!1),k>=10?1:0},0);g&&(u.unshift(g),t.integerLen++)}(m,v,k);let x=m.digits,D=m.integerLen;const C=m.exponent;let F=[];for(h=x.every(z=>!z);D0?F=x.splice(D,x.length):(F=x,x=[0]);const A=[];for(x.length>=e.lgSize&&A.unshift(x.splice(-e.lgSize,x.length).join(""));x.length>e.gSize;)A.unshift(x.splice(-e.gSize,x.length).join(""));x.length&&A.unshift(x.join("")),d=A.join(Ol(a,u)),F.length&&(d+=Ol(a,i)+F.join("")),C&&(d+=Ol(a,Zi.Exponential)+"+"+C)}else d=Ol(a,Zi.Infinity);return d=t<0&&!h?e.negPre+d+e.negSuf:e.posPre+d+e.posSuf,d}function Eue(t,e,a,u,i){const o=yz(bz(e,xx.Currency),Ol(e,Zi.MinusSign));return o.minFrac=function Qte(t){let e;const a=WH[t];return a&&(e=a[2]),"number"==typeof e?e:Yte}(u),o.maxFrac=o.minFrac,Cz(t,o,e,Zi.CurrencyGroup,Zi.CurrencyDecimal,i).replace("\xa4",a).replace("\xa4","").trim()}function yz(t,e="-"){const a={minInt:1,minFrac:0,maxFrac:0,posPre:"",posSuf:"",negPre:"",negSuf:"",gSize:0,lgSize:0},u=t.split(mue),i=u[0],r=u[1],o=-1!==i.indexOf(N_)?i.split(N_):[i.substring(0,i.lastIndexOf(fx)+1),i.substring(i.lastIndexOf(fx)+1)],d=o[0],h=o[1]||"";a.posPre=d.substring(0,d.indexOf(Dz));for(let g=0;g-1||(i=a.getPluralCategory(t,u),e.indexOf(i)>-1))return i;if(e.indexOf("other")>-1)return"other";throw new Error(`No plural message found for value "${t}"`)}class Dx extends oE{constructor(e){super(),this.locale=e}getPluralCategory(e,a){switch(Jte(a||this.locale)(e)){case j4.Zero:return"zero";case j4.One:return"one";case j4.Two:return"two";case j4.Few:return"few";case j4.Many:return"many";default:return"other"}}static#e=this.\u0275fac=function(a){return new(a||Dx)(ye(Ec))};static#a=this.\u0275prov=oe({token:Dx,factory:Dx.\u0275fac})}function eV(t,e){e=encodeURIComponent(e);for(const a of t.split(";")){const u=a.indexOf("="),[i,r]=-1==u?[a,""]:[a.slice(0,u),a.slice(u+1)];if(i.trim()===e)return decodeURIComponent(r)}return null}const Fz=/\s+/,aV=[];class Q1{constructor(e,a){this._ngEl=e,this._renderer=a,this.initialClasses=aV,this.stateMap=new Map}set klass(e){this.initialClasses=null!=e?e.trim().split(Fz):aV}set ngClass(e){this.rawClass="string"==typeof e?e.trim().split(Fz):e}ngDoCheck(){for(const a of this.initialClasses)this._updateState(a,!0);const e=this.rawClass;if(Array.isArray(e)||e instanceof Set)for(const a of e)this._updateState(a,!0);else if(null!=e)for(const a of Object.keys(e))this._updateState(a,!!e[a]);this._applyStateDiff()}_updateState(e,a){const u=this.stateMap.get(e);void 0!==u?(u.enabled!==a&&(u.changed=!0,u.enabled=a),u.touched=!0):this.stateMap.set(e,{enabled:a,changed:!0,touched:!0})}_applyStateDiff(){for(const e of this.stateMap){const a=e[0],u=e[1];u.changed?(this._toggleClass(a,u.enabled),u.changed=!1):u.touched||(u.enabled&&this._toggleClass(a,!1),this.stateMap.delete(a)),u.touched=!1}}_toggleClass(e,a){(e=e.trim()).length>0&&e.split(Fz).forEach(u=>{a?this._renderer.addClass(this._ngEl.nativeElement,u):this._renderer.removeClass(this._ngEl.nativeElement,u)})}static#e=this.\u0275fac=function(a){return new(a||Q1)(X(Rt),X(Vn))};static#a=this.\u0275dir=Me({type:Q1,selectors:[["","ngClass",""]],inputs:{klass:[0,"class","klass"],ngClass:"ngClass"},standalone:!0})}class lE{constructor(e){this._viewContainerRef=e,this.ngComponentOutlet=null,this._inputsUsed=new Map}_needToReCreateNgModuleInstance(e){return void 0!==e.ngComponentOutletNgModule||void 0!==e.ngComponentOutletNgModuleFactory}_needToReCreateComponentInstance(e){return void 0!==e.ngComponentOutlet||void 0!==e.ngComponentOutletContent||void 0!==e.ngComponentOutletInjector||this._needToReCreateNgModuleInstance(e)}ngOnChanges(e){if(this._needToReCreateComponentInstance(e)&&(this._viewContainerRef.clear(),this._inputsUsed.clear(),this._componentRef=void 0,this.ngComponentOutlet)){const a=this.ngComponentOutletInjector||this._viewContainerRef.parentInjector;this._needToReCreateNgModuleInstance(e)&&(this._moduleRef?.destroy(),this.ngComponentOutletNgModule?this._moduleRef=function c(t,e){return new E(t,e??null,[])}(this.ngComponentOutletNgModule,tV(a)):this.ngComponentOutletNgModuleFactory?this._moduleRef=this.ngComponentOutletNgModuleFactory.create(tV(a)):this._moduleRef=void 0),this._componentRef=this._viewContainerRef.createComponent(this.ngComponentOutlet,{injector:a,ngModuleRef:this._moduleRef,projectableNodes:this.ngComponentOutletContent})}}ngDoCheck(){if(this._componentRef){if(this.ngComponentOutletInputs)for(const e of Object.keys(this.ngComponentOutletInputs))this._inputsUsed.set(e,!0);this._applyInputStateDiff(this._componentRef)}}ngOnDestroy(){this._moduleRef?.destroy()}_applyInputStateDiff(e){for(const[a,u]of this._inputsUsed)u?(e.setInput(a,this.ngComponentOutletInputs[a]),this._inputsUsed.set(a,!1)):(e.setInput(a,void 0),this._inputsUsed.delete(a))}static#e=this.\u0275fac=function(a){return new(a||lE)(X(sr))};static#a=this.\u0275dir=Me({type:lE,selectors:[["","ngComponentOutlet",""]],inputs:{ngComponentOutlet:"ngComponentOutlet",ngComponentOutletInputs:"ngComponentOutletInputs",ngComponentOutletInjector:"ngComponentOutletInjector",ngComponentOutletContent:"ngComponentOutletContent",ngComponentOutletNgModule:"ngComponentOutletNgModule",ngComponentOutletNgModuleFactory:"ngComponentOutletNgModuleFactory"},standalone:!0,features:[nn]})}function tV(t){return t.get(n).injector}class Due{constructor(e,a,u,i){this.$implicit=e,this.ngForOf=a,this.index=u,this.count=i}get first(){return 0===this.index}get last(){return this.index===this.count-1}get even(){return this.index%2==0}get odd(){return!this.even}}class G4{set ngForOf(e){this._ngForOf=e,this._ngForOfDirty=!0}set ngForTrackBy(e){this._trackByFn=e}get ngForTrackBy(){return this._trackByFn}constructor(e,a,u){this._viewContainer=e,this._template=a,this._differs=u,this._ngForOf=null,this._ngForOfDirty=!0,this._differ=null}set ngForTemplate(e){e&&(this._template=e)}ngDoCheck(){if(this._ngForOfDirty){this._ngForOfDirty=!1;const e=this._ngForOf;!this._differ&&e&&(this._differ=this._differs.find(e).create(this.ngForTrackBy))}if(this._differ){const e=this._differ.diff(this._ngForOf);e&&this._applyChanges(e)}}_applyChanges(e){const a=this._viewContainer;e.forEachOperation((u,i,r)=>{if(null==u.previousIndex)a.createEmbeddedView(this._template,new Due(u.item,this._ngForOf,-1,-1),null===r?void 0:r);else if(null==r)a.remove(null===i?void 0:i);else if(null!==i){const o=a.get(i);a.move(o,r),uV(o,u)}});for(let u=0,i=a.length;u{uV(a.get(u.currentIndex),u)})}static ngTemplateContextGuard(e,a){return!0}static#e=this.\u0275fac=function(a){return new(a||G4)(X(sr),X(st),X(vc))};static#a=this.\u0275dir=Me({type:G4,selectors:[["","ngFor","","ngForOf",""]],inputs:{ngForOf:"ngForOf",ngForTrackBy:"ngForTrackBy",ngForTemplate:"ngForTemplate"},standalone:!0})}function uV(t,e){t.context.$implicit=e.item}class K4{constructor(e,a){this._viewContainer=e,this._context=new Cue,this._thenTemplateRef=null,this._elseTemplateRef=null,this._thenViewRef=null,this._elseViewRef=null,this._thenTemplateRef=a}set ngIf(e){this._context.$implicit=this._context.ngIf=e,this._updateView()}set ngIfThen(e){iV("ngIfThen",e),this._thenTemplateRef=e,this._thenViewRef=null,this._updateView()}set ngIfElse(e){iV("ngIfElse",e),this._elseTemplateRef=e,this._elseViewRef=null,this._updateView()}_updateView(){this._context.$implicit?this._thenViewRef||(this._viewContainer.clear(),this._elseViewRef=null,this._thenTemplateRef&&(this._thenViewRef=this._viewContainer.createEmbeddedView(this._thenTemplateRef,this._context))):this._elseViewRef||(this._viewContainer.clear(),this._thenViewRef=null,this._elseTemplateRef&&(this._elseViewRef=this._viewContainer.createEmbeddedView(this._elseTemplateRef,this._context)))}static ngTemplateContextGuard(e,a){return!0}static#e=this.\u0275fac=function(a){return new(a||K4)(X(sr),X(st))};static#a=this.\u0275dir=Me({type:K4,selectors:[["","ngIf",""]],inputs:{ngIf:"ngIf",ngIfThen:"ngIfThen",ngIfElse:"ngIfElse"},standalone:!0})}class Cue{constructor(){this.$implicit=null,this.ngIf=null}}function iV(t,e){if(e&&!e.createEmbeddedView)throw new Error(`${t} must be a TemplateRef, but received '${ou(e)}'.`)}class Az{constructor(e,a){this._viewContainerRef=e,this._templateRef=a,this._created=!1}create(){this._created=!0,this._viewContainerRef.createEmbeddedView(this._templateRef)}destroy(){this._created=!1,this._viewContainerRef.clear()}enforceState(e){e&&!this._created?this.create():!e&&this._created&&this.destroy()}}class X1{constructor(){this._defaultViews=[],this._defaultUsed=!1,this._caseCount=0,this._lastCaseCheckIndex=0,this._lastCasesMatched=!1}set ngSwitch(e){this._ngSwitch=e,0===this._caseCount&&this._updateDefaultCases(!0)}_addCase(){return this._caseCount++}_addDefault(e){this._defaultViews.push(e)}_matchCase(e){const a=e===this._ngSwitch;return this._lastCasesMatched||=a,this._lastCaseCheckIndex++,this._lastCaseCheckIndex===this._caseCount&&(this._updateDefaultCases(!this._lastCasesMatched),this._lastCaseCheckIndex=0,this._lastCasesMatched=!1),a}_updateDefaultCases(e){if(this._defaultViews.length>0&&e!==this._defaultUsed){this._defaultUsed=e;for(const a of this._defaultViews)a.enforceState(e)}}static#e=this.\u0275fac=function(a){return new(a||X1)};static#a=this.\u0275dir=Me({type:X1,selectors:[["","ngSwitch",""]],inputs:{ngSwitch:"ngSwitch"},standalone:!0})}class sE{constructor(e,a,u){this.ngSwitch=u,u._addCase(),this._view=new Az(e,a)}ngDoCheck(){this._view.enforceState(this.ngSwitch._matchCase(this.ngSwitchCase))}static#e=this.\u0275fac=function(a){return new(a||sE)(X(sr),X(st),X(X1,9))};static#a=this.\u0275dir=Me({type:sE,selectors:[["","ngSwitchCase",""]],inputs:{ngSwitchCase:"ngSwitchCase"},standalone:!0})}class dE{constructor(e,a,u){u._addDefault(new Az(e,a))}static#e=this.\u0275fac=function(a){return new(a||dE)(X(sr),X(st),X(X1,9))};static#a=this.\u0275dir=Me({type:dE,selectors:[["","ngSwitchDefault",""]],standalone:!0})}class W4{constructor(e){this._localization=e,this._caseViews={}}set ngPlural(e){this._updateView(e)}addCase(e,a){this._caseViews[e]=a}_updateView(e){this._clearViews();const u=XH(e,Object.keys(this._caseViews),this._localization);this._activateView(this._caseViews[u])}_clearViews(){this._activeView&&this._activeView.destroy()}_activateView(e){e&&(this._activeView=e,this._activeView.create())}static#e=this.\u0275fac=function(a){return new(a||W4)(X(oE))};static#a=this.\u0275dir=Me({type:W4,selectors:[["","ngPlural",""]],inputs:{ngPlural:"ngPlural"},standalone:!0})}class cE{constructor(e,a,u,i){this.value=e;const r=!isNaN(Number(e));i.addCase(r?`=${e}`:e,new Az(u,a))}static#e=this.\u0275fac=function(a){return new(a||cE)(Zd("ngPluralCase"),X(st),X(sr),X(W4,1))};static#a=this.\u0275dir=Me({type:cE,selectors:[["","ngPluralCase",""]],standalone:!0})}class hE{constructor(e,a,u){this._ngEl=e,this._differs=a,this._renderer=u,this._ngStyle=null,this._differ=null}set ngStyle(e){this._ngStyle=e,!this._differ&&e&&(this._differ=this._differs.find(e).create())}ngDoCheck(){if(this._differ){const e=this._differ.diff(this._ngStyle);e&&this._applyChanges(e)}}_setStyle(e,a){const[u,i]=e.split("."),r=-1===u.indexOf("-")?void 0:k0.DashCase;null!=a?this._renderer.setStyle(this._ngEl.nativeElement,u,i?`${a}${i}`:a,r):this._renderer.removeStyle(this._ngEl.nativeElement,u,r)}_applyChanges(e){e.forEachRemovedItem(a=>this._setStyle(a.key,null)),e.forEachAddedItem(a=>this._setStyle(a.key,a.currentValue)),e.forEachChangedItem(a=>this._setStyle(a.key,a.currentValue))}static#e=this.\u0275fac=function(a){return new(a||hE)(X(Rt),X(Vs),X(Vn))};static#a=this.\u0275dir=Me({type:hE,selectors:[["","ngStyle",""]],inputs:{ngStyle:"ngStyle"},standalone:!0})}class eh{constructor(e){this._viewContainerRef=e,this._viewRef=null,this.ngTemplateOutletContext=null,this.ngTemplateOutlet=null,this.ngTemplateOutletInjector=null}ngOnChanges(e){if(this._shouldRecreateView(e)){const a=this._viewContainerRef;if(this._viewRef&&a.remove(a.indexOf(this._viewRef)),!this.ngTemplateOutlet)return void(this._viewRef=null);const u=this._createContextForwardProxy();this._viewRef=a.createEmbeddedView(this.ngTemplateOutlet,u,{injector:this.ngTemplateOutletInjector??void 0})}}_shouldRecreateView(e){return!!e.ngTemplateOutlet||!!e.ngTemplateOutletInjector}_createContextForwardProxy(){return new Proxy({},{set:(e,a,u)=>!!this.ngTemplateOutletContext&&Reflect.set(this.ngTemplateOutletContext,a,u),get:(e,a,u)=>{if(this.ngTemplateOutletContext)return Reflect.get(this.ngTemplateOutletContext,a,u)}})}static#e=this.\u0275fac=function(a){return new(a||eh)(X(sr))};static#a=this.\u0275dir=Me({type:eh,selectors:[["","ngTemplateOutlet",""]],inputs:{ngTemplateOutletContext:"ngTemplateOutletContext",ngTemplateOutlet:"ngTemplateOutlet",ngTemplateOutletInjector:"ngTemplateOutletInjector"},standalone:!0,features:[nn]})}function z0(t,e){return new Z(2100,!1)}const Fue=new class _ue{createSubscription(e,a){return e.then(a,u=>{throw u})}dispose(e){}},Aue=new class yue{createSubscription(e,a){return Os(()=>e.subscribe({next:a,error:u=>{throw u}}))}dispose(e){Os(()=>e.unsubscribe())}};class U4{constructor(e){this._latestValue=null,this.markForCheckOnValueUpdate=!0,this._subscription=null,this._obj=null,this._strategy=null,this._ref=e}ngOnDestroy(){this._subscription&&this._dispose(),this._ref=null}transform(e){if(!this._obj){if(e)try{this.markForCheckOnValueUpdate=!1,this._subscribe(e)}finally{this.markForCheckOnValueUpdate=!0}return this._latestValue}return e!==this._obj?(this._dispose(),this.transform(e)):this._latestValue}_subscribe(e){this._obj=e,this._strategy=this._selectStrategy(e),this._subscription=this._strategy.createSubscription(e,a=>this._updateLatestValue(e,a))}_selectStrategy(e){if(sx(e))return Fue;if(WR(e))return Aue;throw z0()}_dispose(){this._strategy.dispose(this._subscription),this._latestValue=null,this._subscription=null,this._obj=null}_updateLatestValue(e,a){e===this._obj&&(this._latestValue=a,this.markForCheckOnValueUpdate&&this._ref?.markForCheck())}static#e=this.\u0275fac=function(a){return new(a||U4)(X(Xu,16))};static#a=this.\u0275pipe=Ai({name:"async",type:U4,pure:!1,standalone:!0})}class J4{transform(e){if(null==e)return null;if("string"!=typeof e)throw z0();return e.toLowerCase()}static#e=this.\u0275fac=function(a){return new(a||J4)};static#a=this.\u0275pipe=Ai({name:"lowercase",type:J4,pure:!0,standalone:!0})}const wue=/(?:[0-9A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF40\uDF42-\uDF49\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD23\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF1C\uDF27\uDF30-\uDF45\uDF70-\uDF81\uDFB0-\uDFC4\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDEB8\uDF00-\uDF1A\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCDF\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDEE0-\uDEF2\uDFB0]|\uD808[\uDC00-\uDF99]|\uD809[\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE70-\uDEBE\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD50-\uDD52\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD837[\uDF00-\uDF1E]|\uD838[\uDD00-\uDD2C\uDD37-\uDD3D\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB]|\uD839[\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43\uDD4B]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF38\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A])\S*/g;class Z4{transform(e){if(null==e)return null;if("string"!=typeof e)throw z0();return e.replace(wue,a=>a[0].toUpperCase()+a.slice(1).toLowerCase())}static#e=this.\u0275fac=function(a){return new(a||Z4)};static#a=this.\u0275pipe=Ai({name:"titlecase",type:Z4,pure:!0,standalone:!0})}class $4{transform(e){if(null==e)return null;if("string"!=typeof e)throw z0();return e.toUpperCase()}static#e=this.\u0275fac=function(a){return new(a||$4)};static#a=this.\u0275pipe=Ai({name:"uppercase",type:$4,pure:!0,standalone:!0})}const Sue=new he(""),zue=new he("");class q4{constructor(e,a,u){this.locale=e,this.defaultTimezone=a,this.defaultOptions=u}transform(e,a,u,i){if(null==e||""===e||e!=e)return null;try{const r=a??this.defaultOptions?.dateFormat??"mediumDate",o=u??this.defaultOptions?.timezone??this.defaultTimezone??void 0;return aue(e,r,i||this.locale,o)}catch(r){throw z0(0,r.message)}}static#e=this.\u0275fac=function(a){return new(a||q4)(X(Ec,16),X(Sue,24),X(zue,24))};static#a=this.\u0275pipe=Ai({name:"date",type:q4,pure:!0,standalone:!0})}const Mue=/#/g;class Y4{constructor(e){this._localization=e}transform(e,a,u){if(null==e)return"";if("object"!=typeof a||null===a)throw z0();return a[XH(e,Object.keys(a),this._localization,u)].replace(Mue,e.toString())}static#e=this.\u0275fac=function(a){return new(a||Y4)(X(oE,16))};static#a=this.\u0275pipe=Ai({name:"i18nPlural",type:Y4,pure:!0,standalone:!0})}class Q4{transform(e,a){if(null==e)return"";if("object"!=typeof a||"string"!=typeof e)throw z0();return a.hasOwnProperty(e)?a[e]:a.hasOwnProperty("other")?a.other:""}static#e=this.\u0275fac=function(a){return new(a||Q4)};static#a=this.\u0275pipe=Ai({name:"i18nSelect",type:Q4,pure:!0,standalone:!0})}class mE{transform(e){return JSON.stringify(e,null,2)}static#e=this.\u0275fac=function(a){return new(a||mE)};static#a=this.\u0275pipe=Ai({name:"json",type:mE,pure:!1,standalone:!0})}class pE{constructor(e){this.differs=e,this.keyValues=[],this.compareFn=nV}transform(e,a=nV){if(!e||!(e instanceof Map)&&"object"!=typeof e)return null;this.differ??=this.differs.find(e).create();const u=this.differ.diff(e),i=a!==this.compareFn;return u&&(this.keyValues=[],u.forEachItem(r=>{this.keyValues.push(function Lue(t,e){return{key:t,value:e}}(r.key,r.currentValue))})),(u||i)&&(this.keyValues.sort(a),this.compareFn=a),this.keyValues}static#e=this.\u0275fac=function(a){return new(a||pE)(X(Vs,16))};static#a=this.\u0275pipe=Ai({name:"keyvalue",type:pE,pure:!1,standalone:!0})}function nV(t,e){const a=t.key,u=e.key;if(a===u)return 0;if(void 0===a)return 1;if(void 0===u)return-1;if(null===a)return 1;if(null===u)return-1;if("string"==typeof a&&"string"==typeof u)return arV(U(yn))?new Pue(U(ei),window):new Iue})}class Pue{constructor(e,a){this.document=e,this.window=a,this.offset=()=>[0,0]}setOffset(e){Array.isArray(e)?this.offset=()=>e:this.offset=e}getScrollPosition(){return[this.window.scrollX,this.window.scrollY]}scrollToPosition(e){this.window.scrollTo(e[0],e[1])}scrollToAnchor(e){const a=function Nue(t,e){const a=t.getElementById(e)||t.getElementsByName(e)[0];if(a)return a;if("function"==typeof t.createTreeWalker&&t.body&&"function"==typeof t.body.attachShadow){const u=t.createTreeWalker(t.body,NodeFilter.SHOW_ELEMENT);let i=u.currentNode;for(;i;){const r=i.shadowRoot;if(r){const o=r.getElementById(e)||r.querySelector(`[name="${e}"]`);if(o)return o}i=u.nextNode()}}return null}(this.document,e);a&&(this.scrollToElement(a),a.focus())}setHistoryScrollRestoration(e){this.window.history.scrollRestoration=e}scrollToElement(e){const a=e.getBoundingClientRect(),u=a.left+this.window.pageXOffset,i=a.top+this.window.pageYOffset,r=this.offset();this.window.scrollTo(u-r[0],i-r[1])}}class Iue{setOffset(e){}getScrollPosition(){return[0,0]}scrollToPosition(e){}scrollToAnchor(e){}setHistoryScrollRestoration(e){}}class oV{}const R_="20";function gE(t,e){return H_(t)?new URL(t):new URL(t,e.location.href)}function H_(t){return/^https?:\/\//.test(t)}function lV(t){return H_(t)?new URL(t).hostname:t}function sV(t){if("string"!=typeof t||""===t.trim())return!1;try{new URL(t);return!0}catch{return!1}}function Hue(t){return t.startsWith("/")?t.slice(1):t}const EE=t=>t.src,Mz=new he("",{providedIn:"root",factory:()=>EE});function V_(t,e){return function(u){return sV(u)||function Vue(t,e){throw new Z(2959,!1)}(),u=function Rue(t){return t.endsWith("/")?t.slice(0,-1):t}(u),[{provide:Mz,useValue:o=>(H_(o.src)&&function Oue(t,e){throw new Z(2959,!1)}(0,o.src),t(u,{...o,src:Hue(o.src)}))}]}}V_(function jue(t,e){let a="format=auto";return e.width&&(a+=`,width=${e.width}`),e.isPlaceholder&&(a+=`,quality=${R_}`),`${t}/cdn-cgi/image/${a}/${e.src}`});V_(function Uue(t,e){let u="f_auto,"+(e.isPlaceholder?"q_auto:low":"q_auto");return e.width&&(u+=`,w_${e.width}`),`${t}/image/upload/${u}/${e.src}`});V_(function que(t,e){const{src:a,width:u}=e,i=[];u&&i.push(`w-${u}`),e.isPlaceholder&&i.push(`q-${R_}`);const r=i.length?[t,`tr:${i.join(",")}`,a]:[t,a];return new URL(r.join("/")).href});V_(function eie(t,e){const a=new URL(`${t}/${e.src}`);return a.searchParams.set("auto","format"),e.width&&a.searchParams.set("w",e.width.toString()),e.isPlaceholder&&a.searchParams.set("q",R_),a.href});function uu(t,e=!0){return`The NgOptimizedImage directive ${e?`(activated on an element with the \`ngSrc="${t}"\`) `:""}has detected that`}function cV(t){throw new Z(2958,`Unexpected invocation of the ${t} in the prod mode. Please make sure that the prod mode is enabled for production builds.`)}class O_{constructor(){this.images=new Map,this.window=null,this.observer=null;const e=rV(U(yn));cV("LCP checker");const a=U(ei).defaultView;e&&typeof PerformanceObserver<"u"&&(this.window=a,this.observer=this.initPerformanceObserver())}initPerformanceObserver(){const e=new PerformanceObserver(a=>{const u=a.getEntries();if(0===u.length)return;const r=u[u.length-1].element?.src??"";if(r.startsWith("data:")||r.startsWith("blob:"))return;const o=this.images.get(r);o&&(!o.priority&&!o.alreadyWarnedPriority&&(o.alreadyWarnedPriority=!0,function nie(t){const e=uu(t);console.error(Fi(2955,`${e} this image is the Largest Contentful Paint (LCP) element but was not marked "priority". This image should be marked "priority" in order to prioritize its loading. To fix this, add the "priority" attribute.`))}(r)),o.modified&&!o.alreadyWarnedModified&&(o.alreadyWarnedModified=!0,function rie(t){const e=uu(t);console.warn(Fi(2964,`${e} this image is the Largest Contentful Paint (LCP) element and has had its "ngSrc" attribute modified. This can cause slower loading performance. It is recommended not to modify the "ngSrc" property on any image which could be the LCP element.`))}(r)))});return e.observe({type:"largest-contentful-paint",buffered:!0}),e}registerImage(e,a,u){if(!this.observer)return;const i={priority:u,modified:!1,alreadyWarnedModified:!1,alreadyWarnedPriority:!1};this.images.set(gE(e,this.window).href,i)}unregisterImage(e){this.observer&&this.images.delete(gE(e,this.window).href)}updateImage(e,a){if(!this.observer)return;const u=gE(e,this.window).href,i=this.images.get(u);i&&(i.modified=!0,this.images.set(gE(a,this.window).href,i),this.images.delete(u))}ngOnDestroy(){this.observer&&(this.observer.disconnect(),this.images.clear())}static#e=this.\u0275fac=function(a){return new(a||O_)};static#a=this.\u0275prov=oe({token:O_,factory:O_.\u0275fac,providedIn:"root"})}const oie=new Set(["localhost","127.0.0.1","0.0.0.0"]),lie=new he("");class j_{constructor(){this.document=U(ei),this.isServer=I_(U(yn)),this.preconnectLinks=null,this.alreadySeen=new Set,this.window=null,this.blocklist=new Set(oie),cV("preconnect link checker");const e=this.document.defaultView;typeof e<"u"&&(this.window=e);const a=U(lie,{optional:!0});a&&this.populateBlocklist(a)}populateBlocklist(e){Array.isArray(e)?hV(e,a=>{this.blocklist.add(lV(a))}):this.blocklist.add(lV(e))}assertPreconnect(e,a){if(this.isServer)return;const u=gE(e,this.window);this.blocklist.has(u.hostname)||this.alreadySeen.has(u.origin)||(this.alreadySeen.add(u.origin),this.preconnectLinks??=this.queryPreconnectLinks(),this.preconnectLinks.has(u.origin)||console.warn(Fi(2956,`${uu(a)} there is no preconnect tag present for this image. Preconnecting to the origin(s) that serve priority images ensures that these images are delivered as soon as possible. To fix this, please add the following element into the of the document:\n `)))}queryPreconnectLinks(){const e=new Set,u=Array.from(this.document.querySelectorAll("link[rel=preconnect]"));for(let i of u){const r=gE(i.href,this.window);e.add(r.origin)}return e}ngOnDestroy(){this.preconnectLinks?.clear(),this.alreadySeen.clear()}static#e=this.\u0275fac=function(a){return new(a||j_)};static#a=this.\u0275prov=oe({token:j_,factory:j_.\u0275fac,providedIn:"root"})}function hV(t,e){for(let a of t)Array.isArray(a)?hV(a,e):e(a)}const sie=new he("NG_OPTIMIZED_PRELOADED_IMAGES",{providedIn:"root",factory:()=>new Set});class Cx{constructor(){this.preloadedImages=U(sie),this.document=U(ei)}createPreloadLinkTag(e,a,u,i){if(this.preloadedImages.has(a))return;this.preloadedImages.add(a);const r=e.createElement("link");e.setAttribute(r,"as","image"),e.setAttribute(r,"href",a),e.setAttribute(r,"rel","preload"),e.setAttribute(r,"fetchpriority","high"),i&&e.setAttribute(r,"imageSizes",i),u&&e.setAttribute(r,"imageSrcset",u),e.appendChild(this.document.head,r)}static#e=this.\u0275fac=function(a){return new(a||Cx)};static#a=this.\u0275prov=oe({token:Cx,factory:Cx.\u0275fac,providedIn:"root"})}const pV=/^((\s*\d+w\s*(,|$)){1,})$/,cie=[1,2];class Pz{constructor(){this.imageLoader=U(Mz),this.config=function Eie(t){let e={};return t.breakpoints&&(e.breakpoints=t.breakpoints.sort((a,u)=>a-u)),Object.assign({},S1,t,e)}(U(hb)),this.renderer=U(Vn),this.imgElement=U(Rt).nativeElement,this.injector=U(su),this.isServer=I_(U(yn)),this.preloadLinkCreator=U(Cx),this.lcpObserver=null,this._renderedSrc=null,this.priority=!1,this.disableOptimizedSrcset=!1,this.fill=!1}ngOnInit(){Ui("NgOptimizedImage"),this.placeholder&&this.removePlaceholderOnLoad(this.imgElement),this.setHostAttributes()}setHostAttributes(){this.fill?this.sizes||="100vw":(this.setHostAttribute("width",this.width.toString()),this.setHostAttribute("height",this.height.toString())),this.setHostAttribute("loading",this.getLoadingBehavior()),this.setHostAttribute("fetchpriority",this.getFetchPriority()),this.setHostAttribute("ng-img","true");const e=this.updateSrcAndSrcset();this.sizes&&this.setHostAttribute("sizes",this.sizes),this.isServer&&this.priority&&this.preloadLinkCreator.createPreloadLinkTag(this.renderer,this.getRewrittenSrc(),e,this.sizes)}ngOnChanges(e){if(e.ngSrc&&!e.ngSrc.isFirstChange()){const a=this._renderedSrc;this.updateSrcAndSrcset(!0);const u=this._renderedSrc;null!==this.lcpObserver&&a&&u&&a!==u&&this.injector.get(rt).runOutsideAngular(()=>{this.lcpObserver?.updateImage(a,u)})}}callImageLoader(e){let a=e;return this.loaderParams&&(a.loaderParams=this.loaderParams),this.imageLoader(a)}getLoadingBehavior(){return this.priority||void 0===this.loading?this.priority?"eager":"lazy":this.loading}getFetchPriority(){return this.priority?"high":"auto"}getRewrittenSrc(){if(!this._renderedSrc){const e={src:this.ngSrc};this._renderedSrc=this.callImageLoader(e)}return this._renderedSrc}getRewrittenSrcset(){const e=pV.test(this.ngSrcset);return this.ngSrcset.split(",").filter(u=>""!==u).map(u=>{u=u.trim();const i=e?parseFloat(u):parseFloat(u)*this.width;return`${this.callImageLoader({src:this.ngSrc,width:i})} ${u}`}).join(", ")}getAutomaticSrcset(){return this.sizes?this.getResponsiveSrcset():this.getFixedSrcset()}getResponsiveSrcset(){const{breakpoints:e}=this.config;let a=e;return"100vw"===this.sizes?.trim()&&(a=e.filter(i=>i>=640)),a.map(i=>`${this.callImageLoader({src:this.ngSrc,width:i})} ${i}w`).join(", ")}updateSrcAndSrcset(e=!1){e&&(this._renderedSrc=null);const a=this.getRewrittenSrc();let u;return this.setHostAttribute("src",a),this.ngSrcset?u=this.getRewrittenSrcset():this.shouldGenerateAutomaticSrcset()&&(u=this.getAutomaticSrcset()),u&&this.setHostAttribute("srcset",u),u}getFixedSrcset(){return cie.map(a=>`${this.callImageLoader({src:this.ngSrc,width:this.width*a})} ${a}x`).join(", ")}shouldGenerateAutomaticSrcset(){let e=!1;return this.sizes||(e=this.width>1920||this.height>1080),!this.disableOptimizedSrcset&&!this.srcset&&this.imageLoader!==EE&&!e}generatePlaceholder(e){const{placeholderResolution:a}=this.config;return!0===e?`url(${this.callImageLoader({src:this.ngSrc,width:a,isPlaceholder:!0})})`:"string"==typeof e?`url(${e})`:null}shouldBlurPlaceholder(e){return!e||!e.hasOwnProperty("blur")||!!e.blur}removePlaceholderOnLoad(e){const a=()=>{const r=this.injector.get(Xu);u(),i(),this.placeholder=!1,r.markForCheck()},u=this.renderer.listen(e,"load",a),i=this.renderer.listen(e,"error",a)}ngOnDestroy(){}setHostAttribute(e,a){this.renderer.setAttribute(this.imgElement,e,a)}static#e=this.\u0275fac=function(a){return new(a||Pz)};static#a=this.\u0275dir=Me({type:Pz,selectors:[["img","ngSrc",""]],hostVars:18,hostBindings:function(a,u){2&a&&zS("position",u.fill?"absolute":null)("width",u.fill?"100%":null)("height",u.fill?"100%":null)("inset",u.fill?"0":null)("background-size",u.placeholder?"cover":null)("background-position",u.placeholder?"50% 50%":null)("background-repeat",u.placeholder?"no-repeat":null)("background-image",u.placeholder?u.generatePlaceholder(u.placeholder):null)("filter",u.placeholder&&u.shouldBlurPlaceholder(u.placeholderConfig)?"blur(15px)":null)},inputs:{ngSrc:[2,"ngSrc","ngSrc",Cie],ngSrcset:"ngSrcset",sizes:"sizes",width:[2,"width","width",iE],height:[2,"height","height",iE],loading:"loading",priority:[2,"priority","priority",au],loaderParams:"loaderParams",disableOptimizedSrcset:[2,"disableOptimizedSrcset","disableOptimizedSrcset",au],fill:[2,"fill","fill",au],placeholder:[2,"placeholder","placeholder",yie],placeholderConfig:"placeholderConfig",src:"src",srcset:"srcset"},standalone:!0,features:[s,nn]})}function Cie(t){return"string"==typeof t?t:rr(t)}function yie(t){return"string"==typeof t&&"true"!==t&&"false"!==t&&""!==t?t:au(t)}class _ie extends Ite{constructor(){super(...arguments),this.supportsDOMEvents=!0}}class Iz extends _ie{static makeCurrent(){!function Nte(t){VH??=t}(new Iz)}onAndCancel(e,a,u){return e.addEventListener(a,u),()=>{e.removeEventListener(a,u)}}dispatchEvent(e,a){e.dispatchEvent(a)}remove(e){e.parentNode&&e.parentNode.removeChild(e)}createElement(e,a){return(a=a||this.getDefaultDocument()).createElement(e)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(e){return e.nodeType===Node.ELEMENT_NODE}isShadowRoot(e){return e instanceof DocumentFragment}getGlobalEventTarget(e,a){return"window"===a?window:"document"===a?e:"body"===a?e.body:null}getBaseHref(e){const a=function Fie(){return _x=_x||document.querySelector("base"),_x?_x.getAttribute("href"):null}();return null==a?null:function Aie(t){return new URL(t,document.baseURI).pathname}(a)}resetBaseElement(){_x=null}getUserAgent(){return window.navigator.userAgent}getCookie(e){return eV(document.cookie,e)}}let _x=null;class Fx{build(){return new XMLHttpRequest}static#e=this.\u0275fac=function(a){return new(a||Fx)};static#a=this.\u0275prov=oe({token:Fx,factory:Fx.\u0275fac})}const Ax=new he("");class bE{constructor(e,a){this._zone=a,this._eventNameToPlugin=new Map,e.forEach(u=>{u.manager=this}),this._plugins=e.slice().reverse()}addEventListener(e,a,u){return this._findPluginFor(a).addEventListener(e,a,u)}getZone(){return this._zone}_findPluginFor(e){let a=this._eventNameToPlugin.get(e);if(a)return a;if(a=this._plugins.find(i=>i.supports(e)),!a)throw new Z(5101,!1);return this._eventNameToPlugin.set(e,a),a}static#e=this.\u0275fac=function(a){return new(a||bE)(ye(Ax),ye(rt))};static#a=this.\u0275prov=oe({token:bE,factory:bE.\u0275fac})}class K_{constructor(e){this._doc=e}}const Rz="ng-app-id";class kE{constructor(e,a,u,i={}){this.doc=e,this.appId=a,this.nonce=u,this.platformId=i,this.styleRef=new Map,this.hostNodes=new Set,this.styleNodesInDOM=this.collectServerRenderedStyles(),this.platformIsServer=I_(i),this.resetHostNodes()}addStyles(e){for(const a of e)1===this.changeUsageCount(a,1)&&this.onStyleAdded(a)}removeStyles(e){for(const a of e)this.changeUsageCount(a,-1)<=0&&this.onStyleRemoved(a)}ngOnDestroy(){const e=this.styleNodesInDOM;e&&(e.forEach(a=>a.remove()),e.clear());for(const a of this.getAllStyles())this.onStyleRemoved(a);this.resetHostNodes()}addHost(e){this.hostNodes.add(e);for(const a of this.getAllStyles())this.addStyleToHost(e,a)}removeHost(e){this.hostNodes.delete(e)}getAllStyles(){return this.styleRef.keys()}onStyleAdded(e){for(const a of this.hostNodes)this.addStyleToHost(a,e)}onStyleRemoved(e){const a=this.styleRef;a.get(e)?.elements?.forEach(u=>u.remove()),a.delete(e)}collectServerRenderedStyles(){const e=this.doc.head?.querySelectorAll(`style[${Rz}="${this.appId}"]`);if(e?.length){const a=new Map;return e.forEach(u=>{null!=u.textContent&&a.set(u.textContent,u)}),a}return null}changeUsageCount(e,a){const u=this.styleRef;if(u.has(e)){const i=u.get(e);return i.usage+=a,i.usage}return u.set(e,{usage:a,elements:[]}),a}getStyleElement(e,a){const u=this.styleNodesInDOM,i=u?.get(a);if(i?.parentNode===e)return u.delete(a),i.removeAttribute(Rz),i;{const r=this.doc.createElement("style");return this.nonce&&r.setAttribute("nonce",this.nonce),r.textContent=a,this.platformIsServer&&r.setAttribute(Rz,this.appId),e.appendChild(r),r}}addStyleToHost(e,a){const u=this.getStyleElement(e,a),i=this.styleRef,r=i.get(a)?.elements;r?r.push(u):i.set(a,{elements:[u],usage:1})}resetHostNodes(){const e=this.hostNodes;e.clear(),e.add(this.doc.head)}static#e=this.\u0275fac=function(a){return new(a||kE)(ye(ei),ye(B1),ye(Wi,8),ye(yn))};static#a=this.\u0275prov=oe({token:kE,factory:kE.\u0275fac})}const Hz={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/",math:"http://www.w3.org/1998/Math/MathML"},Vz=/%COMP%/g,Bie="_nghost-%COMP%",Sie="_ngcontent-%COMP%",Mie=new he("",{providedIn:"root",factory:()=>true});function fV(t,e){return e.map(a=>a.replace(Vz,t))}class xE{constructor(e,a,u,i,r,o,d,h=null){this.eventManager=e,this.sharedStylesHost=a,this.appId=u,this.removeStylesOnCompDestroy=i,this.doc=r,this.platformId=o,this.ngZone=d,this.nonce=h,this.rendererByCompId=new Map,this.platformIsServer=I_(o),this.defaultRenderer=new Oz(e,r,d,this.platformIsServer)}createRenderer(e,a){if(!e||!a)return this.defaultRenderer;this.platformIsServer&&a.encapsulation===Ga.ShadowDom&&(a={...a,encapsulation:Ga.Emulated});const u=this.getOrCreateRenderer(e,a);return u instanceof CV?u.applyToHost(e):u instanceof jz&&u.applyStyles(),u}getOrCreateRenderer(e,a){const u=this.rendererByCompId;let i=u.get(a.id);if(!i){const r=this.doc,o=this.ngZone,d=this.eventManager,h=this.sharedStylesHost,m=this.removeStylesOnCompDestroy,g=this.platformIsServer;switch(a.encapsulation){case Ga.Emulated:i=new CV(d,h,a,this.appId,m,r,o,g);break;case Ga.ShadowDom:return new Nie(d,h,e,a,r,o,this.nonce,g);default:i=new jz(d,h,a,m,r,o,g)}u.set(a.id,i)}return i}ngOnDestroy(){this.rendererByCompId.clear()}static#e=this.\u0275fac=function(a){return new(a||xE)(ye(bE),ye(kE),ye(B1),ye(Mie),ye(ei),ye(yn),ye(rt),ye(Wi))};static#a=this.\u0275prov=oe({token:xE,factory:xE.\u0275fac})}class Oz{constructor(e,a,u,i){this.eventManager=e,this.doc=a,this.ngZone=u,this.platformIsServer=i,this.data=Object.create(null),this.throwOnSyntheticProps=!0,this.destroyNode=null}destroy(){}createElement(e,a){return a?this.doc.createElementNS(Hz[a]||a,e):this.doc.createElement(e)}createComment(e){return this.doc.createComment(e)}createText(e){return this.doc.createTextNode(e)}appendChild(e,a){(DV(e)?e.content:e).appendChild(a)}insertBefore(e,a,u){e&&(DV(e)?e.content:e).insertBefore(a,u)}removeChild(e,a){e&&e.removeChild(a)}selectRootElement(e,a){let u="string"==typeof e?this.doc.querySelector(e):e;if(!u)throw new Z(-5104,!1);return a||(u.textContent=""),u}parentNode(e){return e.parentNode}nextSibling(e){return e.nextSibling}setAttribute(e,a,u,i){if(i){a=i+":"+a;const r=Hz[i];r?e.setAttributeNS(r,a,u):e.setAttribute(a,u)}else e.setAttribute(a,u)}removeAttribute(e,a,u){if(u){const i=Hz[u];i?e.removeAttributeNS(i,a):e.removeAttribute(`${u}:${a}`)}else e.removeAttribute(a)}addClass(e,a){e.classList.add(a)}removeClass(e,a){e.classList.remove(a)}setStyle(e,a,u,i){i&(k0.DashCase|k0.Important)?e.style.setProperty(a,u,i&k0.Important?"important":""):e.style[a]=u}removeStyle(e,a,u){u&k0.DashCase?e.style.removeProperty(a):e.style[a]=""}setProperty(e,a,u){null!=e&&(e[a]=u)}setValue(e,a){e.nodeValue=a}listen(e,a,u){if("string"==typeof e&&!(e=bc().getGlobalEventTarget(this.doc,e)))throw new Error(`Unsupported event target ${e} for event ${a}`);return this.eventManager.addEventListener(e,a,this.decoratePreventDefault(u))}decoratePreventDefault(e){return a=>{if("__ngUnwrap__"===a)return e;!1===(this.platformIsServer?this.ngZone.runGuarded(()=>e(a)):e(a))&&a.preventDefault()}}}function DV(t){return"TEMPLATE"===t.tagName&&void 0!==t.content}class Nie extends Oz{constructor(e,a,u,i,r,o,d,h){super(e,r,o,h),this.sharedStylesHost=a,this.hostEl=u,this.shadowRoot=u.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);const m=fV(i.id,i.styles);for(const g of m){const v=document.createElement("style");d&&v.setAttribute("nonce",d),v.textContent=g,this.shadowRoot.appendChild(v)}}nodeOrShadowRoot(e){return e===this.hostEl?this.shadowRoot:e}appendChild(e,a){return super.appendChild(this.nodeOrShadowRoot(e),a)}insertBefore(e,a,u){return super.insertBefore(this.nodeOrShadowRoot(e),a,u)}removeChild(e,a){return super.removeChild(this.nodeOrShadowRoot(e),a)}parentNode(e){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(e)))}destroy(){this.sharedStylesHost.removeHost(this.shadowRoot)}}class jz extends Oz{constructor(e,a,u,i,r,o,d,h){super(e,r,o,d),this.sharedStylesHost=a,this.removeStylesOnCompDestroy=i,this.styles=h?fV(h,u.styles):u.styles}applyStyles(){this.sharedStylesHost.addStyles(this.styles)}destroy(){this.removeStylesOnCompDestroy&&this.sharedStylesHost.removeStyles(this.styles)}}class CV extends jz{constructor(e,a,u,i,r,o,d,h){const m=i+"-"+u.id;super(e,a,u,r,o,d,h,m),this.contentAttr=function Lie(t){return Sie.replace(Vz,t)}(m),this.hostAttr=function Tie(t){return Bie.replace(Vz,t)}(m)}applyToHost(e){this.applyStyles(),this.setAttribute(e,this.hostAttr,"")}createElement(e,a){const u=super.createElement(e,a);return super.setAttribute(u,this.contentAttr,""),u}}class wx extends K_{constructor(e){super(e)}supports(e){return!0}addEventListener(e,a,u){return e.addEventListener(a,u,!1),()=>this.removeEventListener(e,a,u)}removeEventListener(e,a,u){return e.removeEventListener(a,u)}static#e=this.\u0275fac=function(a){return new(a||wx)(ye(ei))};static#a=this.\u0275prov=oe({token:wx,factory:wx.\u0275fac})}class Bx extends K_{constructor(e){super(e),this.delegate=U(BH,{optional:!0})}supports(e){return!!this.delegate&&this.delegate.supports(e)}addEventListener(e,a,u){return this.delegate.addEventListener(e,a,u)}removeEventListener(e,a,u){return this.delegate.removeEventListener(e,a,u)}static#e=this.\u0275fac=function(a){return new(a||Bx)(ye(ei))};static#a=this.\u0275prov=oe({token:Bx,factory:Bx.\u0275fac})}const yV=["alt","control","meta","shift"],Iie={"\b":"Backspace","\t":"Tab","\x7f":"Delete","\x1b":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},Rie={alt:t=>t.altKey,control:t=>t.ctrlKey,meta:t=>t.metaKey,shift:t=>t.shiftKey};class Ks extends K_{constructor(e){super(e)}supports(e){return null!=Ks.parseEventName(e)}addEventListener(e,a,u){const i=Ks.parseEventName(a),r=Ks.eventCallback(i.fullKey,u,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>bc().onAndCancel(e,i.domEventName,r))}static parseEventName(e){const a=e.toLowerCase().split("."),u=a.shift();if(0===a.length||"keydown"!==u&&"keyup"!==u)return null;const i=Ks._normalizeKey(a.pop());let r="",o=a.indexOf("code");if(o>-1&&(a.splice(o,1),r="code."),yV.forEach(h=>{const m=a.indexOf(h);m>-1&&(a.splice(m,1),r+=h+".")}),r+=i,0!=a.length||0===i.length)return null;const d={};return d.domEventName=u,d.fullKey=r,d}static matchEventFullKeyCode(e,a){let u=Iie[e.key]||e.key,i="";return a.indexOf("code.")>-1&&(u=e.code,i="code."),!(null==u||!u)&&(u=u.toLowerCase()," "===u?u="space":"."===u&&(u="dot"),yV.forEach(r=>{if(r!==u){(0,Rie[r])(e)&&(i+=r+".")}}),i+=u,i===a)}static eventCallback(e,a,u){return i=>{Ks.matchEventFullKeyCode(i,e)&&u.runGuarded(()=>a(i))}}static _normalizeKey(e){return"esc"===e?"escape":e}static#e=this.\u0275fac=function(a){return new(a||Ks)(ye(ei))};static#a=this.\u0275prov=oe({token:Ks,factory:Ks.\u0275fac})}const Gz=[{provide:yn,useValue:Sz},{provide:s6,useValue:function Hie(){Iz.makeCurrent()},multi:!0},{provide:ei,useFactory:function Oie(){return function Tw(t){db=t}(document),document},deps:[]}],jie=(E_(hH,"browser",Gz),new he("")),FV=[{provide:d_,useClass:class wie{addToWindow(e){qt.getAngularTestability=(u,i=!0)=>{const r=e.findTestabilityInTree(u,i);if(null==r)throw new Z(5103,!1);return r},qt.getAllAngularTestabilities=()=>e.getAllTestabilities(),qt.getAllAngularRootElements=()=>e.getAllRootElements();qt.frameworkStabilizers||(qt.frameworkStabilizers=[]),qt.frameworkStabilizers.push(u=>{const i=qt.getAllAngularTestabilities();let r=i.length;const o=function(){r--,0==r&&u()};i.forEach(d=>{d.whenStable(o)})})}findTestabilityInTree(e,a,u){if(null==a)return null;return e.getTestability(a)??(u?bc().isShadowRoot(a)?this.findTestabilityInTree(e,a.host,!0):this.findTestabilityInTree(e,a.parentElement,!0):null)}},deps:[]},{provide:KR,useClass:R4,deps:[rt,H4,d_]},{provide:R4,useClass:R4,deps:[rt,H4,d_]}],AV=[{provide:Td,useValue:"root"},{provide:Uo,useFactory:function Vie(){return new Uo},deps:[]},{provide:Ax,useClass:wx,multi:!0,deps:[ei,rt,yn]},{provide:Ax,useClass:Ks,multi:!0,deps:[ei]},{provide:Ax,useClass:Bx,multi:!0},xE,kE,bE,{provide:Sg,useExisting:xE},{provide:oV,useClass:Fx,deps:[]},[]];class Sx{constructor(e){}static withServerTransition(e){return{ngModule:Sx,providers:[{provide:B1,useValue:e.appId}]}}static#e=this.\u0275fac=function(a){return new(a||Sx)(ye(jie,12))};static#a=this.\u0275mod=kn({type:Sx,exports:[ah,hx]});static#t=this.\u0275inj=$u({providers:[...AV,...FV],imports:[ah,hx]})}class W_{constructor(e){this._doc=e,this._dom=bc()}addTag(e,a=!1){return e?this._getOrCreateElement(e,a):null}addTags(e,a=!1){return e?e.reduce((u,i)=>(i&&u.push(this._getOrCreateElement(i,a)),u),[]):[]}getTag(e){return e&&this._doc.querySelector(`meta[${e}]`)||null}getTags(e){if(!e)return[];const a=this._doc.querySelectorAll(`meta[${e}]`);return a?[].slice.call(a):[]}updateTag(e,a){if(!e)return null;a=a||this._parseSelector(e);const u=this.getTag(a);return u?this._setMetaElementAttributes(e,u):this._getOrCreateElement(e,!0)}removeTag(e){this.removeTagElement(this.getTag(e))}removeTagElement(e){e&&this._dom.remove(e)}_getOrCreateElement(e,a=!1){if(!a){const r=this._parseSelector(e),o=this.getTags(r).filter(d=>this._containsAttributes(e,d))[0];if(void 0!==o)return o}const u=this._dom.createElement("meta");return this._setMetaElementAttributes(e,u),this._doc.getElementsByTagName("head")[0].appendChild(u),u}_setMetaElementAttributes(e,a){return Object.keys(e).forEach(u=>a.setAttribute(this._getMetaKeyMap(u),e[u])),a}_parseSelector(e){const a=e.name?"name":"property";return`${a}="${e[a]}"`}_containsAttributes(e,a){return Object.keys(e).every(u=>a.getAttribute(this._getMetaKeyMap(u))===e[u])}_getMetaKeyMap(e){return Gie[e]||e}static#e=this.\u0275fac=function(a){return new(a||W_)(ye(ei))};static#a=this.\u0275prov=oe({token:W_,factory:W_.\u0275fac,providedIn:"root"})}const Gie={httpEquiv:"http-equiv"};class zx{constructor(e){this._doc=e}getTitle(){return this._doc.title}setTitle(e){this._doc.title=e||""}static#e=this.\u0275fac=function(a){return new(a||zx)(ye(ei))};static#a=this.\u0275prov=oe({token:zx,factory:zx.\u0275fac,providedIn:"root"})}const Jie={pan:!0,panstart:!0,panmove:!0,panend:!0,pancancel:!0,panleft:!0,panright:!0,panup:!0,pandown:!0,pinch:!0,pinchstart:!0,pinchmove:!0,pinchend:!0,pinchcancel:!0,pinchin:!0,pinchout:!0,press:!0,pressup:!0,rotate:!0,rotatestart:!0,rotatemove:!0,rotateend:!0,rotatecancel:!0,swipe:!0,swipeleft:!0,swiperight:!0,swipeup:!0,swipedown:!0,tap:!0,doubletap:!0},Kz=new he("HammerGestureConfig"),SV=new he("HammerLoader");class Mx{constructor(){this.events=[],this.overrides={}}buildHammer(e){const a=new Hammer(e,this.options);a.get("pinch").set({enable:!0}),a.get("rotate").set({enable:!0});for(const u in this.overrides)a.get(u).set(this.overrides[u]);return a}static#e=this.\u0275fac=function(a){return new(a||Mx)};static#a=this.\u0275prov=oe({token:Mx,factory:Mx.\u0275fac})}class Lx extends K_{constructor(e,a,u,i){super(e),this._config=a,this.console=u,this.loader=i,this._loaderPromise=null}supports(e){return!(!Jie.hasOwnProperty(e.toLowerCase())&&!this.isCustomEvent(e)||!window.Hammer&&!this.loader)}addEventListener(e,a,u){const i=this.manager.getZone();if(a=a.toLowerCase(),!window.Hammer&&this.loader){this._loaderPromise=this._loaderPromise||i.runOutsideAngular(()=>this.loader());let r=!1,o=()=>{r=!0};return i.runOutsideAngular(()=>this._loaderPromise.then(()=>{window.Hammer?r||(o=this.addEventListener(e,a,u)):o=()=>{}}).catch(()=>{o=()=>{}})),()=>{o()}}return i.runOutsideAngular(()=>{const r=this._config.buildHammer(e),o=function(d){i.runGuarded(function(){u(d)})};return r.on(a,o),()=>{r.off(a,o),"function"==typeof r.destroy&&r.destroy()}})}isCustomEvent(e){return this._config.events.indexOf(e)>-1}static#e=this.\u0275fac=function(a){return new(a||Lx)(ye(ei),ye(Kz),ye(q1),ye(SV,8))};static#a=this.\u0275prov=oe({token:Lx,factory:Lx.\u0275fac})}class Wz{static#e=this.\u0275fac=function(a){return new(a||Wz)};static#a=this.\u0275mod=kn({type:Wz});static#t=this.\u0275inj=$u({providers:[{provide:Ax,useClass:Lx,multi:!0,deps:[ei,Kz,q1,[new is,SV]]},{provide:Kz,useClass:Mx,deps:[]}]})}class Tx{static#e=this.\u0275fac=function(a){return new(a||Tx)};static#a=this.\u0275prov=oe({token:Tx,factory:function(a){let u=null;return u=a?new(a||Tx):ye(Px),u},providedIn:"root"})}class Px extends Tx{constructor(e){super(),this._doc=e}sanitize(e,a){if(null==a)return null;switch(e){case Or.NONE:return a;case Or.HTML:return Rl(a,"HTML")?rr(a):H6(this._doc,String(a)).toString();case Or.STYLE:return Rl(a,"Style")?rr(a):a;case Or.SCRIPT:if(Rl(a,"Script"))return rr(a);throw new Z(5200,!1);case Or.URL:return Rl(a,"URL")?rr(a):Q3(String(a));case Or.RESOURCE_URL:if(Rl(a,"ResourceURL"))return rr(a);throw new Z(5201,!1);default:throw new Z(5202,!1)}}bypassSecurityTrustHtml(e){return function jw(t){return new w6(t)}(e)}bypassSecurityTrustStyle(e){return function Gw(t){return new B6(t)}(e)}bypassSecurityTrustScript(e){return function Kw(t){return new Y3(t)}(e)}bypassSecurityTrustUrl(e){return function S6(t){return new Hw(t)}(e)}bypassSecurityTrustResourceUrl(e){return function wb(t){return new Vw(t)}(e)}static#e=this.\u0275fac=function(a){return new(a||Px)(ye(ei))};static#a=this.\u0275prov=oe({token:Px,factory:Px.\u0275fac,providedIn:"root"})}var th;!function(t){t[t.NoHttpTransferCache=0]="NoHttpTransferCache",t[t.HttpTransferCacheOptions=1]="HttpTransferCacheOptions",t[t.I18nSupport=2]="I18nSupport",t[t.EventReplay=3]="EventReplay"}(th||(th={}));new tE("18.1.3");const Zie=[{provide:pc,useFactory:()=>new pc}];function zV(t){for(let e=t.length-1;e>=0;e--)if(void 0!==t[e])return t[e]}function Yie(t){const e=[];return t.forEach(a=>a&&e.push(...a)),e}const Qie=E_(hH,"coreDynamic",[{provide:g_,useValue:{},multi:!0},{provide:class Sae{},useClass:class $ie{constructor(e){const a={defaultEncapsulation:Ga.Emulated};this._defaultOptions=[a,...e]}createCompiler(e=[]){const a=function qie(t){return{defaultEncapsulation:zV(t.map(e=>e.defaultEncapsulation)),providers:Yie(t.map(e=>e.providers)),preserveWhitespaces:zV(t.map(e=>e.preserveWhitespaces))}}(this._defaultOptions.concat(e));return su.create({providers:[Zie,{provide:F_.udt,useFactory:()=>new F_.udt({defaultEncapsulation:a.defaultEncapsulation,preserveWhitespaces:a.preserveWhitespaces}),deps:[]},a.providers]}).get(pc)}},deps:[g_]}]);class fE extends F_.WHm{get(e){let a,u;const i=new Promise((o,d)=>{a=o,u=d}),r=new XMLHttpRequest;return r.open("GET",e,!0),r.responseType="text",r.onload=function(){const o=r.response;let d=r.status;0===d&&(d=o?200:0),200<=d&&d<=300?a(o):u(`Failed to load ${e}`)},r.onerror=function(){u(`Failed to load ${e}`)},r.send(),i}static#e=this.\u0275fac=(()=>{let e;return function(u){return(e||(e=Au(fE)))(u||fE)}})();static#a=this.\u0275prov=oe({token:fE,factory:fE.\u0275fac})}const Xie=[Gz,{provide:g_,useValue:{providers:[{provide:F_.WHm,useClass:fE,deps:[]}]},multi:!0},{provide:yn,useValue:Sz}],ene=(new tE("18.1.3"),E_(Qie,"browserDynamic",Xie));function Ze(t,e,a,u){var o,i=arguments.length,r=i<3?e:null===u?u=Object.getOwnPropertyDescriptor(e,a):u;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,a,u);else for(var d=t.length-1;d>=0;d--)(o=t[d])&&(r=(i<3?o(r):i>3?o(e,a,r):o(e,a))||r);return i>3&&r&&Object.defineProperty(e,a,r),r}function Ct(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}Object.create;Object.create;"function"==typeof SuppressedError&&SuppressedError;function LV(t,e,a,u){return new(a||(a=Promise))(function(r,o){function d(g){try{m(u.next(g))}catch(v){o(v)}}function h(g){try{m(u.throw(g))}catch(v){o(v)}}function m(g){g.done?r(g.value):function i(r){return r instanceof a?r:new a(function(o){o(r)})}(g.value).then(d,h)}m((u=u.apply(t,e||[])).next())})}Object.create;function Xz(t){var e="function"==typeof Symbol&&Symbol.iterator,a=e&&t[e],u=0;if(a)return a.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&u>=t.length&&(t=void 0),{value:t&&t[u++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function uh(t){return this instanceof uh?(this.v=t,this):new uh(t)}function PV(t,e,a){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var i,u=a.apply(t,e||[]),r=[];return i={},o("next"),o("throw"),o("return"),i[Symbol.asyncIterator]=function(){return this},i;function o(k){u[k]&&(i[k]=function(x){return new Promise(function(D,C){r.push([k,x,D,C])>1||d(k,x)})})}function d(k,x){try{!function h(k){k.value instanceof uh?Promise.resolve(k.value.v).then(m,g):v(r[0][2],k)}(u[k](x))}catch(D){v(r[0][3],D)}}function m(k){d("next",k)}function g(k){d("throw",k)}function v(k,x){k(x),r.shift(),r.length&&d(r[0][0],r[0][1])}}function NV(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var a,e=t[Symbol.asyncIterator];return e?e.call(t):(t=Xz(t),a={},u("next"),u("throw"),u("return"),a[Symbol.asyncIterator]=function(){return this},a);function u(r){a[r]=t[r]&&function(o){return new Promise(function(d,h){(function i(r,o,d,h){Promise.resolve(h).then(function(m){r({value:m,done:d})},o)})(d,h,(o=t[r](o)).done,o.value)})}}}Object.create;const eM=t=>t&&"number"==typeof t.length&&"function"!=typeof t;function IV(t){return Se(t?.then)}function RV(t){return Se(t[Lo])}function HV(t){return Symbol.asyncIterator&&Se(t?.[Symbol.asyncIterator])}function VV(t){return new TypeError(`You provided ${null!==t&&"object"==typeof t?"an invalid object":`'${t}'`} where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.`)}const OV=function One(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}();function jV(t){return Se(t?.[OV])}function GV(t){return PV(this,arguments,function*(){const a=t.getReader();try{for(;;){const{value:u,done:i}=yield uh(a.read());if(i)return yield uh(void 0);yield yield uh(u)}}finally{a.releaseLock()}})}function KV(t){return Se(t?.getReader)}function Jr(t){if(t instanceof ht)return t;if(null!=t){if(RV(t))return function jne(t){return new ht(e=>{const a=t[Lo]();if(Se(a.subscribe))return a.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}(t);if(eM(t))return function Gne(t){return new ht(e=>{for(let a=0;a{t.then(a=>{e.closed||(e.next(a),e.complete())},a=>e.error(a)).then(null,ct)})}(t);if(HV(t))return WV(t);if(jV(t))return function Wne(t){return new ht(e=>{for(const a of t)if(e.next(a),e.closed)return;e.complete()})}(t);if(KV(t))return function Une(t){return WV(GV(t))}(t)}throw VV(t)}function WV(t){return new ht(e=>{(function Jne(t,e){var a,u,i,r;return LV(this,void 0,void 0,function*(){try{for(a=NV(t);!(u=yield a.next()).done;){const o=u.value;if(e.next(o),e.closed)return}}catch(o){i={error:o}}finally{try{u&&!u.done&&(r=a.return)&&(yield r.call(a))}finally{if(i)throw i.error}}e.complete()})})(t,e).catch(a=>e.error(a))})}function Dc(t,e,a,u=0,i=!1){const r=e.schedule(function(){a(),i?t.add(this.schedule(null,u)):this.unsubscribe()},u);if(t.add(r),!i)return r}function UV(t,e=0){return da((a,u)=>{a.subscribe(it(u,i=>Dc(u,t,()=>u.next(i),e),()=>Dc(u,t,()=>u.complete(),e),i=>Dc(u,t,()=>u.error(i),e)))})}function JV(t,e=0){return da((a,u)=>{u.add(t.schedule(()=>a.subscribe(u),e))})}function ZV(t,e){if(!t)throw new Error("Iterable cannot be null");return new ht(a=>{Dc(a,e,()=>{const u=t[Symbol.asyncIterator]();Dc(a,e,()=>{u.next().then(i=>{i.done?a.complete():a.next(i.value)})},0,!0)})})}function Xne(t,e){if(null!=t){if(RV(t))return function Zne(t,e){return Jr(t).pipe(JV(e),UV(e))}(t,e);if(eM(t))return function qne(t,e){return new ht(a=>{let u=0;return e.schedule(function(){u===t.length?a.complete():(a.next(t[u++]),a.closed||this.schedule())})})}(t,e);if(IV(t))return function $ne(t,e){return Jr(t).pipe(JV(e),UV(e))}(t,e);if(HV(t))return ZV(t,e);if(jV(t))return function Yne(t,e){return new ht(a=>{let u;return Dc(a,e,()=>{u=t[OV](),Dc(a,e,()=>{let i,r;try{({value:i,done:r}=u.next())}catch(o){return void a.error(o)}r?a.complete():a.next(i)},0,!0)}),()=>Se(u?.return)&&u.return()})}(t,e);if(KV(t))return function Qne(t,e){return ZV(GV(t),e)}(t,e)}throw VV(t)}function qi(t,e){return e?Xne(t,e):Jr(t)}const{isArray:ere}=Array,{getPrototypeOf:are,prototype:tre,keys:ure}=Object;function $V(t){if(1===t.length){const e=t[0];if(ere(e))return{args:e,keys:null};if(function ire(t){return t&&"object"==typeof t&&are(t)===tre}(e)){const a=ure(e);return{args:a.map(u=>e[u]),keys:a}}}return{args:t,keys:null}}function qV(t){return t&&Se(t.schedule)}function aM(t){return t[t.length-1]}function YV(t){return Se(aM(t))?t.pop():void 0}function Ix(t){return qV(aM(t))?t.pop():void 0}const{isArray:rre}=Array;function tM(t){return aa(e=>function ore(t,e){return rre(e)?t(...e):t(e)}(t,e))}function QV(t,e){return t.reduce((a,u,i)=>(a[u]=e[i],a),{})}function XV(...t){const e=YV(t),{args:a,keys:u}=$V(t),i=new ht(r=>{const{length:o}=a;if(!o)return void r.complete();const d=new Array(o);let h=o,m=o;for(let g=0;g{v||(v=!0,m--),d[g]=k},()=>h--,void 0,()=>{(!h||!v)&&(m||r.next(u?QV(u,d):d),r.complete())}))}});return e?i.pipe(tM(e)):i}class Rx{constructor(e,a){this._renderer=e,this._elementRef=a,this.onChange=u=>{},this.onTouched=()=>{}}setProperty(e,a){this._renderer.setProperty(this._elementRef.nativeElement,e,a)}registerOnTouched(e){this.onTouched=e}registerOnChange(e){this.onChange=e}setDisabledState(e){this.setProperty("disabled",e)}static#e=this.\u0275fac=function(a){return new(a||Rx)(X(Vn),X(Rt))};static#a=this.\u0275dir=Me({type:Rx})}class M0 extends Rx{static#e=this.\u0275fac=(()=>{let e;return function(u){return(e||(e=Au(M0)))(u||M0)}})();static#a=this.\u0275dir=Me({type:M0,features:[Ht]})}const L0=new he(""),lre={provide:L0,useExisting:It(()=>ih),multi:!0};class ih extends M0{writeValue(e){this.setProperty("checked",e)}static#e=this.\u0275fac=(()=>{let e;return function(u){return(e||(e=Au(ih)))(u||ih)}})();static#a=this.\u0275dir=Me({type:ih,selectors:[["input","type","checkbox","formControlName",""],["input","type","checkbox","formControl",""],["input","type","checkbox","ngModel",""]],hostBindings:function(a,u){1&a&&Qu("change",function(r){return u.onChange(r.target.checked)})("blur",function(){return u.onTouched()})},features:[Bu([lre]),Ht]})}const sre={provide:L0,useExisting:It(()=>nh),multi:!0};const cre=new he("");class nh extends Rx{constructor(e,a,u){super(e,a),this._compositionMode=u,this._composing=!1,null==this._compositionMode&&(this._compositionMode=!function dre(){const t=bc()?bc().getUserAgent():"";return/android (\d+)/.test(t.toLowerCase())}())}writeValue(e){const a=e??"";this.setProperty("value",a)}_handleInput(e){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(e)}_compositionStart(){this._composing=!0}_compositionEnd(e){this._composing=!1,this._compositionMode&&this.onChange(e)}static#e=this.\u0275fac=function(a){return new(a||nh)(X(Vn),X(Rt),X(cre,8))};static#a=this.\u0275dir=Me({type:nh,selectors:[["input","formControlName","",3,"type","checkbox"],["textarea","formControlName",""],["input","formControl","",3,"type","checkbox"],["textarea","formControl",""],["input","ngModel","",3,"type","checkbox"],["textarea","ngModel",""],["","ngDefaultControl",""]],hostBindings:function(a,u){1&a&&Qu("input",function(r){return u._handleInput(r.target.value)})("blur",function(){return u.onTouched()})("compositionstart",function(){return u._compositionStart()})("compositionend",function(r){return u._compositionEnd(r.target.value)})},features:[Bu([sre]),Ht]})}function rh(t){return null==t||("string"==typeof t||Array.isArray(t))&&0===t.length}function eO(t){return null!=t&&"number"==typeof t.length}const mr=new he(""),oh=new he(""),hre=/^(?=.{1,254}$)(?=.{1,64}@)[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;function aO(t){return e=>{if(rh(e.value)||rh(t))return null;const a=parseFloat(e.value);return!isNaN(a)&&a{if(rh(e.value)||rh(t))return null;const a=parseFloat(e.value);return!isNaN(a)&&a>t?{max:{max:t,actual:e.value}}:null}}function uO(t){return rh(t.value)?{required:!0}:null}function iO(t){return!0===t.value?null:{required:!0}}function nO(t){return rh(t.value)||hre.test(t.value)?null:{email:!0}}function rO(t){return e=>rh(e.value)||!eO(e.value)?null:e.value.lengtheO(e.value)&&e.value.length>t?{maxlength:{requiredLength:t,actualLength:e.value.length}}:null}function lO(t){if(!t)return J_;let e,a;return"string"==typeof t?(a="","^"!==t.charAt(0)&&(a+="^"),a+=t,"$"!==t.charAt(t.length-1)&&(a+="$"),e=new RegExp(a)):(a=t.toString(),e=t),u=>{if(rh(u.value))return null;const i=u.value;return e.test(i)?null:{pattern:{requiredPattern:a,actualValue:i}}}}function J_(t){return null}function sO(t){return null!=t}function dO(t){return sx(t)?qi(t):t}function cO(t){let e={};return t.forEach(a=>{e=null!=a?{...e,...a}:e}),0===Object.keys(e).length?null:e}function hO(t,e){return e.map(a=>a(t))}function mO(t){return t.map(e=>function mre(t){return!t.validate}(e)?e:a=>e.validate(a))}function pO(t){if(!t)return null;const e=t.filter(sO);return 0==e.length?null:function(a){return cO(hO(a,e))}}function uM(t){return null!=t?pO(mO(t)):null}function gO(t){if(!t)return null;const e=t.filter(sO);return 0==e.length?null:function(a){return XV(hO(a,e).map(dO)).pipe(aa(cO))}}function iM(t){return null!=t?gO(mO(t)):null}function EO(t,e){return null===t?[e]:Array.isArray(t)?[...t,e]:[t,e]}function vO(t){return t._rawValidators}function bO(t){return t._rawAsyncValidators}function nM(t){return t?Array.isArray(t)?t:[t]:[]}function Z_(t,e){return Array.isArray(t)?t.includes(e):t===e}function kO(t,e){const a=nM(e);return nM(t).forEach(i=>{Z_(a,i)||a.push(i)}),a}function xO(t,e){return nM(e).filter(a=>!Z_(t,a))}class fO{constructor(){this._rawValidators=[],this._rawAsyncValidators=[],this._onDestroyCallbacks=[]}get value(){return this.control?this.control.value:null}get valid(){return this.control?this.control.valid:null}get invalid(){return this.control?this.control.invalid:null}get pending(){return this.control?this.control.pending:null}get disabled(){return this.control?this.control.disabled:null}get enabled(){return this.control?this.control.enabled:null}get errors(){return this.control?this.control.errors:null}get pristine(){return this.control?this.control.pristine:null}get dirty(){return this.control?this.control.dirty:null}get touched(){return this.control?this.control.touched:null}get status(){return this.control?this.control.status:null}get untouched(){return this.control?this.control.untouched:null}get statusChanges(){return this.control?this.control.statusChanges:null}get valueChanges(){return this.control?this.control.valueChanges:null}get path(){return null}_setValidators(e){this._rawValidators=e||[],this._composedValidatorFn=uM(this._rawValidators)}_setAsyncValidators(e){this._rawAsyncValidators=e||[],this._composedAsyncValidatorFn=iM(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_registerOnDestroy(e){this._onDestroyCallbacks.push(e)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(e=>e()),this._onDestroyCallbacks=[]}reset(e=void 0){this.control&&this.control.reset(e)}hasError(e,a){return!!this.control&&this.control.hasError(e,a)}getError(e,a){return this.control?this.control.getError(e,a):null}}class Zr extends fO{get formDirective(){return null}get path(){return null}}class lh extends fO{constructor(){super(...arguments),this._parent=null,this.name=null,this.valueAccessor=null}}class DO{constructor(e){this._cd=e}get isTouched(){return this._cd?.control?._touched?.(),!!this._cd?.control?.touched}get isUntouched(){return!!this._cd?.control?.untouched}get isPristine(){return this._cd?.control?._pristine?.(),!!this._cd?.control?.pristine}get isDirty(){return!!this._cd?.control?.dirty}get isValid(){return this._cd?.control?._status?.(),!!this._cd?.control?.valid}get isInvalid(){return!!this._cd?.control?.invalid}get isPending(){return!!this._cd?.control?.pending}get isSubmitted(){return this._cd?._submitted?.(),!!this._cd?.submitted}}class DE extends DO{constructor(e){super(e)}static#e=this.\u0275fac=function(a){return new(a||DE)(X(lh,2))};static#a=this.\u0275dir=Me({type:DE,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(a,u){2&a&&cr("ng-untouched",u.isUntouched)("ng-touched",u.isTouched)("ng-pristine",u.isPristine)("ng-dirty",u.isDirty)("ng-valid",u.isValid)("ng-invalid",u.isInvalid)("ng-pending",u.isPending)},features:[Ht]})}class CE extends DO{constructor(e){super(e)}static#e=this.\u0275fac=function(a){return new(a||CE)(X(Zr,10))};static#a=this.\u0275dir=Me({type:CE,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(a,u){2&a&&cr("ng-untouched",u.isUntouched)("ng-touched",u.isTouched)("ng-pristine",u.isPristine)("ng-dirty",u.isDirty)("ng-valid",u.isValid)("ng-invalid",u.isInvalid)("ng-pending",u.isPending)("ng-submitted",u.isSubmitted)},features:[Ht]})}const Hx="VALID",q_="INVALID",yE="PENDING",Vx="DISABLED";class _E{}class yO extends _E{constructor(e,a){super(),this.value=e,this.source=a}}class lM extends _E{constructor(e,a){super(),this.pristine=e,this.source=a}}class sM extends _E{constructor(e,a){super(),this.touched=e,this.source=a}}class Y_ extends _E{constructor(e,a){super(),this.status=e,this.source=a}}class bre extends _E{constructor(e){super(),this.source=e}}class kre extends _E{constructor(e){super(),this.source=e}}function dM(t){return(Q_(t)?t.validators:t)||null}function cM(t,e){return(Q_(e)?e.asyncValidators:t)||null}function Q_(t){return null!=t&&!Array.isArray(t)&&"object"==typeof t}function _O(t,e,a){const u=t.controls;if(!(e?Object.keys(u):u).length)throw new Z(1e3,"");if(!u[a])throw new Z(1001,"")}function FO(t,e,a){t._forEachChild((u,i)=>{if(void 0===a[i])throw new Z(1002,"")})}class X_{constructor(e,a){this._pendingDirty=!1,this._hasOwnPendingAsyncValidator=null,this._pendingTouched=!1,this._onCollectionChange=()=>{},this._parent=null,this._status=vx(()=>this.statusReactive()),this.statusReactive=Is(void 0),this._pristine=vx(()=>this.pristineReactive()),this.pristineReactive=Is(!0),this._touched=vx(()=>this.touchedReactive()),this.touchedReactive=Is(!1),this._events=new sa,this.events=this._events.asObservable(),this._onDisabledChange=[],this._assignValidators(e),this._assignAsyncValidators(a)}get validator(){return this._composedValidatorFn}set validator(e){this._rawValidators=this._composedValidatorFn=e}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(e){this._rawAsyncValidators=this._composedAsyncValidatorFn=e}get parent(){return this._parent}get status(){return Os(this.statusReactive)}set status(e){Os(()=>this.statusReactive.set(e))}get valid(){return this.status===Hx}get invalid(){return this.status===q_}get pending(){return this.status==yE}get disabled(){return this.status===Vx}get enabled(){return this.status!==Vx}get pristine(){return Os(this.pristineReactive)}set pristine(e){Os(()=>this.pristineReactive.set(e))}get dirty(){return!this.pristine}get touched(){return Os(this.touchedReactive)}set touched(e){Os(()=>this.touchedReactive.set(e))}get untouched(){return!this.touched}get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(e){this._assignValidators(e)}setAsyncValidators(e){this._assignAsyncValidators(e)}addValidators(e){this.setValidators(kO(e,this._rawValidators))}addAsyncValidators(e){this.setAsyncValidators(kO(e,this._rawAsyncValidators))}removeValidators(e){this.setValidators(xO(e,this._rawValidators))}removeAsyncValidators(e){this.setAsyncValidators(xO(e,this._rawAsyncValidators))}hasValidator(e){return Z_(this._rawValidators,e)}hasAsyncValidator(e){return Z_(this._rawAsyncValidators,e)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(e={}){const a=!1===this.touched;this.touched=!0;const u=e.sourceControl??this;this._parent&&!e.onlySelf&&this._parent.markAsTouched({...e,sourceControl:u}),a&&!1!==e.emitEvent&&this._events.next(new sM(!0,u))}markAllAsTouched(e={}){this.markAsTouched({onlySelf:!0,emitEvent:e.emitEvent,sourceControl:this}),this._forEachChild(a=>a.markAllAsTouched(e))}markAsUntouched(e={}){const a=!0===this.touched;this.touched=!1,this._pendingTouched=!1;const u=e.sourceControl??this;this._forEachChild(i=>{i.markAsUntouched({onlySelf:!0,emitEvent:e.emitEvent,sourceControl:u})}),this._parent&&!e.onlySelf&&this._parent._updateTouched(e,u),a&&!1!==e.emitEvent&&this._events.next(new sM(!1,u))}markAsDirty(e={}){const a=!0===this.pristine;this.pristine=!1;const u=e.sourceControl??this;this._parent&&!e.onlySelf&&this._parent.markAsDirty({...e,sourceControl:u}),a&&!1!==e.emitEvent&&this._events.next(new lM(!1,u))}markAsPristine(e={}){const a=!1===this.pristine;this.pristine=!0,this._pendingDirty=!1;const u=e.sourceControl??this;this._forEachChild(i=>{i.markAsPristine({onlySelf:!0,emitEvent:e.emitEvent})}),this._parent&&!e.onlySelf&&this._parent._updatePristine(e,u),a&&!1!==e.emitEvent&&this._events.next(new lM(!0,u))}markAsPending(e={}){this.status=yE;const a=e.sourceControl??this;!1!==e.emitEvent&&(this._events.next(new Y_(this.status,a)),this.statusChanges.emit(this.status)),this._parent&&!e.onlySelf&&this._parent.markAsPending({...e,sourceControl:a})}disable(e={}){const a=this._parentMarkedDirty(e.onlySelf);this.status=Vx,this.errors=null,this._forEachChild(i=>{i.disable({...e,onlySelf:!0})}),this._updateValue();const u=e.sourceControl??this;!1!==e.emitEvent&&(this._events.next(new yO(this.value,u)),this._events.next(new Y_(this.status,u)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors({...e,skipPristineCheck:a},this),this._onDisabledChange.forEach(i=>i(!0))}enable(e={}){const a=this._parentMarkedDirty(e.onlySelf);this.status=Hx,this._forEachChild(u=>{u.enable({...e,onlySelf:!0})}),this.updateValueAndValidity({onlySelf:!0,emitEvent:e.emitEvent}),this._updateAncestors({...e,skipPristineCheck:a},this),this._onDisabledChange.forEach(u=>u(!1))}_updateAncestors(e,a){this._parent&&!e.onlySelf&&(this._parent.updateValueAndValidity(e),e.skipPristineCheck||this._parent._updatePristine({},a),this._parent._updateTouched({},a))}setParent(e){this._parent=e}getRawValue(){return this.value}updateValueAndValidity(e={}){if(this._setInitialStatus(),this._updateValue(),this.enabled){const u=this._cancelExistingSubscription();this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===Hx||this.status===yE)&&this._runAsyncValidator(u,e.emitEvent)}const a=e.sourceControl??this;!1!==e.emitEvent&&(this._events.next(new yO(this.value,a)),this._events.next(new Y_(this.status,a)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!e.onlySelf&&this._parent.updateValueAndValidity({...e,sourceControl:a})}_updateTreeValidity(e={emitEvent:!0}){this._forEachChild(a=>a._updateTreeValidity(e)),this.updateValueAndValidity({onlySelf:!0,emitEvent:e.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?Vx:Hx}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(e,a){if(this.asyncValidator){this.status=yE,this._hasOwnPendingAsyncValidator={emitEvent:!1!==a};const u=dO(this.asyncValidator(this));this._asyncValidationSubscription=u.subscribe(i=>{this._hasOwnPendingAsyncValidator=null,this.setErrors(i,{emitEvent:a,shouldHaveEmitted:e})})}}_cancelExistingSubscription(){if(this._asyncValidationSubscription){this._asyncValidationSubscription.unsubscribe();const e=this._hasOwnPendingAsyncValidator?.emitEvent??!1;return this._hasOwnPendingAsyncValidator=null,e}return!1}setErrors(e,a={}){this.errors=e,this._updateControlsErrors(!1!==a.emitEvent,this,a.shouldHaveEmitted)}get(e){let a=e;return null==a||(Array.isArray(a)||(a=a.split(".")),0===a.length)?null:a.reduce((u,i)=>u&&u._find(i),this)}getError(e,a){const u=a?this.get(a):this;return u&&u.errors?u.errors[e]:null}hasError(e,a){return!!this.getError(e,a)}get root(){let e=this;for(;e._parent;)e=e._parent;return e}_updateControlsErrors(e,a,u){this.status=this._calculateStatus(),e&&this.statusChanges.emit(this.status),(e||u)&&this._events.next(new Y_(this.status,a)),this._parent&&this._parent._updateControlsErrors(e,a,u)}_initObservables(){this.valueChanges=new Ue,this.statusChanges=new Ue}_calculateStatus(){return this._allControlsDisabled()?Vx:this.errors?q_:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(yE)?yE:this._anyControlsHaveStatus(q_)?q_:Hx}_anyControlsHaveStatus(e){return this._anyControls(a=>a.status===e)}_anyControlsDirty(){return this._anyControls(e=>e.dirty)}_anyControlsTouched(){return this._anyControls(e=>e.touched)}_updatePristine(e,a){const u=!this._anyControlsDirty(),i=this.pristine!==u;this.pristine=u,this._parent&&!e.onlySelf&&this._parent._updatePristine(e,a),i&&this._events.next(new lM(this.pristine,a))}_updateTouched(e={},a){this.touched=this._anyControlsTouched(),this._events.next(new sM(this.touched,a)),this._parent&&!e.onlySelf&&this._parent._updateTouched(e,a)}_registerOnCollectionChange(e){this._onCollectionChange=e}_setUpdateStrategy(e){Q_(e)&&null!=e.updateOn&&(this._updateOn=e.updateOn)}_parentMarkedDirty(e){const a=this._parent&&this._parent.dirty;return!e&&!!a&&!this._parent._anyControlsDirty()}_find(e){return null}_assignValidators(e){this._rawValidators=Array.isArray(e)?e.slice():e,this._composedValidatorFn=function xre(t){return Array.isArray(t)?uM(t):t||null}(this._rawValidators)}_assignAsyncValidators(e){this._rawAsyncValidators=Array.isArray(e)?e.slice():e,this._composedAsyncValidatorFn=function fre(t){return Array.isArray(t)?iM(t):t||null}(this._rawAsyncValidators)}}class Ox extends X_{constructor(e,a,u){super(dM(a),cM(u,a)),this.controls=e,this._initObservables(),this._setUpdateStrategy(a),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}registerControl(e,a){return this.controls[e]?this.controls[e]:(this.controls[e]=a,a.setParent(this),a._registerOnCollectionChange(this._onCollectionChange),a)}addControl(e,a,u={}){this.registerControl(e,a),this.updateValueAndValidity({emitEvent:u.emitEvent}),this._onCollectionChange()}removeControl(e,a={}){this.controls[e]&&this.controls[e]._registerOnCollectionChange(()=>{}),delete this.controls[e],this.updateValueAndValidity({emitEvent:a.emitEvent}),this._onCollectionChange()}setControl(e,a,u={}){this.controls[e]&&this.controls[e]._registerOnCollectionChange(()=>{}),delete this.controls[e],a&&this.registerControl(e,a),this.updateValueAndValidity({emitEvent:u.emitEvent}),this._onCollectionChange()}contains(e){return this.controls.hasOwnProperty(e)&&this.controls[e].enabled}setValue(e,a={}){FO(this,0,e),Object.keys(e).forEach(u=>{_O(this,!0,u),this.controls[u].setValue(e[u],{onlySelf:!0,emitEvent:a.emitEvent})}),this.updateValueAndValidity(a)}patchValue(e,a={}){null!=e&&(Object.keys(e).forEach(u=>{const i=this.controls[u];i&&i.patchValue(e[u],{onlySelf:!0,emitEvent:a.emitEvent})}),this.updateValueAndValidity(a))}reset(e={},a={}){this._forEachChild((u,i)=>{u.reset(e?e[i]:null,{onlySelf:!0,emitEvent:a.emitEvent})}),this._updatePristine(a,this),this._updateTouched(a,this),this.updateValueAndValidity(a)}getRawValue(){return this._reduceChildren({},(e,a,u)=>(e[u]=a.getRawValue(),e))}_syncPendingControls(){let e=this._reduceChildren(!1,(a,u)=>!!u._syncPendingControls()||a);return e&&this.updateValueAndValidity({onlySelf:!0}),e}_forEachChild(e){Object.keys(this.controls).forEach(a=>{const u=this.controls[a];u&&e(u,a)})}_setUpControls(){this._forEachChild(e=>{e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange)})}_updateValue(){this.value=this._reduceValue()}_anyControls(e){for(const[a,u]of Object.entries(this.controls))if(this.contains(a)&&e(u))return!0;return!1}_reduceValue(){return this._reduceChildren({},(a,u,i)=>((u.enabled||this.disabled)&&(a[i]=u.value),a))}_reduceChildren(e,a){let u=e;return this._forEachChild((i,r)=>{u=a(u,i,r)}),u}_allControlsDisabled(){for(const e of Object.keys(this.controls))if(this.controls[e].enabled)return!1;return Object.keys(this.controls).length>0||this.disabled}_find(e){return this.controls.hasOwnProperty(e)?this.controls[e]:null}}class AO extends Ox{}const up=new he("CallSetDisabledState",{providedIn:"root",factory:()=>jx}),jx="always";function eF(t,e){return[...e.path,t]}function Gx(t,e,a=jx){hM(t,e),e.valueAccessor.writeValue(t.value),(t.disabled||"always"===a)&&e.valueAccessor.setDisabledState?.(t.disabled),function Cre(t,e){e.valueAccessor.registerOnChange(a=>{t._pendingValue=a,t._pendingChange=!0,t._pendingDirty=!0,"change"===t.updateOn&&wO(t,e)})}(t,e),function _re(t,e){const a=(u,i)=>{e.valueAccessor.writeValue(u),i&&e.viewToModelUpdate(u)};t.registerOnChange(a),e._registerOnDestroy(()=>{t._unregisterOnChange(a)})}(t,e),function yre(t,e){e.valueAccessor.registerOnTouched(()=>{t._pendingTouched=!0,"blur"===t.updateOn&&t._pendingChange&&wO(t,e),"submit"!==t.updateOn&&t.markAsTouched()})}(t,e),function Dre(t,e){if(e.valueAccessor.setDisabledState){const a=u=>{e.valueAccessor.setDisabledState(u)};t.registerOnDisabledChange(a),e._registerOnDestroy(()=>{t._unregisterOnDisabledChange(a)})}}(t,e)}function aF(t,e,a=!0){const u=()=>{};e.valueAccessor&&(e.valueAccessor.registerOnChange(u),e.valueAccessor.registerOnTouched(u)),uF(t,e),t&&(e._invokeOnDestroyCallbacks(),t._registerOnCollectionChange(()=>{}))}function tF(t,e){t.forEach(a=>{a.registerOnValidatorChange&&a.registerOnValidatorChange(e)})}function hM(t,e){const a=vO(t);null!==e.validator?t.setValidators(EO(a,e.validator)):"function"==typeof a&&t.setValidators([a]);const u=bO(t);null!==e.asyncValidator?t.setAsyncValidators(EO(u,e.asyncValidator)):"function"==typeof u&&t.setAsyncValidators([u]);const i=()=>t.updateValueAndValidity();tF(e._rawValidators,i),tF(e._rawAsyncValidators,i)}function uF(t,e){let a=!1;if(null!==t){if(null!==e.validator){const i=vO(t);if(Array.isArray(i)&&i.length>0){const r=i.filter(o=>o!==e.validator);r.length!==i.length&&(a=!0,t.setValidators(r))}}if(null!==e.asyncValidator){const i=bO(t);if(Array.isArray(i)&&i.length>0){const r=i.filter(o=>o!==e.asyncValidator);r.length!==i.length&&(a=!0,t.setAsyncValidators(r))}}}const u=()=>{};return tF(e._rawValidators,u),tF(e._rawAsyncValidators,u),a}function wO(t,e){t._pendingDirty&&t.markAsDirty(),t.setValue(t._pendingValue,{emitModelToViewChange:!1}),e.viewToModelUpdate(t._pendingValue),t._pendingChange=!1}function BO(t,e){hM(t,e)}function pM(t,e){if(!t.hasOwnProperty("model"))return!1;const a=t.model;return!!a.isFirstChange()||!Object.is(e,a.currentValue)}function SO(t,e){t._syncPendingControls(),e.forEach(a=>{const u=a.control;"submit"===u.updateOn&&u._pendingChange&&(a.viewToModelUpdate(u._pendingValue),u._pendingChange=!1)})}function gM(t,e){if(!e)return null;let a,u,i;return Array.isArray(e),e.forEach(r=>{r.constructor===nh?a=r:function wre(t){return Object.getPrototypeOf(t.constructor)===M0}(r)?u=r:i=r}),i||u||a||null}const Sre={provide:Zr,useExisting:It(()=>sh)},Kx=Promise.resolve();class sh extends Zr{get submitted(){return Os(this.submittedReactive)}constructor(e,a,u){super(),this.callSetDisabledState=u,this._submitted=vx(()=>this.submittedReactive()),this.submittedReactive=Is(!1),this._directives=new Set,this.ngSubmit=new Ue,this.form=new Ox({},uM(e),iM(a))}ngAfterViewInit(){this._setUpdateStrategy()}get formDirective(){return this}get control(){return this.form}get path(){return[]}get controls(){return this.form.controls}addControl(e){Kx.then(()=>{const a=this._findContainer(e.path);e.control=a.registerControl(e.name,e.control),Gx(e.control,e,this.callSetDisabledState),e.control.updateValueAndValidity({emitEvent:!1}),this._directives.add(e)})}getControl(e){return this.form.get(e.path)}removeControl(e){Kx.then(()=>{const a=this._findContainer(e.path);a&&a.removeControl(e.name),this._directives.delete(e)})}addFormGroup(e){Kx.then(()=>{const a=this._findContainer(e.path),u=new Ox({});BO(u,e),a.registerControl(e.name,u),u.updateValueAndValidity({emitEvent:!1})})}removeFormGroup(e){Kx.then(()=>{const a=this._findContainer(e.path);a&&a.removeControl(e.name)})}getFormGroup(e){return this.form.get(e.path)}updateModel(e,a){Kx.then(()=>{this.form.get(e.path).setValue(a)})}setValue(e){this.control.setValue(e)}onSubmit(e){return this.submittedReactive.set(!0),SO(this.form,this._directives),this.ngSubmit.emit(e),"dialog"===e?.target?.method}onReset(){this.resetForm()}resetForm(e=void 0){this.form.reset(e),this.submittedReactive.set(!1)}_setUpdateStrategy(){this.options&&null!=this.options.updateOn&&(this.form._updateOn=this.options.updateOn)}_findContainer(e){return e.pop(),e.length?this.form.get(e):this.form}static#e=this.\u0275fac=function(a){return new(a||sh)(X(mr,10),X(oh,10),X(up,8))};static#a=this.\u0275dir=Me({type:sh,selectors:[["form",3,"ngNoForm","",3,"formGroup",""],["ng-form"],["","ngForm",""]],hostBindings:function(a,u){1&a&&Qu("submit",function(r){return u.onSubmit(r)})("reset",function(){return u.onReset()})},inputs:{options:[0,"ngFormOptions","options"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[Bu([Sre]),Ht]})}function zO(t,e){const a=t.indexOf(e);a>-1&&t.splice(a,1)}function MO(t){return"object"==typeof t&&null!==t&&2===Object.keys(t).length&&"value"in t&&"disabled"in t}const Wx=class extends X_{constructor(e=null,a,u){super(dM(a),cM(u,a)),this.defaultValue=null,this._onChange=[],this._pendingChange=!1,this._applyFormState(e),this._setUpdateStrategy(a),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),Q_(a)&&(a.nonNullable||a.initialValueIsDefault)&&(MO(e)?this.defaultValue=e.value:this.defaultValue=e)}setValue(e,a={}){this.value=this._pendingValue=e,this._onChange.length&&!1!==a.emitModelToViewChange&&this._onChange.forEach(u=>u(this.value,!1!==a.emitViewToModelChange)),this.updateValueAndValidity(a)}patchValue(e,a={}){this.setValue(e,a)}reset(e=this.defaultValue,a={}){this._applyFormState(e),this.markAsPristine(a),this.markAsUntouched(a),this.setValue(this.value,a),this._pendingChange=!1}_updateValue(){}_anyControls(e){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(e){this._onChange.push(e)}_unregisterOnChange(e){zO(this._onChange,e)}registerOnDisabledChange(e){this._onDisabledChange.push(e)}_unregisterOnDisabledChange(e){zO(this._onDisabledChange,e)}_forEachChild(e){}_syncPendingControls(){return!("submit"!==this.updateOn||(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),!this._pendingChange))&&(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),!0)}_applyFormState(e){MO(e)?(this.value=this._pendingValue=e.value,e.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=e}};class FE extends Zr{ngOnInit(){this._checkParentType(),this.formDirective.addFormGroup(this)}ngOnDestroy(){this.formDirective&&this.formDirective.removeFormGroup(this)}get control(){return this.formDirective.getFormGroup(this)}get path(){return eF(null==this.name?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}_checkParentType(){}static#e=this.\u0275fac=(()=>{let e;return function(u){return(e||(e=Au(FE)))(u||FE)}})();static#a=this.\u0275dir=Me({type:FE,features:[Ht]})}const Mre={provide:Zr,useExisting:It(()=>dh)};class dh extends FE{constructor(e,a,u){super(),this.name="",this._parent=e,this._setValidators(a),this._setAsyncValidators(u)}_checkParentType(){!(this._parent instanceof dh)&&this._parent}static#e=this.\u0275fac=function(a){return new(a||dh)(X(Zr,5),X(mr,10),X(oh,10))};static#a=this.\u0275dir=Me({type:dh,selectors:[["","ngModelGroup",""]],inputs:{name:[0,"ngModelGroup","name"]},exportAs:["ngModelGroup"],features:[Bu([Mre]),Ht]})}const Lre={provide:lh,useExisting:It(()=>ip)},LO=Promise.resolve();class ip extends lh{constructor(e,a,u,i,r,o){super(),this._changeDetectorRef=r,this.callSetDisabledState=o,this.control=new Wx,this._registered=!1,this.name="",this.update=new Ue,this._parent=e,this._setValidators(a),this._setAsyncValidators(u),this.valueAccessor=gM(0,i)}ngOnChanges(e){if(this._checkForErrors(),!this._registered||"name"in e){if(this._registered&&(this._checkName(),this.formDirective)){const a=e.name.previousValue;this.formDirective.removeControl({name:a,path:this._getPath(a)})}this._setUpControl()}"isDisabled"in e&&this._updateDisabled(e),pM(e,this.viewModel)&&(this._updateValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}get path(){return this._getPath(this.name)}get formDirective(){return this._parent?this._parent.formDirective:null}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}_setUpControl(){this._setUpdateStrategy(),this._isStandalone()?this._setUpStandalone():this.formDirective.addControl(this),this._registered=!0}_setUpdateStrategy(){this.options&&null!=this.options.updateOn&&(this.control._updateOn=this.options.updateOn)}_isStandalone(){return!this._parent||!(!this.options||!this.options.standalone)}_setUpStandalone(){Gx(this.control,this,this.callSetDisabledState),this.control.updateValueAndValidity({emitEvent:!1})}_checkForErrors(){this._isStandalone()||this._checkParentType(),this._checkName()}_checkParentType(){}_checkName(){this.options&&this.options.name&&(this.name=this.options.name),!this._isStandalone()&&this.name}_updateValue(e){LO.then(()=>{this.control.setValue(e,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(e){const a=e.isDisabled.currentValue,u=0!==a&&au(a);LO.then(()=>{u&&!this.control.disabled?this.control.disable():!u&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(e){return this._parent?eF(e,this._parent):[e]}static#e=this.\u0275fac=function(a){return new(a||ip)(X(Zr,9),X(mr,10),X(oh,10),X(L0,10),X(Xu,8),X(up,8))};static#a=this.\u0275dir=Me({type:ip,selectors:[["","ngModel","",3,"formControlName","",3,"formControl",""]],inputs:{name:"name",isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"],options:[0,"ngModelOptions","options"]},outputs:{update:"ngModelChange"},exportAs:["ngModel"],features:[Bu([Lre]),Ht,nn]})}class AE{static#e=this.\u0275fac=function(a){return new(a||AE)};static#a=this.\u0275dir=Me({type:AE,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""]})}const Tre={provide:L0,useExisting:It(()=>ch),multi:!0};class ch extends M0{writeValue(e){const a=e??"";this.setProperty("value",a)}registerOnChange(e){this.onChange=a=>{e(""==a?null:parseFloat(a))}}static#e=this.\u0275fac=(()=>{let e;return function(u){return(e||(e=Au(ch)))(u||ch)}})();static#a=this.\u0275dir=Me({type:ch,selectors:[["input","type","number","formControlName",""],["input","type","number","formControl",""],["input","type","number","ngModel",""]],hostBindings:function(a,u){1&a&&Qu("input",function(r){return u.onChange(r.target.value)})("blur",function(){return u.onTouched()})},features:[Bu([Tre]),Ht]})}const Pre={provide:L0,useExisting:It(()=>np),multi:!0};class Ux{constructor(){this._accessors=[]}add(e,a){this._accessors.push([e,a])}remove(e){for(let a=this._accessors.length-1;a>=0;--a)if(this._accessors[a][1]===e)return void this._accessors.splice(a,1)}select(e){this._accessors.forEach(a=>{this._isSameGroup(a,e)&&a[1]!==e&&a[1].fireUncheck(e.value)})}_isSameGroup(e,a){return!!e[0].control&&(e[0]._parent===a._control._parent&&e[1].name===a.name)}static#e=this.\u0275fac=function(a){return new(a||Ux)};static#a=this.\u0275prov=oe({token:Ux,factory:Ux.\u0275fac,providedIn:"root"})}class np extends M0{constructor(e,a,u,i){super(e,a),this._registry=u,this._injector=i,this.setDisabledStateFired=!1,this.onChange=()=>{},this.callSetDisabledState=U(up,{optional:!0})??jx}ngOnInit(){this._control=this._injector.get(lh),this._checkName(),this._registry.add(this._control,this)}ngOnDestroy(){this._registry.remove(this)}writeValue(e){this._state=e===this.value,this.setProperty("checked",this._state)}registerOnChange(e){this._fn=e,this.onChange=()=>{e(this.value),this._registry.select(this)}}setDisabledState(e){(this.setDisabledStateFired||e||"whenDisabledForLegacyCode"===this.callSetDisabledState)&&this.setProperty("disabled",e),this.setDisabledStateFired=!0}fireUncheck(e){this.writeValue(e)}_checkName(){this.name&&this.formControlName&&(this.name,this.formControlName),!this.name&&this.formControlName&&(this.name=this.formControlName)}static#e=this.\u0275fac=function(a){return new(a||np)(X(Vn),X(Rt),X(Ux),X(su))};static#a=this.\u0275dir=Me({type:np,selectors:[["input","type","radio","formControlName",""],["input","type","radio","formControl",""],["input","type","radio","ngModel",""]],hostBindings:function(a,u){1&a&&Qu("change",function(){return u.onChange()})("blur",function(){return u.onTouched()})},inputs:{name:"name",formControlName:"formControlName",value:"value"},features:[Bu([Pre]),Ht]})}const Nre={provide:L0,useExisting:It(()=>hh),multi:!0};class hh extends M0{writeValue(e){this.setProperty("value",parseFloat(e))}registerOnChange(e){this.onChange=a=>{e(""==a?null:parseFloat(a))}}static#e=this.\u0275fac=(()=>{let e;return function(u){return(e||(e=Au(hh)))(u||hh)}})();static#a=this.\u0275dir=Me({type:hh,selectors:[["input","type","range","formControlName",""],["input","type","range","formControl",""],["input","type","range","ngModel",""]],hostBindings:function(a,u){1&a&&Qu("change",function(r){return u.onChange(r.target.value)})("input",function(r){return u.onChange(r.target.value)})("blur",function(){return u.onTouched()})},features:[Bu([Nre]),Ht]})}const EM=new he(""),Ire={provide:lh,useExisting:It(()=>rp)};class rp extends lh{set isDisabled(e){}static#e=this._ngModelWarningSentOnce=!1;constructor(e,a,u,i,r){super(),this._ngModelWarningConfig=i,this.callSetDisabledState=r,this.update=new Ue,this._ngModelWarningSent=!1,this._setValidators(e),this._setAsyncValidators(a),this.valueAccessor=gM(0,u)}ngOnChanges(e){if(this._isControlChanged(e)){const a=e.form.previousValue;a&&aF(a,this,!1),Gx(this.form,this,this.callSetDisabledState),this.form.updateValueAndValidity({emitEvent:!1})}pM(e,this.viewModel)&&(this.form.setValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.form&&aF(this.form,this,!1)}get path(){return[]}get control(){return this.form}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}_isControlChanged(e){return e.hasOwnProperty("form")}static#a=this.\u0275fac=function(a){return new(a||rp)(X(mr,10),X(oh,10),X(L0,10),X(EM,8),X(up,8))};static#t=this.\u0275dir=Me({type:rp,selectors:[["","formControl",""]],inputs:{form:[0,"formControl","form"],isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"]},outputs:{update:"ngModelChange"},exportAs:["ngForm"],features:[Bu([Ire]),Ht,nn]})}const Rre={provide:Zr,useExisting:It(()=>mh)};class mh extends Zr{get submitted(){return Os(this._submittedReactive)}set submitted(e){this._submittedReactive.set(e)}constructor(e,a,u){super(),this.callSetDisabledState=u,this._submitted=vx(()=>this._submittedReactive()),this._submittedReactive=Is(!1),this._onCollectionChange=()=>this._updateDomValue(),this.directives=[],this.form=null,this.ngSubmit=new Ue,this._setValidators(e),this._setAsyncValidators(a)}ngOnChanges(e){this._checkFormPresent(),e.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations(),this._oldForm=this.form)}ngOnDestroy(){this.form&&(uF(this.form,this),this.form._onCollectionChange===this._onCollectionChange&&this.form._registerOnCollectionChange(()=>{}))}get formDirective(){return this}get control(){return this.form}get path(){return[]}addControl(e){const a=this.form.get(e.path);return Gx(a,e,this.callSetDisabledState),a.updateValueAndValidity({emitEvent:!1}),this.directives.push(e),a}getControl(e){return this.form.get(e.path)}removeControl(e){aF(e.control||null,e,!1),function Bre(t,e){const a=t.indexOf(e);a>-1&&t.splice(a,1)}(this.directives,e)}addFormGroup(e){this._setUpFormContainer(e)}removeFormGroup(e){this._cleanUpFormContainer(e)}getFormGroup(e){return this.form.get(e.path)}addFormArray(e){this._setUpFormContainer(e)}removeFormArray(e){this._cleanUpFormContainer(e)}getFormArray(e){return this.form.get(e.path)}updateModel(e,a){this.form.get(e.path).setValue(a)}onSubmit(e){return this._submittedReactive.set(!0),SO(this.form,this.directives),this.ngSubmit.emit(e),this.form._events.next(new bre(this.control)),"dialog"===e?.target?.method}onReset(){this.resetForm()}resetForm(e=void 0){this.form.reset(e),this._submittedReactive.set(!1),this.form._events.next(new kre(this.form))}_updateDomValue(){this.directives.forEach(e=>{const a=e.control,u=this.form.get(e.path);a!==u&&(aF(a||null,e),(t=>t instanceof Wx)(u)&&(Gx(u,e,this.callSetDisabledState),e.control=u))}),this.form._updateTreeValidity({emitEvent:!1})}_setUpFormContainer(e){const a=this.form.get(e.path);BO(a,e),a.updateValueAndValidity({emitEvent:!1})}_cleanUpFormContainer(e){if(this.form){const a=this.form.get(e.path);a&&function Fre(t,e){return uF(t,e)}(a,e)&&a.updateValueAndValidity({emitEvent:!1})}}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm&&this._oldForm._registerOnCollectionChange(()=>{})}_updateValidators(){hM(this.form,this),this._oldForm&&uF(this._oldForm,this)}_checkFormPresent(){this.form}static#e=this.\u0275fac=function(a){return new(a||mh)(X(mr,10),X(oh,10),X(up,8))};static#a=this.\u0275dir=Me({type:mh,selectors:[["","formGroup",""]],hostBindings:function(a,u){1&a&&Qu("submit",function(r){return u.onSubmit(r)})("reset",function(){return u.onReset()})},inputs:{form:[0,"formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[Bu([Rre]),Ht,nn]})}const Hre={provide:Zr,useExisting:It(()=>ph)};class ph extends FE{constructor(e,a,u){super(),this.name=null,this._parent=e,this._setValidators(a),this._setAsyncValidators(u)}_checkParentType(){TO(this._parent)}static#e=this.\u0275fac=function(a){return new(a||ph)(X(Zr,13),X(mr,10),X(oh,10))};static#a=this.\u0275dir=Me({type:ph,selectors:[["","formGroupName",""]],inputs:{name:[0,"formGroupName","name"]},features:[Bu([Hre]),Ht]})}const Vre={provide:Zr,useExisting:It(()=>gh)};class gh extends Zr{constructor(e,a,u){super(),this.name=null,this._parent=e,this._setValidators(a),this._setAsyncValidators(u)}ngOnInit(){this._checkParentType(),this.formDirective.addFormArray(this)}ngOnDestroy(){this.formDirective&&this.formDirective.removeFormArray(this)}get control(){return this.formDirective.getFormArray(this)}get formDirective(){return this._parent?this._parent.formDirective:null}get path(){return eF(null==this.name?this.name:this.name.toString(),this._parent)}_checkParentType(){TO(this._parent)}static#e=this.\u0275fac=function(a){return new(a||gh)(X(Zr,13),X(mr,10),X(oh,10))};static#a=this.\u0275dir=Me({type:gh,selectors:[["","formArrayName",""]],inputs:{name:[0,"formArrayName","name"]},features:[Bu([Vre]),Ht]})}function TO(t){return!(t instanceof ph||t instanceof mh||t instanceof gh)}const Ore={provide:lh,useExisting:It(()=>op)};class op extends lh{set isDisabled(e){}static#e=this._ngModelWarningSentOnce=!1;constructor(e,a,u,i,r){super(),this._ngModelWarningConfig=r,this._added=!1,this.name=null,this.update=new Ue,this._ngModelWarningSent=!1,this._parent=e,this._setValidators(a),this._setAsyncValidators(u),this.valueAccessor=gM(0,i)}ngOnChanges(e){this._added||this._setUpControl(),pM(e,this.viewModel)&&(this.viewModel=this.model,this.formDirective.updateModel(this,this.model))}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}get path(){return eF(null==this.name?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}_checkParentType(){}_setUpControl(){this._checkParentType(),this.control=this.formDirective.addControl(this),this._added=!0}static#a=this.\u0275fac=function(a){return new(a||op)(X(Zr,13),X(mr,10),X(oh,10),X(L0,10),X(EM,8))};static#t=this.\u0275dir=Me({type:op,selectors:[["","formControlName",""]],inputs:{name:[0,"formControlName","name"],isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"]},outputs:{update:"ngModelChange"},features:[Bu([Ore]),Ht,nn]})}const jre={provide:L0,useExisting:It(()=>Cc),multi:!0};function PO(t,e){return null==t?`${e}`:(e&&"object"==typeof e&&(e="Object"),`${t}: ${e}`.slice(0,50))}class Cc extends M0{constructor(){super(...arguments),this._optionMap=new Map,this._idCounter=0,this._compareWith=Object.is}set compareWith(e){this._compareWith=e}writeValue(e){this.value=e;const u=PO(this._getOptionId(e),e);this.setProperty("value",u)}registerOnChange(e){this.onChange=a=>{this.value=this._getOptionValue(a),e(this.value)}}_registerOption(){return(this._idCounter++).toString()}_getOptionId(e){for(const a of this._optionMap.keys())if(this._compareWith(this._optionMap.get(a),e))return a;return null}_getOptionValue(e){const a=function Gre(t){return t.split(":")[0]}(e);return this._optionMap.has(a)?this._optionMap.get(a):e}static#e=this.\u0275fac=(()=>{let e;return function(u){return(e||(e=Au(Cc)))(u||Cc)}})();static#a=this.\u0275dir=Me({type:Cc,selectors:[["select","formControlName","",3,"multiple",""],["select","formControl","",3,"multiple",""],["select","ngModel","",3,"multiple",""]],hostBindings:function(a,u){1&a&&Qu("change",function(r){return u.onChange(r.target.value)})("blur",function(){return u.onTouched()})},inputs:{compareWith:"compareWith"},features:[Bu([jre]),Ht]})}class wE{constructor(e,a,u){this._element=e,this._renderer=a,this._select=u,this._select&&(this.id=this._select._registerOption())}set ngValue(e){null!=this._select&&(this._select._optionMap.set(this.id,e),this._setElementValue(PO(this.id,e)),this._select.writeValue(this._select.value))}set value(e){this._setElementValue(e),this._select&&this._select.writeValue(this._select.value)}_setElementValue(e){this._renderer.setProperty(this._element.nativeElement,"value",e)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))}static#e=this.\u0275fac=function(a){return new(a||wE)(X(Rt),X(Vn),X(Cc,9))};static#a=this.\u0275dir=Me({type:wE,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"}})}const Kre={provide:L0,useExisting:It(()=>yc),multi:!0};function NO(t,e){return null==t?`${e}`:("string"==typeof e&&(e=`'${e}'`),e&&"object"==typeof e&&(e="Object"),`${t}: ${e}`.slice(0,50))}class yc extends M0{constructor(){super(...arguments),this._optionMap=new Map,this._idCounter=0,this._compareWith=Object.is}set compareWith(e){this._compareWith=e}writeValue(e){let a;if(this.value=e,Array.isArray(e)){const u=e.map(i=>this._getOptionId(i));a=(i,r)=>{i._setSelected(u.indexOf(r.toString())>-1)}}else a=(u,i)=>{u._setSelected(!1)};this._optionMap.forEach(a)}registerOnChange(e){this.onChange=a=>{const u=[],i=a.selectedOptions;if(void 0!==i){const r=i;for(let o=0;o{let e;return function(u){return(e||(e=Au(yc)))(u||yc)}})();static#a=this.\u0275dir=Me({type:yc,selectors:[["select","multiple","","formControlName",""],["select","multiple","","formControl",""],["select","multiple","","ngModel",""]],hostBindings:function(a,u){1&a&&Qu("change",function(r){return u.onChange(r.target)})("blur",function(){return u.onTouched()})},inputs:{compareWith:"compareWith"},features:[Bu([Kre]),Ht]})}class BE{constructor(e,a,u){this._element=e,this._renderer=a,this._select=u,this._select&&(this.id=this._select._registerOption(this))}set ngValue(e){null!=this._select&&(this._value=e,this._setElementValue(NO(this.id,e)),this._select.writeValue(this._select.value))}set value(e){this._select?(this._value=e,this._setElementValue(NO(this.id,e)),this._select.writeValue(this._select.value)):this._setElementValue(e)}_setElementValue(e){this._renderer.setProperty(this._element.nativeElement,"value",e)}_setSelected(e){this._renderer.setProperty(this._element.nativeElement,"selected",e)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))}static#e=this.\u0275fac=function(a){return new(a||BE)(X(Rt),X(Vn),X(yc,9))};static#a=this.\u0275dir=Me({type:BE,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"}})}function IO(t){return"number"==typeof t?t:parseInt(t,10)}function RO(t){return"number"==typeof t?t:parseFloat(t)}class Ws{constructor(){this._validator=J_}ngOnChanges(e){if(this.inputName in e){const a=this.normalizeInput(e[this.inputName].currentValue);this._enabled=this.enabled(a),this._validator=this._enabled?this.createValidator(a):J_,this._onChange&&this._onChange()}}validate(e){return this._validator(e)}registerOnValidatorChange(e){this._onChange=e}enabled(e){return null!=e}static#e=this.\u0275fac=function(a){return new(a||Ws)};static#a=this.\u0275dir=Me({type:Ws,features:[nn]})}const Ure={provide:mr,useExisting:It(()=>Eh),multi:!0};class Eh extends Ws{constructor(){super(...arguments),this.inputName="max",this.normalizeInput=e=>RO(e),this.createValidator=e=>tO(e)}static#e=this.\u0275fac=(()=>{let e;return function(u){return(e||(e=Au(Eh)))(u||Eh)}})();static#a=this.\u0275dir=Me({type:Eh,selectors:[["input","type","number","max","","formControlName",""],["input","type","number","max","","formControl",""],["input","type","number","max","","ngModel",""]],hostVars:1,hostBindings:function(a,u){2&a&&dr("max",u._enabled?u.max:null)},inputs:{max:"max"},features:[Bu([Ure]),Ht]})}const Jre={provide:mr,useExisting:It(()=>vh),multi:!0};class vh extends Ws{constructor(){super(...arguments),this.inputName="min",this.normalizeInput=e=>RO(e),this.createValidator=e=>aO(e)}static#e=this.\u0275fac=(()=>{let e;return function(u){return(e||(e=Au(vh)))(u||vh)}})();static#a=this.\u0275dir=Me({type:vh,selectors:[["input","type","number","min","","formControlName",""],["input","type","number","min","","formControl",""],["input","type","number","min","","ngModel",""]],hostVars:1,hostBindings:function(a,u){2&a&&dr("min",u._enabled?u.min:null)},inputs:{min:"min"},features:[Bu([Jre]),Ht]})}const Zre={provide:mr,useExisting:It(()=>_c),multi:!0},$re={provide:mr,useExisting:It(()=>bh),multi:!0};class _c extends Ws{constructor(){super(...arguments),this.inputName="required",this.normalizeInput=au,this.createValidator=e=>uO}enabled(e){return e}static#e=this.\u0275fac=(()=>{let e;return function(u){return(e||(e=Au(_c)))(u||_c)}})();static#a=this.\u0275dir=Me({type:_c,selectors:[["","required","","formControlName","",3,"type","checkbox"],["","required","","formControl","",3,"type","checkbox"],["","required","","ngModel","",3,"type","checkbox"]],hostVars:1,hostBindings:function(a,u){2&a&&dr("required",u._enabled?"":null)},inputs:{required:"required"},features:[Bu([Zre]),Ht]})}class bh extends _c{constructor(){super(...arguments),this.createValidator=e=>iO}static#e=this.\u0275fac=(()=>{let e;return function(u){return(e||(e=Au(bh)))(u||bh)}})();static#a=this.\u0275dir=Me({type:bh,selectors:[["input","type","checkbox","required","","formControlName",""],["input","type","checkbox","required","","formControl",""],["input","type","checkbox","required","","ngModel",""]],hostVars:1,hostBindings:function(a,u){2&a&&dr("required",u._enabled?"":null)},features:[Bu([$re]),Ht]})}const qre={provide:mr,useExisting:It(()=>kh),multi:!0};class kh extends Ws{constructor(){super(...arguments),this.inputName="email",this.normalizeInput=au,this.createValidator=e=>nO}enabled(e){return e}static#e=this.\u0275fac=(()=>{let e;return function(u){return(e||(e=Au(kh)))(u||kh)}})();static#a=this.\u0275dir=Me({type:kh,selectors:[["","email","","formControlName",""],["","email","","formControl",""],["","email","","ngModel",""]],inputs:{email:"email"},features:[Bu([qre]),Ht]})}const Yre={provide:mr,useExisting:It(()=>xh),multi:!0};class xh extends Ws{constructor(){super(...arguments),this.inputName="minlength",this.normalizeInput=e=>IO(e),this.createValidator=e=>rO(e)}static#e=this.\u0275fac=(()=>{let e;return function(u){return(e||(e=Au(xh)))(u||xh)}})();static#a=this.\u0275dir=Me({type:xh,selectors:[["","minlength","","formControlName",""],["","minlength","","formControl",""],["","minlength","","ngModel",""]],hostVars:1,hostBindings:function(a,u){2&a&&dr("minlength",u._enabled?u.minlength:null)},inputs:{minlength:"minlength"},features:[Bu([Yre]),Ht]})}const Qre={provide:mr,useExisting:It(()=>fh),multi:!0};class fh extends Ws{constructor(){super(...arguments),this.inputName="maxlength",this.normalizeInput=e=>IO(e),this.createValidator=e=>oO(e)}static#e=this.\u0275fac=(()=>{let e;return function(u){return(e||(e=Au(fh)))(u||fh)}})();static#a=this.\u0275dir=Me({type:fh,selectors:[["","maxlength","","formControlName",""],["","maxlength","","formControl",""],["","maxlength","","ngModel",""]],hostVars:1,hostBindings:function(a,u){2&a&&dr("maxlength",u._enabled?u.maxlength:null)},inputs:{maxlength:"maxlength"},features:[Bu([Qre]),Ht]})}const Xre={provide:mr,useExisting:It(()=>Dh),multi:!0};class Dh extends Ws{constructor(){super(...arguments),this.inputName="pattern",this.normalizeInput=e=>e,this.createValidator=e=>lO(e)}static#e=this.\u0275fac=(()=>{let e;return function(u){return(e||(e=Au(Dh)))(u||Dh)}})();static#a=this.\u0275dir=Me({type:Dh,selectors:[["","pattern","","formControlName",""],["","pattern","","formControl",""],["","pattern","","ngModel",""]],hostVars:1,hostBindings:function(a,u){2&a&&dr("pattern",u._enabled?u.pattern:null)},inputs:{pattern:"pattern"},features:[Bu([Xre]),Ht]})}class lp{static#e=this.\u0275fac=function(a){return new(a||lp)};static#a=this.\u0275mod=kn({type:lp,declarations:[AE,wE,BE,nh,ch,hh,ih,Cc,yc,np,DE,CE,_c,xh,fh,Dh,bh,kh,vh,Eh],exports:[AE,wE,BE,nh,ch,hh,ih,Cc,yc,np,DE,CE,_c,xh,fh,Dh,bh,kh,vh,Eh]});static#t=this.\u0275inj=$u({})}class HO extends X_{constructor(e,a,u){super(dM(a),cM(u,a)),this.controls=e,this._initObservables(),this._setUpdateStrategy(a),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}at(e){return this.controls[this._adjustIndex(e)]}push(e,a={}){this.controls.push(e),this._registerControl(e),this.updateValueAndValidity({emitEvent:a.emitEvent}),this._onCollectionChange()}insert(e,a,u={}){this.controls.splice(e,0,a),this._registerControl(a),this.updateValueAndValidity({emitEvent:u.emitEvent})}removeAt(e,a={}){let u=this._adjustIndex(e);u<0&&(u=0),this.controls[u]&&this.controls[u]._registerOnCollectionChange(()=>{}),this.controls.splice(u,1),this.updateValueAndValidity({emitEvent:a.emitEvent})}setControl(e,a,u={}){let i=this._adjustIndex(e);i<0&&(i=0),this.controls[i]&&this.controls[i]._registerOnCollectionChange(()=>{}),this.controls.splice(i,1),a&&(this.controls.splice(i,0,a),this._registerControl(a)),this.updateValueAndValidity({emitEvent:u.emitEvent}),this._onCollectionChange()}get length(){return this.controls.length}setValue(e,a={}){FO(this,0,e),e.forEach((u,i)=>{_O(this,!1,i),this.at(i).setValue(u,{onlySelf:!0,emitEvent:a.emitEvent})}),this.updateValueAndValidity(a)}patchValue(e,a={}){null!=e&&(e.forEach((u,i)=>{this.at(i)&&this.at(i).patchValue(u,{onlySelf:!0,emitEvent:a.emitEvent})}),this.updateValueAndValidity(a))}reset(e=[],a={}){this._forEachChild((u,i)=>{u.reset(e[i],{onlySelf:!0,emitEvent:a.emitEvent})}),this._updatePristine(a,this),this._updateTouched(a,this),this.updateValueAndValidity(a)}getRawValue(){return this.controls.map(e=>e.getRawValue())}clear(e={}){this.controls.length<1||(this._forEachChild(a=>a._registerOnCollectionChange(()=>{})),this.controls.splice(0),this.updateValueAndValidity({emitEvent:e.emitEvent}))}_adjustIndex(e){return e<0?e+this.length:e}_syncPendingControls(){let e=this.controls.reduce((a,u)=>!!u._syncPendingControls()||a,!1);return e&&this.updateValueAndValidity({onlySelf:!0}),e}_forEachChild(e){this.controls.forEach((a,u)=>{e(a,u)})}_updateValue(){this.value=this.controls.filter(e=>e.enabled||this.disabled).map(e=>e.value)}_anyControls(e){return this.controls.some(a=>a.enabled&&e(a))}_setUpControls(){this._forEachChild(e=>this._registerControl(e))}_allControlsDisabled(){for(const e of this.controls)if(e.enabled)return!1;return this.controls.length>0||this.disabled}_registerControl(e){e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange)}_find(e){return this.at(e)??null}}function VO(t){return!!t&&(void 0!==t.asyncValidators||void 0!==t.validators||void 0!==t.updateOn)}class sp{constructor(){this.useNonNullable=!1}get nonNullable(){const e=new sp;return e.useNonNullable=!0,e}group(e,a=null){const u=this._reduceControls(e);let i={};return VO(a)?i=a:null!==a&&(i.validators=a.validator,i.asyncValidators=a.asyncValidator),new Ox(u,i)}record(e,a=null){const u=this._reduceControls(e);return new AO(u,a)}control(e,a,u){let i={};return this.useNonNullable?(VO(a)?i=a:(i.validators=a,i.asyncValidators=u),new Wx(e,{...i,nonNullable:!0})):new Wx(e,a,u)}array(e,a,u){const i=e.map(r=>this._createControl(r));return new HO(i,a,u)}_reduceControls(e){const a={};return Object.keys(e).forEach(u=>{a[u]=this._createControl(e[u])}),a}_createControl(e){if(e instanceof Wx)return e;if(e instanceof X_)return e;if(Array.isArray(e)){const a=e[0],u=e.length>1?e[1]:null,i=e.length>2?e[2]:null;return this.control(a,u,i)}return this.control(e)}static#e=this.\u0275fac=function(a){return new(a||sp)};static#a=this.\u0275prov=oe({token:sp,factory:sp.\u0275fac,providedIn:"root"})}class vM{static#e=this.\u0275fac=function(a){return new(a||vM)};static#a=this.\u0275prov=oe({token:vM,factory:()=>U(sp).nonNullable,providedIn:"root"})}class Jx extends sp{group(e,a=null){return super.group(e,a)}control(e,a,u){return super.control(e,a,u)}array(e,a,u){return super.array(e,a,u)}static#e=this.\u0275fac=(()=>{let e;return function(u){return(e||(e=Au(Jx)))(u||Jx)}})();static#a=this.\u0275prov=oe({token:Jx,factory:Jx.\u0275fac,providedIn:"root"})}new tE("18.1.3");class Zx{static withConfig(e){return{ngModule:Zx,providers:[{provide:up,useValue:e.callSetDisabledState??jx}]}}static#e=this.\u0275fac=function(a){return new(a||Zx)};static#a=this.\u0275mod=kn({type:Zx,declarations:[ip,dh,sh],exports:[lp,ip,dh,sh]});static#t=this.\u0275inj=$u({imports:[lp]})}class iF{static withConfig(e){return{ngModule:iF,providers:[{provide:EM,useValue:e.warnOnNgModelWithFormControl??"always"},{provide:up,useValue:e.callSetDisabledState??jx}]}}static#e=this.\u0275fac=function(a){return new(a||iF)};static#a=this.\u0275mod=kn({type:iF,declarations:[rp,mh,op,ph,gh],exports:[lp,rp,mh,op,ph,gh]});static#t=this.\u0275inj=$u({imports:[lp]})}function $e(...t){return qi(t,Ix(t))}function jn(t,e,a=1/0){return Se(e)?jn((u,i)=>aa((r,o)=>e(u,r,i,o))(Jr(t(u,i))),a):("number"==typeof e&&(a=e),da((u,i)=>function eoe(t,e,a,u,i,r,o,d){const h=[];let m=0,g=0,v=!1;const k=()=>{v&&!h.length&&!m&&e.complete()},x=C=>m{r&&e.next(C),m++;let F=!1;Jr(a(C,g++)).subscribe(it(e,A=>{i?.(A),r?x(A):e.next(A)},()=>{F=!0},void 0,()=>{if(F)try{for(m--;h.length&&mD(A)):D(A)}k()}catch(A){e.error(A)}}))};return t.subscribe(it(e,x,()=>{v=!0,k()})),()=>{d?.()}}(u,i,t,a)))}function dp(t,e){return Se(e)?jn(t,e,1):jn(t,1)}function $x(t){return da((e,a)=>{try{e.subscribe(a)}finally{a.add(t)}})}function Do(t,e){return da((a,u)=>{let i=null,r=0,o=!1;const d=()=>o&&!i&&u.complete();a.subscribe(it(u,h=>{i?.unsubscribe();let m=0;const g=r++;Jr(t(h,g)).subscribe(i=it(u,v=>u.next(e?e(h,v,g,m++):v),()=>{i=null,d()}))},()=>{o=!0,d()}))})}class nF{}class rF{}class el{constructor(e){this.normalizedNames=new Map,this.lazyUpdate=null,e?"string"==typeof e?this.lazyInit=()=>{this.headers=new Map,e.split("\n").forEach(a=>{const u=a.indexOf(":");if(u>0){const i=a.slice(0,u),r=i.toLowerCase(),o=a.slice(u+1).trim();this.maybeSetNormalizedName(i,r),this.headers.has(r)?this.headers.get(r).push(o):this.headers.set(r,[o])}})}:typeof Headers<"u"&&e instanceof Headers?(this.headers=new Map,e.forEach((a,u)=>{this.setHeaderEntries(u,a)})):this.lazyInit=()=>{this.headers=new Map,Object.entries(e).forEach(([a,u])=>{this.setHeaderEntries(a,u)})}:this.headers=new Map}has(e){return this.init(),this.headers.has(e.toLowerCase())}get(e){this.init();const a=this.headers.get(e.toLowerCase());return a&&a.length>0?a[0]:null}keys(){return this.init(),Array.from(this.normalizedNames.values())}getAll(e){return this.init(),this.headers.get(e.toLowerCase())||null}append(e,a){return this.clone({name:e,value:a,op:"a"})}set(e,a){return this.clone({name:e,value:a,op:"s"})}delete(e,a){return this.clone({name:e,value:a,op:"d"})}maybeSetNormalizedName(e,a){this.normalizedNames.has(a)||this.normalizedNames.set(a,e)}init(){this.lazyInit&&(this.lazyInit instanceof el?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach(e=>this.applyUpdate(e)),this.lazyUpdate=null))}copyFrom(e){e.init(),Array.from(e.headers.keys()).forEach(a=>{this.headers.set(a,e.headers.get(a)),this.normalizedNames.set(a,e.normalizedNames.get(a))})}clone(e){const a=new el;return a.lazyInit=this.lazyInit&&this.lazyInit instanceof el?this.lazyInit:this,a.lazyUpdate=(this.lazyUpdate||[]).concat([e]),a}applyUpdate(e){const a=e.name.toLowerCase();switch(e.op){case"a":case"s":let u=e.value;if("string"==typeof u&&(u=[u]),0===u.length)return;this.maybeSetNormalizedName(e.name,a);const i=("a"===e.op?this.headers.get(a):void 0)||[];i.push(...u),this.headers.set(a,i);break;case"d":const r=e.value;if(r){let o=this.headers.get(a);if(!o)return;o=o.filter(d=>-1===r.indexOf(d)),0===o.length?(this.headers.delete(a),this.normalizedNames.delete(a)):this.headers.set(a,o)}else this.headers.delete(a),this.normalizedNames.delete(a)}}setHeaderEntries(e,a){const u=(Array.isArray(a)?a:[a]).map(r=>r.toString()),i=e.toLowerCase();this.headers.set(i,u),this.maybeSetNormalizedName(e,i)}forEach(e){this.init(),Array.from(this.normalizedNames.keys()).forEach(a=>e(this.normalizedNames.get(a),this.headers.get(a)))}}class aoe{encodeKey(e){return OO(e)}encodeValue(e){return OO(e)}decodeKey(e){return decodeURIComponent(e)}decodeValue(e){return decodeURIComponent(e)}}const uoe=/%(\d[a-f0-9])/gi,ioe={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function OO(t){return encodeURIComponent(t).replace(uoe,(e,a)=>ioe[a]??e)}function oF(t){return`${t}`}class Ch{constructor(e={}){if(this.updates=null,this.cloneFrom=null,this.encoder=e.encoder||new aoe,e.fromString){if(e.fromObject)throw new Error("Cannot specify both fromString and fromObject.");this.map=function toe(t,e){const a=new Map;return t.length>0&&t.replace(/^\?/,"").split("&").forEach(i=>{const r=i.indexOf("="),[o,d]=-1==r?[e.decodeKey(i),""]:[e.decodeKey(i.slice(0,r)),e.decodeValue(i.slice(r+1))],h=a.get(o)||[];h.push(d),a.set(o,h)}),a}(e.fromString,this.encoder)}else e.fromObject?(this.map=new Map,Object.keys(e.fromObject).forEach(a=>{const u=e.fromObject[a],i=Array.isArray(u)?u.map(oF):[oF(u)];this.map.set(a,i)})):this.map=null}has(e){return this.init(),this.map.has(e)}get(e){this.init();const a=this.map.get(e);return a?a[0]:null}getAll(e){return this.init(),this.map.get(e)||null}keys(){return this.init(),Array.from(this.map.keys())}append(e,a){return this.clone({param:e,value:a,op:"a"})}appendAll(e){const a=[];return Object.keys(e).forEach(u=>{const i=e[u];Array.isArray(i)?i.forEach(r=>{a.push({param:u,value:r,op:"a"})}):a.push({param:u,value:i,op:"a"})}),this.clone(a)}set(e,a){return this.clone({param:e,value:a,op:"s"})}delete(e,a){return this.clone({param:e,value:a,op:"d"})}toString(){return this.init(),this.keys().map(e=>{const a=this.encoder.encodeKey(e);return this.map.get(e).map(u=>a+"="+this.encoder.encodeValue(u)).join("&")}).filter(e=>""!==e).join("&")}clone(e){const a=new Ch({encoder:this.encoder});return a.cloneFrom=this.cloneFrom||this,a.updates=(this.updates||[]).concat(e),a}init(){null===this.map&&(this.map=new Map),null!==this.cloneFrom&&(this.cloneFrom.init(),this.cloneFrom.keys().forEach(e=>this.map.set(e,this.cloneFrom.map.get(e))),this.updates.forEach(e=>{switch(e.op){case"a":case"s":const a=("a"===e.op?this.map.get(e.param):void 0)||[];a.push(oF(e.value)),this.map.set(e.param,a);break;case"d":if(void 0===e.value){this.map.delete(e.param);break}{let u=this.map.get(e.param)||[];const i=u.indexOf(oF(e.value));-1!==i&&u.splice(i,1),u.length>0?this.map.set(e.param,u):this.map.delete(e.param)}}}),this.cloneFrom=this.updates=null)}}class noe{constructor(){this.map=new Map}set(e,a){return this.map.set(e,a),this}get(e){return this.map.has(e)||this.map.set(e,e.defaultValue()),this.map.get(e)}delete(e){return this.map.delete(e),this}has(e){return this.map.has(e)}keys(){return this.map.keys()}}function jO(t){return typeof ArrayBuffer<"u"&&t instanceof ArrayBuffer}function GO(t){return typeof Blob<"u"&&t instanceof Blob}function KO(t){return typeof FormData<"u"&&t instanceof FormData}class qx{constructor(e,a,u,i){let r;if(this.url=a,this.body=null,this.reportProgress=!1,this.withCredentials=!1,this.responseType="json",this.method=e.toUpperCase(),function roe(t){switch(t){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}(this.method)||i?(this.body=void 0!==u?u:null,r=i):r=u,r&&(this.reportProgress=!!r.reportProgress,this.withCredentials=!!r.withCredentials,r.responseType&&(this.responseType=r.responseType),r.headers&&(this.headers=r.headers),r.context&&(this.context=r.context),r.params&&(this.params=r.params),this.transferCache=r.transferCache),this.headers??=new el,this.context??=new noe,this.params){const o=this.params.toString();if(0===o.length)this.urlWithParams=a;else{const d=a.indexOf("?"),h=-1===d?"?":dk.set(x,e.setHeaders[x]),m)),e.setParams&&(g=Object.keys(e.setParams).reduce((k,x)=>k.set(x,e.setParams[x]),g)),new qx(a,u,o,{params:g,headers:m,context:v,reportProgress:h,responseType:i,withCredentials:d,transferCache:r})}}var Us;!function(t){t[t.Sent=0]="Sent",t[t.UploadProgress=1]="UploadProgress",t[t.ResponseHeader=2]="ResponseHeader",t[t.DownloadProgress=3]="DownloadProgress",t[t.Response=4]="Response",t[t.User=5]="User"}(Us||(Us={}));class bM{constructor(e,a=200,u="OK"){this.headers=e.headers||new el,this.status=void 0!==e.status?e.status:a,this.statusText=e.statusText||u,this.url=e.url||null,this.ok=this.status>=200&&this.status<300}}class lF extends bM{constructor(e={}){super(e),this.type=Us.ResponseHeader}clone(e={}){return new lF({headers:e.headers||this.headers,status:void 0!==e.status?e.status:this.status,statusText:e.statusText||this.statusText,url:e.url||this.url||void 0})}}class yh extends bM{constructor(e={}){super(e),this.type=Us.Response,this.body=void 0!==e.body?e.body:null}clone(e={}){return new yh({body:void 0!==e.body?e.body:this.body,headers:e.headers||this.headers,status:void 0!==e.status?e.status:this.status,statusText:e.statusText||this.statusText,url:e.url||this.url||void 0})}}class _h extends bM{constructor(e){super(e,0,"Unknown Error"),this.name="HttpErrorResponse",this.ok=!1,this.status>=200&&this.status<300?this.message=`Http failure during parsing for ${e.url||"(unknown url)"}`:this.message=`Http failure response for ${e.url||"(unknown url)"}: ${e.status} ${e.statusText}`,this.error=e.error||null}}var WO;function xM(t,e){return{body:e,headers:t.headers,context:t.context,observe:t.observe,params:t.params,reportProgress:t.reportProgress,responseType:t.responseType,withCredentials:t.withCredentials,transferCache:t.transferCache}}!function(t){t[t.Continue=100]="Continue",t[t.SwitchingProtocols=101]="SwitchingProtocols",t[t.Processing=102]="Processing",t[t.EarlyHints=103]="EarlyHints",t[t.Ok=200]="Ok",t[t.Created=201]="Created",t[t.Accepted=202]="Accepted",t[t.NonAuthoritativeInformation=203]="NonAuthoritativeInformation",t[t.NoContent=204]="NoContent",t[t.ResetContent=205]="ResetContent",t[t.PartialContent=206]="PartialContent",t[t.MultiStatus=207]="MultiStatus",t[t.AlreadyReported=208]="AlreadyReported",t[t.ImUsed=226]="ImUsed",t[t.MultipleChoices=300]="MultipleChoices",t[t.MovedPermanently=301]="MovedPermanently",t[t.Found=302]="Found",t[t.SeeOther=303]="SeeOther",t[t.NotModified=304]="NotModified",t[t.UseProxy=305]="UseProxy",t[t.Unused=306]="Unused",t[t.TemporaryRedirect=307]="TemporaryRedirect",t[t.PermanentRedirect=308]="PermanentRedirect",t[t.BadRequest=400]="BadRequest",t[t.Unauthorized=401]="Unauthorized",t[t.PaymentRequired=402]="PaymentRequired",t[t.Forbidden=403]="Forbidden",t[t.NotFound=404]="NotFound",t[t.MethodNotAllowed=405]="MethodNotAllowed",t[t.NotAcceptable=406]="NotAcceptable",t[t.ProxyAuthenticationRequired=407]="ProxyAuthenticationRequired",t[t.RequestTimeout=408]="RequestTimeout",t[t.Conflict=409]="Conflict",t[t.Gone=410]="Gone",t[t.LengthRequired=411]="LengthRequired",t[t.PreconditionFailed=412]="PreconditionFailed",t[t.PayloadTooLarge=413]="PayloadTooLarge",t[t.UriTooLong=414]="UriTooLong",t[t.UnsupportedMediaType=415]="UnsupportedMediaType",t[t.RangeNotSatisfiable=416]="RangeNotSatisfiable",t[t.ExpectationFailed=417]="ExpectationFailed",t[t.ImATeapot=418]="ImATeapot",t[t.MisdirectedRequest=421]="MisdirectedRequest",t[t.UnprocessableEntity=422]="UnprocessableEntity",t[t.Locked=423]="Locked",t[t.FailedDependency=424]="FailedDependency",t[t.TooEarly=425]="TooEarly",t[t.UpgradeRequired=426]="UpgradeRequired",t[t.PreconditionRequired=428]="PreconditionRequired",t[t.TooManyRequests=429]="TooManyRequests",t[t.RequestHeaderFieldsTooLarge=431]="RequestHeaderFieldsTooLarge",t[t.UnavailableForLegalReasons=451]="UnavailableForLegalReasons",t[t.InternalServerError=500]="InternalServerError",t[t.NotImplemented=501]="NotImplemented",t[t.BadGateway=502]="BadGateway",t[t.ServiceUnavailable=503]="ServiceUnavailable",t[t.GatewayTimeout=504]="GatewayTimeout",t[t.HttpVersionNotSupported=505]="HttpVersionNotSupported",t[t.VariantAlsoNegotiates=506]="VariantAlsoNegotiates",t[t.InsufficientStorage=507]="InsufficientStorage",t[t.LoopDetected=508]="LoopDetected",t[t.NotExtended=510]="NotExtended",t[t.NetworkAuthenticationRequired=511]="NetworkAuthenticationRequired"}(WO||(WO={}));class jt{constructor(e){this.handler=e}request(e,a,u={}){let i;if(e instanceof qx)i=e;else{let d,h;d=u.headers instanceof el?u.headers:new el(u.headers),u.params&&(h=u.params instanceof Ch?u.params:new Ch({fromObject:u.params})),i=new qx(e,a,void 0!==u.body?u.body:null,{headers:d,context:u.context,params:h,reportProgress:u.reportProgress,responseType:u.responseType||"json",withCredentials:u.withCredentials,transferCache:u.transferCache})}const r=$e(i).pipe(dp(d=>this.handler.handle(d)));if(e instanceof qx||"events"===u.observe)return r;const o=r.pipe(Jt(d=>d instanceof yh));switch(u.observe||"body"){case"body":switch(i.responseType){case"arraybuffer":return o.pipe(aa(d=>{if(null!==d.body&&!(d.body instanceof ArrayBuffer))throw new Error("Response is not an ArrayBuffer.");return d.body}));case"blob":return o.pipe(aa(d=>{if(null!==d.body&&!(d.body instanceof Blob))throw new Error("Response is not a Blob.");return d.body}));case"text":return o.pipe(aa(d=>{if(null!==d.body&&"string"!=typeof d.body)throw new Error("Response is not a string.");return d.body}));default:return o.pipe(aa(d=>d.body))}case"response":return o;default:throw new Error(`Unreachable: unhandled observe type ${u.observe}}`)}}delete(e,a={}){return this.request("DELETE",e,a)}get(e,a={}){return this.request("GET",e,a)}head(e,a={}){return this.request("HEAD",e,a)}jsonp(e,a){return this.request("JSONP",e,{params:(new Ch).append(a,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}options(e,a={}){return this.request("OPTIONS",e,a)}patch(e,a,u={}){return this.request("PATCH",e,xM(u,a))}post(e,a,u={}){return this.request("POST",e,xM(u,a))}put(e,a,u={}){return this.request("PUT",e,xM(u,a))}static#e=this.\u0275fac=function(a){return new(a||jt)(ye(nF))};static#a=this.\u0275prov=oe({token:jt,factory:jt.\u0275fac})}const soe=/^\)\]\}',?\n/;function UO(t){if(t.url)return t.url;const e="X-Request-URL".toLocaleLowerCase();return t.headers.get(e)}class cp{constructor(){this.fetchImpl=U(coe,{optional:!0})?.fetch??fetch.bind(globalThis),this.ngZone=U(rt)}handle(e){return new ht(a=>{const u=new AbortController;return this.doRequest(e,u.signal,a).then(fM,i=>a.error(new _h({error:i}))),()=>u.abort()})}doRequest(e,a,u){var i=this;return Su(function*(){const r=i.createRequestInit(e);let o;try{const x=i.ngZone.runOutsideAngular(()=>i.fetchImpl(e.urlWithParams,{signal:a,...r}));(function hoe(t){t.then(fM,fM)})(x),u.next({type:Us.Sent}),o=yield x}catch(x){return void u.error(new _h({error:x,status:x.status??0,statusText:x.statusText,url:e.urlWithParams,headers:x.headers}))}const d=new el(o.headers),h=o.statusText,m=UO(o)??e.urlWithParams;let g=o.status,v=null;if(e.reportProgress&&u.next(new lF({headers:d,status:g,statusText:h,url:m})),o.body){const x=o.headers.get("content-length"),D=[],C=o.body.getReader();let A,z,F=0;const M=typeof Zone<"u"&&Zone.current;yield i.ngZone.runOutsideAngular(Su(function*(){for(;;){const{done:R,value:G}=yield C.read();if(R)break;if(D.push(G),F+=G.length,e.reportProgress){z="text"===e.responseType?(z??"")+(A??=new TextDecoder).decode(G,{stream:!0}):void 0;const $=()=>u.next({type:Us.DownloadProgress,total:x?+x:void 0,loaded:F,partialText:z});M?M.run($):$()}}}));const L=i.concatChunks(D,F);try{const R=o.headers.get("Content-Type")??"";v=i.parseBody(e,L,R)}catch(R){return void u.error(new _h({error:R,headers:new el(o.headers),status:o.status,statusText:o.statusText,url:UO(o)??e.urlWithParams}))}}0===g&&(g=v?200:0),g>=200&&g<300?(u.next(new yh({body:v,headers:d,status:g,statusText:h,url:m})),u.complete()):u.error(new _h({error:v,headers:d,status:g,statusText:h,url:m}))})()}parseBody(e,a,u){switch(e.responseType){case"json":const i=(new TextDecoder).decode(a).replace(soe,"");return""===i?null:JSON.parse(i);case"text":return(new TextDecoder).decode(a);case"blob":return new Blob([a],{type:u});case"arraybuffer":return a.buffer}}createRequestInit(e){const a={},u=e.withCredentials?"include":void 0;if(e.headers.forEach((i,r)=>a[i]=r.join(",")),e.headers.has("Accept")||(a.Accept="application/json, text/plain, */*"),!e.headers.has("Content-Type")){const i=e.detectContentTypeHeader();null!==i&&(a["Content-Type"]=i)}return{body:e.serializeBody(),method:e.method,headers:a,credentials:u}}concatChunks(e,a){const u=new Uint8Array(a);let i=0;for(const r of e)u.set(r,i),i+=r.length;return u}static#e=this.\u0275fac=function(a){return new(a||cp)};static#a=this.\u0275prov=oe({token:cp,factory:cp.\u0275fac})}class coe{}function fM(){}function JO(t,e){return e(t)}function moe(t,e){return(a,u)=>e.intercept(a,{handle:i=>t(i,u)})}const ZO=new he(""),Yx=new he(""),$O=new he(""),qO=new he("",{providedIn:"root",factory:()=>!0});function goe(){let t=null;return(e,a)=>{null===t&&(t=(U(ZO,{optional:!0})??[]).reduceRight(moe,JO));const u=U(na);if(U(qO)){const r=u.add();return t(e,a).pipe($x(()=>u.remove(r)))}return t(e,a)}}class SE extends nF{constructor(e,a){super(),this.backend=e,this.injector=a,this.chain=null,this.pendingTasks=U(na),this.contributeToStability=U(qO)}handle(e){if(null===this.chain){const a=Array.from(new Set([...this.injector.get(Yx),...this.injector.get($O,[])]));this.chain=a.reduceRight((u,i)=>function poe(t,e,a){return(u,i)=>Pr(a,()=>e(u,r=>t(r,i)))}(u,i,this.injector),JO)}if(this.contributeToStability){const a=this.pendingTasks.add();return this.chain(e,u=>this.backend.handle(u)).pipe($x(()=>this.pendingTasks.remove(a)))}return this.chain(e,a=>this.backend.handle(a))}static#e=this.\u0275fac=function(a){return new(a||SE)(ye(rF),ye(tn))};static#a=this.\u0275prov=oe({token:SE,factory:SE.\u0275fac})}let YO,voe=0;class QO{}function Doe(){return"object"==typeof window?window:{}}class zE{constructor(e,a){this.callbackMap=e,this.document=a,this.resolvedPromise=Promise.resolve()}nextCallback(){return"ng_jsonp_callback_"+voe++}handle(e){if("JSONP"!==e.method)throw new Error("JSONP requests must use JSONP request method.");if("json"!==e.responseType)throw new Error("JSONP requests must use Json response type.");if(e.headers.keys().length>0)throw new Error("JSONP requests do not support headers.");return new ht(a=>{const u=this.nextCallback(),i=e.urlWithParams.replace(/=JSONP_CALLBACK(&|$)/,`=${u}$1`),r=this.document.createElement("script");r.src=i;let o=null,d=!1;this.callbackMap[u]=v=>{delete this.callbackMap[u],o=v,d=!0};const h=()=>{r.parentNode&&r.parentNode.removeChild(r),delete this.callbackMap[u]};return r.addEventListener("load",v=>{this.resolvedPromise.then(()=>{h(),d?(a.next(new yh({body:o,status:200,statusText:"OK",url:i})),a.complete()):a.error(new _h({url:i,status:0,statusText:"JSONP Error",error:new Error("JSONP injected script did not invoke callback.")}))})}),r.addEventListener("error",v=>{h(),a.error(new _h({error:v,status:0,statusText:"JSONP Error",url:i}))}),this.document.body.appendChild(r),a.next({type:Us.Sent}),()=>{d||this.removeListeners(r),h()}})}removeListeners(e){YO??=this.document.implementation.createHTMLDocument(),YO.adoptNode(e)}static#e=this.\u0275fac=function(a){return new(a||zE)(ye(QO),ye(ei))};static#a=this.\u0275prov=oe({token:zE,factory:zE.\u0275fac})}function XO(t,e){return"JSONP"===t.method?U(zE).handle(t):e(t)}class sF{constructor(e){this.injector=e}intercept(e,a){return Pr(this.injector,()=>XO(e,u=>a.handle(u)))}static#e=this.\u0275fac=function(a){return new(a||sF)(ye(tn))};static#a=this.\u0275prov=oe({token:sF,factory:sF.\u0275fac})}const Coe=/^\)\]\}',?\n/;class ME{constructor(e){this.xhrFactory=e}handle(e){if("JSONP"===e.method)throw new Z(-2800,!1);const a=this.xhrFactory;return(a.\u0275loadImpl?qi(a.\u0275loadImpl()):$e(null)).pipe(Do(()=>new ht(i=>{const r=a.build();if(r.open(e.method,e.urlWithParams),e.withCredentials&&(r.withCredentials=!0),e.headers.forEach((D,C)=>r.setRequestHeader(D,C.join(","))),e.headers.has("Accept")||r.setRequestHeader("Accept","application/json, text/plain, */*"),!e.headers.has("Content-Type")){const D=e.detectContentTypeHeader();null!==D&&r.setRequestHeader("Content-Type",D)}if(e.responseType){const D=e.responseType.toLowerCase();r.responseType="json"!==D?D:"text"}const o=e.serializeBody();let d=null;const h=()=>{if(null!==d)return d;const D=r.statusText||"OK",C=new el(r.getAllResponseHeaders()),F=function yoe(t){return"responseURL"in t&&t.responseURL?t.responseURL:/^X-Request-URL:/m.test(t.getAllResponseHeaders())?t.getResponseHeader("X-Request-URL"):null}(r)||e.url;return d=new lF({headers:C,status:r.status,statusText:D,url:F}),d},m=()=>{let{headers:D,status:C,statusText:F,url:A}=h(),z=null;204!==C&&(z=typeof r.response>"u"?r.responseText:r.response),0===C&&(C=z?200:0);let M=C>=200&&C<300;if("json"===e.responseType&&"string"==typeof z){const L=z;z=z.replace(Coe,"");try{z=""!==z?JSON.parse(z):null}catch(R){z=L,M&&(M=!1,z={error:R,text:z})}}M?(i.next(new yh({body:z,headers:D,status:C,statusText:F,url:A||void 0})),i.complete()):i.error(new _h({error:z,headers:D,status:C,statusText:F,url:A||void 0}))},g=D=>{const{url:C}=h(),F=new _h({error:D,status:r.status||0,statusText:r.statusText||"Unknown Error",url:C||void 0});i.error(F)};let v=!1;const k=D=>{v||(i.next(h()),v=!0);let C={type:Us.DownloadProgress,loaded:D.loaded};D.lengthComputable&&(C.total=D.total),"text"===e.responseType&&r.responseText&&(C.partialText=r.responseText),i.next(C)},x=D=>{let C={type:Us.UploadProgress,loaded:D.loaded};D.lengthComputable&&(C.total=D.total),i.next(C)};return r.addEventListener("load",m),r.addEventListener("error",g),r.addEventListener("timeout",g),r.addEventListener("abort",g),e.reportProgress&&(r.addEventListener("progress",k),null!==o&&r.upload&&r.upload.addEventListener("progress",x)),r.send(o),i.next({type:Us.Sent}),()=>{r.removeEventListener("error",g),r.removeEventListener("abort",g),r.removeEventListener("load",m),r.removeEventListener("timeout",g),e.reportProgress&&(r.removeEventListener("progress",k),null!==o&&r.upload&&r.upload.removeEventListener("progress",x)),r.readyState!==r.DONE&&r.abort()}})))}static#e=this.\u0275fac=function(a){return new(a||ME)(ye(oV))};static#a=this.\u0275prov=oe({token:ME,factory:ME.\u0275fac})}const dF=new he(""),ej="XSRF-TOKEN",aj=new he("",{providedIn:"root",factory:()=>ej}),tj="X-XSRF-TOKEN",uj=new he("",{providedIn:"root",factory:()=>tj});class DM{}class LE{constructor(e,a,u){this.doc=e,this.platform=a,this.cookieName=u,this.lastCookieString="",this.lastToken=null,this.parseCount=0}getToken(){if("server"===this.platform)return null;const e=this.doc.cookie||"";return e!==this.lastCookieString&&(this.parseCount++,this.lastToken=eV(e,this.cookieName),this.lastCookieString=e),this.lastToken}static#e=this.\u0275fac=function(a){return new(a||LE)(ye(ei),ye(yn),ye(aj))};static#a=this.\u0275prov=oe({token:LE,factory:LE.\u0275fac})}function ij(t,e){const a=t.url.toLowerCase();if(!U(dF)||"GET"===t.method||"HEAD"===t.method||a.startsWith("http://")||a.startsWith("https://"))return e(t);const u=U(DM).getToken(),i=U(uj);return null!=u&&!t.headers.has(i)&&(t=t.clone({headers:t.headers.set(i,u)})),e(t)}class TE{constructor(e){this.injector=e}intercept(e,a){return Pr(this.injector,()=>ij(e,u=>a.handle(u)))}static#e=this.\u0275fac=function(a){return new(a||TE)(ye(tn))};static#a=this.\u0275prov=oe({token:TE,factory:TE.\u0275fac})}var Fc;function hp(t,e){return{\u0275kind:t,\u0275providers:e}}function nj(...t){const e=[jt,ME,SE,{provide:nF,useExisting:SE},{provide:rF,useFactory:()=>U(cp,{optional:!0})??U(ME)},{provide:Yx,useValue:ij,multi:!0},{provide:dF,useValue:!0},{provide:DM,useClass:LE}];for(const a of t)e.push(...a.\u0275providers);return i0(e)}!function(t){t[t.Interceptors=0]="Interceptors",t[t.LegacyInterceptors=1]="LegacyInterceptors",t[t.CustomXsrfConfiguration=2]="CustomXsrfConfiguration",t[t.NoXsrfProtection=3]="NoXsrfProtection",t[t.JsonpSupport=4]="JsonpSupport",t[t.RequestsMadeViaParent=5]="RequestsMadeViaParent",t[t.Fetch=6]="Fetch"}(Fc||(Fc={}));const rj=new he("");function oj(){return hp(Fc.LegacyInterceptors,[{provide:rj,useFactory:goe},{provide:Yx,useExisting:rj,multi:!0}])}function lj({cookieName:t,headerName:e}){const a=[];return void 0!==t&&a.push({provide:aj,useValue:t}),void 0!==e&&a.push({provide:uj,useValue:e}),hp(Fc.CustomXsrfConfiguration,a)}function Foe(){return hp(Fc.JsonpSupport,[zE,{provide:QO,useFactory:Doe},{provide:Yx,useValue:XO,multi:!0}])}class Qx{static disable(){return{ngModule:Qx,providers:[hp(Fc.NoXsrfProtection,[{provide:dF,useValue:!1}]).\u0275providers]}}static withOptions(e={}){return{ngModule:Qx,providers:lj(e).\u0275providers}}static#e=this.\u0275fac=function(a){return new(a||Qx)};static#a=this.\u0275mod=kn({type:Qx});static#t=this.\u0275inj=$u({providers:[TE,{provide:ZO,useExisting:TE,multi:!0},{provide:DM,useClass:LE},lj({cookieName:ej,headerName:tj}).\u0275providers,{provide:dF,useValue:!0}]})}class CM{static#e=this.\u0275fac=function(a){return new(a||CM)};static#a=this.\u0275mod=kn({type:CM});static#t=this.\u0275inj=$u({providers:[nj(oj())]})}class yM{static#e=this.\u0275fac=function(a){return new(a||yM)};static#a=this.\u0275mod=kn({type:yM});static#t=this.\u0275inj=$u({providers:[Foe().\u0275providers]})}new he(""),new he("");function Fh(t){return da((e,a)=>{Jr(t).subscribe(it(a,()=>a.complete(),Oi)),!a.closed&&e.subscribe(a)})}class Poe extends wa{constructor(e,a){super()}schedule(e,a=0){return this}}const hF={setInterval(t,e,...a){const{delegate:u}=hF;return u?.setInterval?u.setInterval(t,e,...a):setInterval(t,e,...a)},clearInterval(t){const{delegate:e}=hF;return(e?.clearInterval||clearInterval)(t)},delegate:void 0};class _M extends Poe{constructor(e,a){super(e,a),this.scheduler=e,this.work=a,this.pending=!1}schedule(e,a=0){var u;if(this.closed)return this;this.state=e;const i=this.id,r=this.scheduler;return null!=i&&(this.id=this.recycleAsyncId(r,i,a)),this.pending=!0,this.delay=a,this.id=null!==(u=this.id)&&void 0!==u?u:this.requestAsyncId(r,this.id,a),this}requestAsyncId(e,a,u=0){return hF.setInterval(e.flush.bind(e,this),u)}recycleAsyncId(e,a,u=0){if(null!=u&&this.delay===u&&!1===this.pending)return a;null!=a&&hF.clearInterval(a)}execute(e,a){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;const u=this._execute(e,a);if(u)return u;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))}_execute(e,a){let i,u=!1;try{this.work(e)}catch(r){u=!0,i=r||new Error("Scheduled action threw falsy error")}if(u)return this.unsubscribe(),i}unsubscribe(){if(!this.closed){const{id:e,scheduler:a}=this,{actions:u}=a;this.work=this.state=this.scheduler=null,this.pending=!1,ja(u,this),null!=e&&(this.id=this.recycleAsyncId(a,e,null)),this.delay=null,super.unsubscribe()}}}const FM={now:()=>(FM.delegate||Date).now(),delegate:void 0};class Xx{constructor(e,a=Xx.now){this.schedulerActionCtor=e,this.now=a}schedule(e,a=0,u){return new this.schedulerActionCtor(this,e).schedule(u,a)}}Xx.now=FM.now;class AM extends Xx{constructor(e,a=Xx.now){super(e,a),this.actions=[],this._active=!1}flush(e){const{actions:a}=this;if(this._active)return void a.push(e);let u;this._active=!0;do{if(u=e.execute(e.state,e.delay))break}while(e=a.shift());if(this._active=!1,u){for(;e=a.shift();)e.unsubscribe();throw u}}}const wM=new AM(_M),Noe=wM;function Hoe(t=0,e,a=Noe){let u=-1;return null!=e&&(qV(e)?a=e:u=e),new ht(i=>{let r=function Roe(t){return t instanceof Date&&!isNaN(t)}(t)?+t-a.now():t;r<0&&(r=0);let o=0;return a.schedule(function(){i.closed||(i.next(o++),0<=u?this.schedule(void 0,u):i.complete())},r)})}function Voe(t,e=wM){return function Ioe(t){return da((e,a)=>{let u=!1,i=null,r=null,o=!1;const d=()=>{if(r?.unsubscribe(),r=null,u){u=!1;const m=i;i=null,a.next(m)}o&&a.complete()},h=()=>{r=null,o&&a.complete()};e.subscribe(it(a,m=>{u=!0,i=m,r||Jr(t(m)).subscribe(r=it(a,d,h))},()=>{o=!0,(!u||!r||r.closed)&&a.complete()}))})}(()=>Hoe(t,e))}function PE(t=1/0){return jn($n,t)}function e2(...t){return function Ooe(){return PE(1)}()(qi(t,Ix(t)))}function Ej(...t){const e=Ix(t);return da((a,u)=>{(e?e2(t,a,e):e2(t,a)).subscribe(u)})}function pr(t,e,a){const u=Se(t)||e||a?{next:t,error:e,complete:a}:t;return u?da((i,r)=>{var o;null===(o=u.subscribe)||void 0===o||o.call(u);let d=!0;i.subscribe(it(r,h=>{var m;null===(m=u.next)||void 0===m||m.call(u,h),r.next(h)},()=>{var h;d=!1,null===(h=u.complete)||void 0===h||h.call(u),r.complete()},h=>{var m;d=!1,null===(m=u.error)||void 0===m||m.call(u,h),r.error(h)},()=>{var h,m;d&&(null===(h=u.unsubscribe)||void 0===h||h.call(u)),null===(m=u.finalize)||void 0===m||m.call(u)}))}):$n}function vj(t,e=wM){return da((a,u)=>{let i=null,r=null,o=null;const d=()=>{if(i){i.unsubscribe(),i=null;const m=r;r=null,u.next(m)}};function h(){const m=o+t,g=e.now();if(g{r=m,o=e.now(),i||(i=e.schedule(h,t),u.add(i))},()=>{d(),u.complete()},void 0,()=>{r=i=null}))})}const a2={schedule(t){let e=requestAnimationFrame,a=cancelAnimationFrame;const{delegate:u}=a2;u&&(e=u.requestAnimationFrame,a=u.cancelAnimationFrame);const i=e(r=>{a=void 0,t(r)});return new wa(()=>a?.(i))},requestAnimationFrame(...t){const{delegate:e}=a2;return(e?.requestAnimationFrame||requestAnimationFrame)(...t)},cancelAnimationFrame(...t){const{delegate:e}=a2;return(e?.cancelAnimationFrame||cancelAnimationFrame)(...t)},delegate:void 0};const Koe=new class Goe extends AM{flush(e){this._active=!0;const a=this._scheduled;this._scheduled=void 0;const{actions:u}=this;let i;e=e||u.shift();do{if(i=e.execute(e.state,e.delay))break}while((e=u[0])&&e.id===a&&u.shift());if(this._active=!1,i){for(;(e=u[0])&&e.id===a&&u.shift();)e.unsubscribe();throw i}}}(class joe extends _M{constructor(e,a){super(e,a),this.scheduler=e,this.work=a}requestAsyncId(e,a,u=0){return null!==u&&u>0?super.requestAsyncId(e,a,u):(e.actions.push(this),e._scheduled||(e._scheduled=a2.requestAnimationFrame(()=>e.flush(void 0))))}recycleAsyncId(e,a,u=0){var i;if(null!=u?u>0:this.delay>0)return super.recycleAsyncId(e,a,u);const{actions:r}=e;null!=a&&(null===(i=r[r.length-1])||void 0===i?void 0:i.id)!==a&&(a2.cancelAnimationFrame(a),e._scheduled=void 0)}});let BM,Woe=1;const mF={};function bj(t){return t in mF&&(delete mF[t],!0)}const Uoe={setImmediate(t){const e=Woe++;return mF[e]=!0,BM||(BM=Promise.resolve()),BM.then(()=>bj(e)&&t()),e},clearImmediate(t){bj(t)}},{setImmediate:Joe,clearImmediate:Zoe}=Uoe,pF={setImmediate(...t){const{delegate:e}=pF;return(e?.setImmediate||Joe)(...t)},clearImmediate(t){const{delegate:e}=pF;return(e?.clearImmediate||Zoe)(t)},delegate:void 0};const Yoe=new class qoe extends AM{flush(e){this._active=!0;const a=this._scheduled;this._scheduled=void 0;const{actions:u}=this;let i;e=e||u.shift();do{if(i=e.execute(e.state,e.delay))break}while((e=u[0])&&e.id===a&&u.shift());if(this._active=!1,i){for(;(e=u[0])&&e.id===a&&u.shift();)e.unsubscribe();throw i}}}(class $oe extends _M{constructor(e,a){super(e,a),this.scheduler=e,this.work=a}requestAsyncId(e,a,u=0){return null!==u&&u>0?super.requestAsyncId(e,a,u):(e.actions.push(this),e._scheduled||(e._scheduled=pF.setImmediate(e.flush.bind(e,void 0))))}recycleAsyncId(e,a,u=0){var i;if(null!=u?u>0:this.delay>0)return super.recycleAsyncId(e,a,u);const{actions:r}=e;null!=a&&(null===(i=r[r.length-1])||void 0===i?void 0:i.id)!==a&&(pF.clearImmediate(a),e._scheduled===a&&(e._scheduled=void 0))}}),Qoe=["addListener","removeListener"],Xoe=["addEventListener","removeEventListener"],ele=["on","off"];function NE(t,e,a,u){if(Se(a)&&(u=a,a=void 0),u)return NE(t,e,a).pipe(tM(u));const[i,r]=function ule(t){return Se(t.addEventListener)&&Se(t.removeEventListener)}(t)?Xoe.map(o=>d=>t[o](e,d,a)):function ale(t){return Se(t.addListener)&&Se(t.removeListener)}(t)?Qoe.map(kj(t,e)):function tle(t){return Se(t.on)&&Se(t.off)}(t)?ele.map(kj(t,e)):[];if(!i&&eM(t))return jn(o=>NE(o,e,a))(Jr(t));if(!i)throw new TypeError("Invalid event target");return new ht(o=>{const d=(...h)=>o.next(1r(d)})}function kj(t,e){return a=>u=>t[a](e,u)}function SM(...t){const e=Ix(t),a=function nre(t,e){return"number"==typeof aM(t)?t.pop():e}(t,1/0),u=t;return u.length?1===u.length?Jr(u[0]):PE(a)(qi(u,e)):Ju}const ile=["content"],nle=["scroll"],rle=["padding"],xj=["*"],t2=t=>({searchTerm:t});function ole(t,e){if(1&t&&(eu(0,"div",3),Yy(1,6),wu()),2&t){const a=dt();$a(),ki("ngTemplateOutlet",a.headerTemplate)("ngTemplateOutletContext",I4(2,t2,a.filterValue))}}function lle(t,e){if(1&t&&(eu(0,"div",5),Yy(1,6),wu()),2&t){const a=dt();$a(),ki("ngTemplateOutlet",a.footerTemplate)("ngTemplateOutletContext",I4(2,t2,a.filterValue))}}const sle=["searchInput"],dle=["clearButton"],cle=(t,e,a)=>({item:t,clear:e,label:a}),hle=(t,e)=>({items:t,clear:e}),mle=(t,e,a,u)=>({item:t,item$:e,index:a,searchTerm:u});function ple(t,e){if(1&t&&(eu(0,"div",20),B0(1),wu()),2&t){const a=dt(2);$a(),$1(a.placeholder)}}function gle(t,e){}function Ele(t,e){if(1&t&&Ji(0,ple,2,1,"ng-template",null,1,mc)(2,gle,0,0,"ng-template",19),2&t){const a=w0(1),u=dt();$a(2),ki("ngTemplateOutlet",u.placeholderTemplate||a)}}function vle(t,e){if(1&t){const a=Z1();eu(0,"span",23),Qu("click",function(){nt(a);const i=dt().$implicit;return Xe(dt(2).unselect(i))}),B0(1,"\xd7"),wu(),J1(2,"span",24)}if(2&t){const a=dt().$implicit,u=dt(2);$a(2),ki("ngItemLabel",a.label)("escape",u.escapeHTML)}}function ble(t,e){}function kle(t,e){if(1&t&&(eu(0,"div",22),Ji(1,vle,3,2,"ng-template",null,2,mc)(3,ble,0,0,"ng-template",12),wu()),2&t){const a=e.$implicit,u=w0(2),i=dt(2);cr("ng-value-disabled",a.disabled),$a(3),ki("ngTemplateOutlet",i.labelTemplate||u)("ngTemplateOutletContext",vR(4,cle,a.value,i.clearItem,a.label))}}function xle(t,e){if(1&t&&NS(0,kle,4,8,"div",21,LS().trackByOption,!0),2&t){IS(dt().selectedItems)}}function fle(t,e){}function Dle(t,e){if(1&t&&Ji(0,fle,0,0,"ng-template",12),2&t){const a=dt();ki("ngTemplateOutlet",a.multiLabelTemplate)("ngTemplateOutletContext",ER(2,hle,a.selectedValues,a.clearItem))}}function Cle(t,e){1&t&&J1(0,"div",25)}function yle(t,e){}function _le(t,e){if(1&t&&Ji(0,Cle,1,0,"ng-template",null,3,mc)(2,yle,0,0,"ng-template",19),2&t){const a=w0(1),u=dt();$a(2),ki("ngTemplateOutlet",u.loadingSpinnerTemplate||a)}}function Fle(t,e){if(1&t&&(eu(0,"span",15,4)(2,"span",26),B0(3,"\xd7"),wu()()),2&t){jS("title",dt().clearAllText)}}function Ale(t,e){if(1&t&&J1(0,"span",31),2&t){const a=dt().$implicit,u=dt(2);ki("ngItemLabel",a.label)("escape",u.escapeHTML)}}function wle(t,e){}function Ble(t,e){if(1&t){const a=Z1();eu(0,"div",30),Qu("click",function(){const i=nt(a).$implicit;return Xe(dt(2).toggleItem(i))})("mouseover",function(){const i=nt(a).$implicit;return Xe(dt(2).onItemHover(i))}),Ji(1,Ale,1,2,"ng-template",null,5,mc)(3,wle,0,0,"ng-template",12),wu()}if(2&t){const a=e.$implicit,u=w0(2),i=dt(2);cr("ng-option-disabled",a.disabled)("ng-option-selected",a.selected)("ng-optgroup",a.children)("ng-option",!a.children)("ng-option-child",!!a.parent)("ng-option-marked",a===i.itemsList.markedItem),dr("role",a.children?"group":"option")("aria-selected",a.selected)("id",null==a?null:a.htmlId),$a(3),ki("ngTemplateOutlet",a.children?i.optgroupTemplate||u:i.optionTemplate||u)("ngTemplateOutletContext",bR(17,mle,a.value,a,a.index,i.searchTerm))}}function Sle(t,e){if(1&t&&(eu(0,"span")(1,"span",33),B0(2),wu(),B0(3),wu()),2&t){const a=dt(3);$a(2),$1(a.addTagText),$a(),u_('"',a.searchTerm,'"')}}function zle(t,e){}function Mle(t,e){if(1&t){const a=Z1();eu(0,"div",32),Qu("mouseover",function(){nt(a);return Xe(dt(2).itemsList.unmarkItem())})("click",function(){nt(a);return Xe(dt(2).selectTag())}),Ji(1,Sle,4,2,"ng-template",null,6,mc)(3,zle,0,0,"ng-template",12),wu()}if(2&t){const a=w0(2),u=dt(2);cr("ng-option-marked",!u.itemsList.markedItem),$a(3),ki("ngTemplateOutlet",u.tagTemplate||a)("ngTemplateOutletContext",I4(4,t2,u.searchTerm))}}function Lle(t,e){if(1&t&&(eu(0,"div",34),B0(1),wu()),2&t){const a=dt(3);$a(),$1(a.notFoundText)}}function Tle(t,e){}function Ple(t,e){if(1&t&&Ji(0,Lle,2,1,"ng-template",null,7,mc)(2,Tle,0,0,"ng-template",12),2&t){const a=w0(1),u=dt(2);$a(2),ki("ngTemplateOutlet",u.notFoundTemplate||a)("ngTemplateOutletContext",I4(2,t2,u.searchTerm))}}function Nle(t,e){if(1&t&&(eu(0,"div",34),B0(1),wu()),2&t){const a=dt(3);$a(),$1(a.typeToSearchText)}}function Ile(t,e){}function Rle(t,e){if(1&t&&Ji(0,Nle,2,1,"ng-template",null,8,mc)(2,Ile,0,0,"ng-template",19),2&t){const a=w0(1),u=dt(2);$a(2),ki("ngTemplateOutlet",u.typeToSearchTemplate||a)}}function Hle(t,e){if(1&t&&(eu(0,"div",34),B0(1),wu()),2&t){const a=dt(3);$a(),$1(a.loadingText)}}function Vle(t,e){}function Ole(t,e){if(1&t&&Ji(0,Hle,2,1,"ng-template",null,9,mc)(2,Vle,0,0,"ng-template",12),2&t){const a=w0(1),u=dt(2);$a(2),ki("ngTemplateOutlet",u.loadingTextTemplate||a)("ngTemplateOutletContext",I4(2,t2,u.searchTerm))}}function jle(t,e){if(1&t){const a=Z1();eu(0,"ng-dropdown-panel",27),Qu("update",function(i){nt(a);return Xe(dt().viewPortItems=i)})("scroll",function(i){nt(a);return Xe(dt().scroll.emit(i))})("scrollToEnd",function(i){nt(a);return Xe(dt().scrollToEnd.emit(i))})("outsideClick",function(){nt(a);return Xe(dt().close())}),$y(1),NS(2,Ble,4,22,"div",28,LS().trackByOption,!0),Ji(4,Mle,4,6,"div",29),qy(),Ji(5,Ple,3,4)(6,Rle,3,1)(7,Ole,3,4),wu()}if(2&t){const a=dt();cr("ng-select-multiple",a.multiple),ki("virtualScroll",a.virtualScroll)("bufferAmount",a.bufferAmount)("appendTo",a.appendTo)("position",a.dropdownPosition)("headerTemplate",a.headerTemplate)("footerTemplate",a.footerTemplate)("filterValue",a.searchTerm)("items",a.itemsList.filteredItems)("markedItem",a.itemsList.markedItem)("ngClass",a.appendTo?a.ngClass?a.ngClass:a.classes:null)("id",a.dropdownId),$a(2),IS(a.viewPortItems),$a(2),Qo(a.showAddTag?4:-1),$a(),Qo(a.showNoItemsFound()?5:-1),$a(),Qo(a.showTypeToSearch()?6:-1),$a(),Qo(a.loading&&0===a.itemsList.filteredItems.length?7:-1)}}const fj=/[&<>"']/g,Gle=RegExp(fj.source),Kle={"&":"&","<":"<",">":">",'"':""","'":"'"};function ai(t){return null!=t}function u2(t){return"object"==typeof t&&ai(t)}function gF(t){return t instanceof Function}class i2{constructor(e){this.element=e,this.escape=!0}ngOnChanges(e){this.element.nativeElement.innerHTML=this.escape?function Wle(t){return t&&Gle.test(t)?t.replace(fj,e=>Kle[e]):t}(this.ngItemLabel):this.ngItemLabel}static#e=this.\u0275fac=function(a){return new(a||i2)(X(Rt))};static#a=this.\u0275dir=Me({type:i2,selectors:[["","ngItemLabel",""]],inputs:{ngItemLabel:"ngItemLabel",escape:"escape"},standalone:!0,features:[nn]})}class IE{constructor(e){this.template=e}static#e=this.\u0275fac=function(a){return new(a||IE)(X(st))};static#a=this.\u0275dir=Me({type:IE,selectors:[["","ng-option-tmp",""]],standalone:!0})}class RE{constructor(e){this.template=e}static#e=this.\u0275fac=function(a){return new(a||RE)(X(st))};static#a=this.\u0275dir=Me({type:RE,selectors:[["","ng-optgroup-tmp",""]],standalone:!0})}class HE{constructor(e){this.template=e}static#e=this.\u0275fac=function(a){return new(a||HE)(X(st))};static#a=this.\u0275dir=Me({type:HE,selectors:[["","ng-label-tmp",""]],standalone:!0})}class VE{constructor(e){this.template=e}static#e=this.\u0275fac=function(a){return new(a||VE)(X(st))};static#a=this.\u0275dir=Me({type:VE,selectors:[["","ng-multi-label-tmp",""]],standalone:!0})}class OE{constructor(e){this.template=e}static#e=this.\u0275fac=function(a){return new(a||OE)(X(st))};static#a=this.\u0275dir=Me({type:OE,selectors:[["","ng-header-tmp",""]],standalone:!0})}class jE{constructor(e){this.template=e}static#e=this.\u0275fac=function(a){return new(a||jE)(X(st))};static#a=this.\u0275dir=Me({type:jE,selectors:[["","ng-footer-tmp",""]],standalone:!0})}class GE{constructor(e){this.template=e}static#e=this.\u0275fac=function(a){return new(a||GE)(X(st))};static#a=this.\u0275dir=Me({type:GE,selectors:[["","ng-notfound-tmp",""]],standalone:!0})}class KE{constructor(e){this.template=e}static#e=this.\u0275fac=function(a){return new(a||KE)(X(st))};static#a=this.\u0275dir=Me({type:KE,selectors:[["","ng-placeholder-tmp",""]],standalone:!0})}class WE{constructor(e){this.template=e}static#e=this.\u0275fac=function(a){return new(a||WE)(X(st))};static#a=this.\u0275dir=Me({type:WE,selectors:[["","ng-typetosearch-tmp",""]],standalone:!0})}class UE{constructor(e){this.template=e}static#e=this.\u0275fac=function(a){return new(a||UE)(X(st))};static#a=this.\u0275dir=Me({type:UE,selectors:[["","ng-loadingtext-tmp",""]],standalone:!0})}class JE{constructor(e){this.template=e}static#e=this.\u0275fac=function(a){return new(a||JE)(X(st))};static#a=this.\u0275dir=Me({type:JE,selectors:[["","ng-tag-tmp",""]],standalone:!0})}class ZE{constructor(e){this.template=e}static#e=this.\u0275fac=function(a){return new(a||ZE)(X(st))};static#a=this.\u0275dir=Me({type:ZE,selectors:[["","ng-loadingspinner-tmp",""]],standalone:!0})}function Dj(){return"axxxxxxxxxxx".replace(/[x]/g,()=>(16*Math.random()|0).toString(16))}const Jle={"\u24b6":"A",\uff21:"A",\u00c0:"A",\u00c1:"A",\u00c2:"A",\u1ea6:"A",\u1ea4:"A",\u1eaa:"A",\u1ea8:"A",\u00c3:"A",\u0100:"A",\u0102:"A",\u1eb0:"A",\u1eae:"A",\u1eb4:"A",\u1eb2:"A",\u0226:"A",\u01e0:"A",\u00c4:"A",\u01de:"A",\u1ea2:"A",\u00c5:"A",\u01fa:"A",\u01cd:"A",\u0200:"A",\u0202:"A",\u1ea0:"A",\u1eac:"A",\u1eb6:"A",\u1e00:"A",\u0104:"A",\u023a:"A",\u2c6f:"A",\ua732:"AA",\u00c6:"AE",\u01fc:"AE",\u01e2:"AE",\ua734:"AO",\ua736:"AU",\ua738:"AV",\ua73a:"AV",\ua73c:"AY","\u24b7":"B",\uff22:"B",\u1e02:"B",\u1e04:"B",\u1e06:"B",\u0243:"B",\u0182:"B",\u0181:"B","\u24b8":"C",\uff23:"C",\u0106:"C",\u0108:"C",\u010a:"C",\u010c:"C",\u00c7:"C",\u1e08:"C",\u0187:"C",\u023b:"C",\ua73e:"C","\u24b9":"D",\uff24:"D",\u1e0a:"D",\u010e:"D",\u1e0c:"D",\u1e10:"D",\u1e12:"D",\u1e0e:"D",\u0110:"D",\u018b:"D",\u018a:"D",\u0189:"D",\ua779:"D",\u01f1:"DZ",\u01c4:"DZ",\u01f2:"Dz",\u01c5:"Dz","\u24ba":"E",\uff25:"E",\u00c8:"E",\u00c9:"E",\u00ca:"E",\u1ec0:"E",\u1ebe:"E",\u1ec4:"E",\u1ec2:"E",\u1ebc:"E",\u0112:"E",\u1e14:"E",\u1e16:"E",\u0114:"E",\u0116:"E",\u00cb:"E",\u1eba:"E",\u011a:"E",\u0204:"E",\u0206:"E",\u1eb8:"E",\u1ec6:"E",\u0228:"E",\u1e1c:"E",\u0118:"E",\u1e18:"E",\u1e1a:"E",\u0190:"E",\u018e:"E","\u24bb":"F",\uff26:"F",\u1e1e:"F",\u0191:"F",\ua77b:"F","\u24bc":"G",\uff27:"G",\u01f4:"G",\u011c:"G",\u1e20:"G",\u011e:"G",\u0120:"G",\u01e6:"G",\u0122:"G",\u01e4:"G",\u0193:"G",\ua7a0:"G",\ua77d:"G",\ua77e:"G","\u24bd":"H",\uff28:"H",\u0124:"H",\u1e22:"H",\u1e26:"H",\u021e:"H",\u1e24:"H",\u1e28:"H",\u1e2a:"H",\u0126:"H",\u2c67:"H",\u2c75:"H",\ua78d:"H","\u24be":"I",\uff29:"I",\u00cc:"I",\u00cd:"I",\u00ce:"I",\u0128:"I",\u012a:"I",\u012c:"I",\u0130:"I",\u00cf:"I",\u1e2e:"I",\u1ec8:"I",\u01cf:"I",\u0208:"I",\u020a:"I",\u1eca:"I",\u012e:"I",\u1e2c:"I",\u0197:"I","\u24bf":"J",\uff2a:"J",\u0134:"J",\u0248:"J","\u24c0":"K",\uff2b:"K",\u1e30:"K",\u01e8:"K",\u1e32:"K",\u0136:"K",\u1e34:"K",\u0198:"K",\u2c69:"K",\ua740:"K",\ua742:"K",\ua744:"K",\ua7a2:"K","\u24c1":"L",\uff2c:"L",\u013f:"L",\u0139:"L",\u013d:"L",\u1e36:"L",\u1e38:"L",\u013b:"L",\u1e3c:"L",\u1e3a:"L",\u0141:"L",\u023d:"L",\u2c62:"L",\u2c60:"L",\ua748:"L",\ua746:"L",\ua780:"L",\u01c7:"LJ",\u01c8:"Lj","\u24c2":"M",\uff2d:"M",\u1e3e:"M",\u1e40:"M",\u1e42:"M",\u2c6e:"M",\u019c:"M","\u24c3":"N",\uff2e:"N",\u01f8:"N",\u0143:"N",\u00d1:"N",\u1e44:"N",\u0147:"N",\u1e46:"N",\u0145:"N",\u1e4a:"N",\u1e48:"N",\u0220:"N",\u019d:"N",\ua790:"N",\ua7a4:"N",\u01ca:"NJ",\u01cb:"Nj","\u24c4":"O",\uff2f:"O",\u00d2:"O",\u00d3:"O",\u00d4:"O",\u1ed2:"O",\u1ed0:"O",\u1ed6:"O",\u1ed4:"O",\u00d5:"O",\u1e4c:"O",\u022c:"O",\u1e4e:"O",\u014c:"O",\u1e50:"O",\u1e52:"O",\u014e:"O",\u022e:"O",\u0230:"O",\u00d6:"O",\u022a:"O",\u1ece:"O",\u0150:"O",\u01d1:"O",\u020c:"O",\u020e:"O",\u01a0:"O",\u1edc:"O",\u1eda:"O",\u1ee0:"O",\u1ede:"O",\u1ee2:"O",\u1ecc:"O",\u1ed8:"O",\u01ea:"O",\u01ec:"O",\u00d8:"O",\u01fe:"O",\u0186:"O",\u019f:"O",\ua74a:"O",\ua74c:"O",\u01a2:"OI",\ua74e:"OO",\u0222:"OU","\u24c5":"P",\uff30:"P",\u1e54:"P",\u1e56:"P",\u01a4:"P",\u2c63:"P",\ua750:"P",\ua752:"P",\ua754:"P","\u24c6":"Q",\uff31:"Q",\ua756:"Q",\ua758:"Q",\u024a:"Q","\u24c7":"R",\uff32:"R",\u0154:"R",\u1e58:"R",\u0158:"R",\u0210:"R",\u0212:"R",\u1e5a:"R",\u1e5c:"R",\u0156:"R",\u1e5e:"R",\u024c:"R",\u2c64:"R",\ua75a:"R",\ua7a6:"R",\ua782:"R","\u24c8":"S",\uff33:"S",\u1e9e:"S",\u015a:"S",\u1e64:"S",\u015c:"S",\u1e60:"S",\u0160:"S",\u1e66:"S",\u1e62:"S",\u1e68:"S",\u0218:"S",\u015e:"S",\u2c7e:"S",\ua7a8:"S",\ua784:"S","\u24c9":"T",\uff34:"T",\u1e6a:"T",\u0164:"T",\u1e6c:"T",\u021a:"T",\u0162:"T",\u1e70:"T",\u1e6e:"T",\u0166:"T",\u01ac:"T",\u01ae:"T",\u023e:"T",\ua786:"T",\ua728:"TZ","\u24ca":"U",\uff35:"U",\u00d9:"U",\u00da:"U",\u00db:"U",\u0168:"U",\u1e78:"U",\u016a:"U",\u1e7a:"U",\u016c:"U",\u00dc:"U",\u01db:"U",\u01d7:"U",\u01d5:"U",\u01d9:"U",\u1ee6:"U",\u016e:"U",\u0170:"U",\u01d3:"U",\u0214:"U",\u0216:"U",\u01af:"U",\u1eea:"U",\u1ee8:"U",\u1eee:"U",\u1eec:"U",\u1ef0:"U",\u1ee4:"U",\u1e72:"U",\u0172:"U",\u1e76:"U",\u1e74:"U",\u0244:"U","\u24cb":"V",\uff36:"V",\u1e7c:"V",\u1e7e:"V",\u01b2:"V",\ua75e:"V",\u0245:"V",\ua760:"VY","\u24cc":"W",\uff37:"W",\u1e80:"W",\u1e82:"W",\u0174:"W",\u1e86:"W",\u1e84:"W",\u1e88:"W",\u2c72:"W","\u24cd":"X",\uff38:"X",\u1e8a:"X",\u1e8c:"X","\u24ce":"Y",\uff39:"Y",\u1ef2:"Y",\u00dd:"Y",\u0176:"Y",\u1ef8:"Y",\u0232:"Y",\u1e8e:"Y",\u0178:"Y",\u1ef6:"Y",\u1ef4:"Y",\u01b3:"Y",\u024e:"Y",\u1efe:"Y","\u24cf":"Z",\uff3a:"Z",\u0179:"Z",\u1e90:"Z",\u017b:"Z",\u017d:"Z",\u1e92:"Z",\u1e94:"Z",\u01b5:"Z",\u0224:"Z",\u2c7f:"Z",\u2c6b:"Z",\ua762:"Z","\u24d0":"a",\uff41:"a",\u1e9a:"a",\u00e0:"a",\u00e1:"a",\u00e2:"a",\u1ea7:"a",\u1ea5:"a",\u1eab:"a",\u1ea9:"a",\u00e3:"a",\u0101:"a",\u0103:"a",\u1eb1:"a",\u1eaf:"a",\u1eb5:"a",\u1eb3:"a",\u0227:"a",\u01e1:"a",\u00e4:"a",\u01df:"a",\u1ea3:"a",\u00e5:"a",\u01fb:"a",\u01ce:"a",\u0201:"a",\u0203:"a",\u1ea1:"a",\u1ead:"a",\u1eb7:"a",\u1e01:"a",\u0105:"a",\u2c65:"a",\u0250:"a",\ua733:"aa",\u00e6:"ae",\u01fd:"ae",\u01e3:"ae",\ua735:"ao",\ua737:"au",\ua739:"av",\ua73b:"av",\ua73d:"ay","\u24d1":"b",\uff42:"b",\u1e03:"b",\u1e05:"b",\u1e07:"b",\u0180:"b",\u0183:"b",\u0253:"b","\u24d2":"c",\uff43:"c",\u0107:"c",\u0109:"c",\u010b:"c",\u010d:"c",\u00e7:"c",\u1e09:"c",\u0188:"c",\u023c:"c",\ua73f:"c",\u2184:"c","\u24d3":"d",\uff44:"d",\u1e0b:"d",\u010f:"d",\u1e0d:"d",\u1e11:"d",\u1e13:"d",\u1e0f:"d",\u0111:"d",\u018c:"d",\u0256:"d",\u0257:"d",\ua77a:"d",\u01f3:"dz",\u01c6:"dz","\u24d4":"e",\uff45:"e",\u00e8:"e",\u00e9:"e",\u00ea:"e",\u1ec1:"e",\u1ebf:"e",\u1ec5:"e",\u1ec3:"e",\u1ebd:"e",\u0113:"e",\u1e15:"e",\u1e17:"e",\u0115:"e",\u0117:"e",\u00eb:"e",\u1ebb:"e",\u011b:"e",\u0205:"e",\u0207:"e",\u1eb9:"e",\u1ec7:"e",\u0229:"e",\u1e1d:"e",\u0119:"e",\u1e19:"e",\u1e1b:"e",\u0247:"e",\u025b:"e",\u01dd:"e","\u24d5":"f",\uff46:"f",\u1e1f:"f",\u0192:"f",\ua77c:"f","\u24d6":"g",\uff47:"g",\u01f5:"g",\u011d:"g",\u1e21:"g",\u011f:"g",\u0121:"g",\u01e7:"g",\u0123:"g",\u01e5:"g",\u0260:"g",\ua7a1:"g",\u1d79:"g",\ua77f:"g","\u24d7":"h",\uff48:"h",\u0125:"h",\u1e23:"h",\u1e27:"h",\u021f:"h",\u1e25:"h",\u1e29:"h",\u1e2b:"h",\u1e96:"h",\u0127:"h",\u2c68:"h",\u2c76:"h",\u0265:"h",\u0195:"hv","\u24d8":"i",\uff49:"i",\u00ec:"i",\u00ed:"i",\u00ee:"i",\u0129:"i",\u012b:"i",\u012d:"i",\u00ef:"i",\u1e2f:"i",\u1ec9:"i",\u01d0:"i",\u0209:"i",\u020b:"i",\u1ecb:"i",\u012f:"i",\u1e2d:"i",\u0268:"i",\u0131:"i","\u24d9":"j",\uff4a:"j",\u0135:"j",\u01f0:"j",\u0249:"j","\u24da":"k",\uff4b:"k",\u1e31:"k",\u01e9:"k",\u1e33:"k",\u0137:"k",\u1e35:"k",\u0199:"k",\u2c6a:"k",\ua741:"k",\ua743:"k",\ua745:"k",\ua7a3:"k","\u24db":"l",\uff4c:"l",\u0140:"l",\u013a:"l",\u013e:"l",\u1e37:"l",\u1e39:"l",\u013c:"l",\u1e3d:"l",\u1e3b:"l",\u017f:"l",\u0142:"l",\u019a:"l",\u026b:"l",\u2c61:"l",\ua749:"l",\ua781:"l",\ua747:"l",\u01c9:"lj","\u24dc":"m",\uff4d:"m",\u1e3f:"m",\u1e41:"m",\u1e43:"m",\u0271:"m",\u026f:"m","\u24dd":"n",\uff4e:"n",\u01f9:"n",\u0144:"n",\u00f1:"n",\u1e45:"n",\u0148:"n",\u1e47:"n",\u0146:"n",\u1e4b:"n",\u1e49:"n",\u019e:"n",\u0272:"n",\u0149:"n",\ua791:"n",\ua7a5:"n",\u01cc:"nj","\u24de":"o",\uff4f:"o",\u00f2:"o",\u00f3:"o",\u00f4:"o",\u1ed3:"o",\u1ed1:"o",\u1ed7:"o",\u1ed5:"o",\u00f5:"o",\u1e4d:"o",\u022d:"o",\u1e4f:"o",\u014d:"o",\u1e51:"o",\u1e53:"o",\u014f:"o",\u022f:"o",\u0231:"o",\u00f6:"o",\u022b:"o",\u1ecf:"o",\u0151:"o",\u01d2:"o",\u020d:"o",\u020f:"o",\u01a1:"o",\u1edd:"o",\u1edb:"o",\u1ee1:"o",\u1edf:"o",\u1ee3:"o",\u1ecd:"o",\u1ed9:"o",\u01eb:"o",\u01ed:"o",\u00f8:"o",\u01ff:"o",\u0254:"o",\ua74b:"o",\ua74d:"o",\u0275:"o",\u01a3:"oi",\u0223:"ou",\ua74f:"oo","\u24df":"p",\uff50:"p",\u1e55:"p",\u1e57:"p",\u01a5:"p",\u1d7d:"p",\ua751:"p",\ua753:"p",\ua755:"p","\u24e0":"q",\uff51:"q",\u024b:"q",\ua757:"q",\ua759:"q","\u24e1":"r",\uff52:"r",\u0155:"r",\u1e59:"r",\u0159:"r",\u0211:"r",\u0213:"r",\u1e5b:"r",\u1e5d:"r",\u0157:"r",\u1e5f:"r",\u024d:"r",\u027d:"r",\ua75b:"r",\ua7a7:"r",\ua783:"r","\u24e2":"s",\uff53:"s",\u00df:"s",\u015b:"s",\u1e65:"s",\u015d:"s",\u1e61:"s",\u0161:"s",\u1e67:"s",\u1e63:"s",\u1e69:"s",\u0219:"s",\u015f:"s",\u023f:"s",\ua7a9:"s",\ua785:"s",\u1e9b:"s","\u24e3":"t",\uff54:"t",\u1e6b:"t",\u1e97:"t",\u0165:"t",\u1e6d:"t",\u021b:"t",\u0163:"t",\u1e71:"t",\u1e6f:"t",\u0167:"t",\u01ad:"t",\u0288:"t",\u2c66:"t",\ua787:"t",\ua729:"tz","\u24e4":"u",\uff55:"u",\u00f9:"u",\u00fa:"u",\u00fb:"u",\u0169:"u",\u1e79:"u",\u016b:"u",\u1e7b:"u",\u016d:"u",\u00fc:"u",\u01dc:"u",\u01d8:"u",\u01d6:"u",\u01da:"u",\u1ee7:"u",\u016f:"u",\u0171:"u",\u01d4:"u",\u0215:"u",\u0217:"u",\u01b0:"u",\u1eeb:"u",\u1ee9:"u",\u1eef:"u",\u1eed:"u",\u1ef1:"u",\u1ee5:"u",\u1e73:"u",\u0173:"u",\u1e77:"u",\u1e75:"u",\u0289:"u","\u24e5":"v",\uff56:"v",\u1e7d:"v",\u1e7f:"v",\u028b:"v",\ua75f:"v",\u028c:"v",\ua761:"vy","\u24e6":"w",\uff57:"w",\u1e81:"w",\u1e83:"w",\u0175:"w",\u1e87:"w",\u1e85:"w",\u1e98:"w",\u1e89:"w",\u2c73:"w","\u24e7":"x",\uff58:"x",\u1e8b:"x",\u1e8d:"x","\u24e8":"y",\uff59:"y",\u1ef3:"y",\u00fd:"y",\u0177:"y",\u1ef9:"y",\u0233:"y",\u1e8f:"y",\u00ff:"y",\u1ef7:"y",\u1e99:"y",\u1ef5:"y",\u01b4:"y",\u024f:"y",\u1eff:"y","\u24e9":"z",\uff5a:"z",\u017a:"z",\u1e91:"z",\u017c:"z",\u017e:"z",\u1e93:"z",\u1e95:"z",\u01b6:"z",\u0225:"z",\u0240:"z",\u2c6c:"z",\ua763:"z",\u0386:"\u0391",\u0388:"\u0395",\u0389:"\u0397",\u038a:"\u0399",\u03aa:"\u0399",\u038c:"\u039f",\u038e:"\u03a5",\u03ab:"\u03a5",\u038f:"\u03a9",\u03ac:"\u03b1",\u03ad:"\u03b5",\u03ae:"\u03b7",\u03af:"\u03b9",\u03ca:"\u03b9",\u0390:"\u03b9",\u03cc:"\u03bf",\u03cd:"\u03c5",\u03cb:"\u03c5",\u03b0:"\u03c5",\u03c9:"\u03c9",\u03c2:"\u03c3"};function EF(t){return t.replace(/[^\u0000-\u007E]/g,a=>Jle[a]||a)}class Zle{constructor(e,a){this._ngSelect=e,this._selectionModel=a,this._items=[],this._filteredItems=[],this._markedIndex=-1}get items(){return this._items}get filteredItems(){return this._filteredItems}get markedIndex(){return this._markedIndex}get selectedItems(){return this._selectionModel.value}get markedItem(){return this._filteredItems[this._markedIndex]}get noItemsToSelect(){return this._ngSelect.hideSelected&&this._items.length===this.selectedItems.length}get maxItemsSelected(){return this._ngSelect.multiple&&this._ngSelect.maxSelectedItems<=this.selectedItems.length}get lastSelectedItem(){let e=this.selectedItems.length-1;for(;e>=0;e--){const a=this.selectedItems[e];if(!a.disabled)return a}return null}setItems(e){this._items=e.map((a,u)=>this.mapItem(a,u)),this._ngSelect.groupBy?(this._groups=this._groupBy(this._items,this._ngSelect.groupBy),this._items=this._flatten(this._groups)):(this._groups=new Map,this._groups.set(void 0,this._items)),this._filteredItems=[...this._items]}select(e){if(e.selected||this.maxItemsSelected)return;const a=this._ngSelect.multiple;a||this.clearSelected(),this._selectionModel.select(e,a,this._ngSelect.selectableGroupAsModel),this._ngSelect.hideSelected&&this._hideSelected(e)}unselect(e){e.selected&&(this._selectionModel.unselect(e,this._ngSelect.multiple),this._ngSelect.hideSelected&&ai(e.index)&&this._ngSelect.multiple&&this._showSelected(e))}findItem(e){let a;return a=this._ngSelect.compareWith?u=>this._ngSelect.compareWith(u.value,e):this._ngSelect.bindValue?u=>!u.children&&this.resolveNested(u.value,this._ngSelect.bindValue)===e:u=>u.value===e||!u.children&&u.label&&u.label===this.resolveNested(e,this._ngSelect.bindLabel),this._items.find(u=>a(u))}addItem(e){const a=this.mapItem(e,this._items.length);return this._items.push(a),this._filteredItems.push(a),a}clearSelected(e=!1){this._selectionModel.clear(e),this._items.forEach(a=>{a.selected=e&&a.selected&&a.disabled,a.marked=!1}),this._ngSelect.hideSelected&&this.resetFilteredItems()}findByLabel(e){return e=EF(e).toLocaleLowerCase(),this.filteredItems.find(a=>EF(a.label).toLocaleLowerCase().substr(0,e.length)===e)}filter(e){if(!e)return void this.resetFilteredItems();this._filteredItems=[],e=this._ngSelect.searchFn?e:EF(e).toLocaleLowerCase();const a=this._ngSelect.searchFn||this._defaultSearchFn,u=this._ngSelect.hideSelected;for(const i of Array.from(this._groups.keys())){const r=[];for(const o of this._groups.get(i)){if(u&&(o.parent&&o.parent.selected||o.selected))continue;a(e,this._ngSelect.searchFn?o.value:o)&&r.push(o)}if(r.length>0){const[o]=r.slice(-1);if(o.parent){const d=this._items.find(h=>h===o.parent);this._filteredItems.push(d)}this._filteredItems.push(...r)}}}resetFilteredItems(){this._filteredItems.length!==this._items.length&&(this._ngSelect.hideSelected&&this.selectedItems.length>0?this._filteredItems=this._items.filter(e=>!e.selected):this._filteredItems=this._items)}unmarkItem(){this._markedIndex=-1}markNextItem(){this._stepToItem(1)}markPreviousItem(){this._stepToItem(-1)}markItem(e){this._markedIndex=this._filteredItems.indexOf(e)}markSelectedOrDefault(e){if(0===this._filteredItems.length)return;const a=this._getLastMarkedIndex();this._markedIndex=a>-1?a:e?this.filteredItems.findIndex(u=>!u.disabled):-1}resolveNested(e,a){if(!u2(e))return e;if(-1===a.indexOf("."))return e[a];{const u=a.split(".");let i=e;for(let r=0,o=u.length;r-1===this.selectedItems.indexOf(a)))}_showSelected(e){if(this._filteredItems.push(e),e.parent){const a=e.parent;this._filteredItems.find(i=>i===a)||this._filteredItems.push(a)}else if(e.children)for(const a of e.children)a.selected=!1,this._filteredItems.push(a);this._filteredItems=[...this._filteredItems.sort((a,u)=>a.index-u.index)]}_hideSelected(e){this._filteredItems=this._filteredItems.filter(a=>a!==e),e.parent?e.parent.children.every(u=>u.selected)&&(this._filteredItems=this._filteredItems.filter(u=>u!==e.parent)):e.children&&(this._filteredItems=this.filteredItems.filter(a=>a.parent!==e))}_defaultSearchFn(e,a){return EF(a.label).toLocaleLowerCase().indexOf(e)>-1}_getNextItemIndex(e){return e>0?this._markedIndex>=this._filteredItems.length-1?0:this._markedIndex+1:this._markedIndex<=0?this._filteredItems.length-1:this._markedIndex-1}_stepToItem(e){0===this._filteredItems.length||this._filteredItems.every(a=>a.disabled)||(this._markedIndex=this._getNextItemIndex(e),this.markedItem.disabled&&this._stepToItem(e))}_getLastMarkedIndex(){if(this._ngSelect.hideSelected||this._markedIndex>-1&&void 0===this.markedItem)return-1;const e=this._filteredItems.indexOf(this.lastSelectedItem);return this.lastSelectedItem&&e<0?-1:Math.max(this.markedIndex,e)}_groupBy(e,a){const u=new Map;if(0===e.length)return u;if(Array.isArray(e[0].value[a])){for(const o of e){const d=(o.value[a]||[]).map((h,m)=>this.mapItem(h,m));u.set(o,d)}return u}const i=gF(this._ngSelect.groupBy),r=o=>{const d=i?a(o.value):o.value[a];return ai(d)?d:void 0};for(const o of e){const d=r(o),h=u.get(d);h?h.push(o):u.set(d,[o])}return u}_flatten(e){const a=gF(this._ngSelect.groupBy),u=[];for(const i of Array.from(e.keys())){let r=u.length;if(void 0===i){const v=e.get(void 0)||[];u.push(...v.map(k=>(k.index=r++,k)));continue}const o=u2(i),d={label:o?"":String(i),children:void 0,parent:null,index:r++,disabled:!this._ngSelect.selectableGroup,htmlId:Dj()},h=a?this._ngSelect.bindLabel:this._ngSelect.groupBy,m=this._ngSelect.groupValue||(()=>o?i.value:{[h]:i}),g=e.get(i).map(v=>(v.parent=d,v.children=void 0,v.index=r++,v));d.children=g,d.value=m(i,g.map(v=>v.value)),u.push(d),u.push(...g)}return u}}var T0;!function(t){t[t.Tab=9]="Tab",t[t.Enter=13]="Enter",t[t.Esc=27]="Esc",t[t.Space=32]="Space",t[t.ArrowUp=38]="ArrowUp",t[t.ArrowDown=40]="ArrowDown",t[t.Backspace=8]="Backspace"}(T0||(T0={}));class $E{constructor(){this._dimensions={itemHeight:0,panelHeight:0,itemsPerViewport:0}}get dimensions(){return this._dimensions}calculateItems(e,a,u){const i=this._dimensions,r=i.itemHeight*a,d=Math.max(0,e)/r*a;let h=Math.min(a,Math.ceil(d)+(i.itemsPerViewport+1));const g=Math.max(0,h-i.itemsPerViewport);let v=Math.min(g,Math.floor(d)),k=i.itemHeight*Math.ceil(v)-i.itemHeight*Math.min(v,u);return k=isNaN(k)?0:k,v=isNaN(v)?-1:v,h=isNaN(h)?-1:h,v-=u,v=Math.max(0,v),h+=u,h=Math.min(a,h),{topPadding:k,scrollHeight:r,start:v,end:h}}setDimensions(e,a){const u=Math.max(1,Math.floor(a/e));this._dimensions={itemHeight:e,panelHeight:a,itemsPerViewport:u}}getScrollTo(e,a,u){const{panelHeight:i}=this.dimensions,r=e+a,d=u+i;return i>=r&&u===e?null:r>d?u+r-d:e<=u?e:null}static#e=this.\u0275fac=function(a){return new(a||$E)};static#a=this.\u0275prov=oe({token:$E,factory:$E.\u0275fac})}const Cj=["top","right","bottom","left"],$le=typeof requestAnimationFrame<"u"?Koe:Yoe;class qE{constructor(e,a,u,i,r){this._renderer=e,this._zone=a,this._panelService=u,this._document=r,this.items=[],this.position="auto",this.virtualScroll=!1,this.filterValue=null,this.update=new Ue,this.scroll=new Ue,this.scrollToEnd=new Ue,this.outsideClick=new Ue,this._destroy$=new sa,this._scrollToEndFired=!1,this._updateScrollHeight=!1,this._lastScrollPosition=0,this._dropdown=i.nativeElement}get currentPosition(){return this._currentPosition}get itemsLength(){return this._itemsLength}set itemsLength(e){e!==this._itemsLength&&(this._itemsLength=e,this._onItemsLengthChanged())}get _startOffset(){if(this.markedItem){const{itemHeight:e,panelHeight:a}=this._panelService.dimensions,u=this.markedItem.index*e;return a>u?0:u}return 0}ngOnInit(){this._select=this._dropdown.parentElement,this._virtualPadding=this.paddingElementRef.nativeElement,this._scrollablePanel=this.scrollElementRef.nativeElement,this._contentPanel=this.contentElementRef.nativeElement,this._handleScroll(),this._handleOutsideClick(),this._appendDropdown(),this._setupMousedownListener()}ngOnChanges(e){if(e.items){const a=e.items;this._onItemsChange(a.currentValue,a.firstChange)}}ngOnDestroy(){this._destroy$.next(),this._destroy$.complete(),this._destroy$.unsubscribe(),this.appendTo&&this._renderer.removeChild(this._dropdown.parentNode,this._dropdown)}scrollTo(e,a=!1){if(!e)return;const u=this.items.indexOf(e);if(u<0||u>=this.itemsLength)return;let i;if(this.virtualScroll){const r=this._panelService.dimensions.itemHeight;i=this._panelService.getScrollTo(u*r,r,this._lastScrollPosition)}else{const r=this._dropdown.querySelector(`#${e.htmlId}`),o=a?r.offsetTop:this._lastScrollPosition;i=this._panelService.getScrollTo(r.offsetTop,r.clientHeight,o)}ai(i)&&(this._scrollablePanel.scrollTop=i)}scrollToTag(){const e=this._scrollablePanel;e.scrollTop=e.scrollHeight-e.clientHeight}adjustPosition(){this._updateYPosition()}_handleDropdownPosition(){this._currentPosition=this._calculateCurrentPosition(this._dropdown),Cj.includes(this._currentPosition)?this._updateDropdownClass(this._currentPosition):this._updateDropdownClass("bottom"),this.appendTo&&this._updateYPosition(),this._dropdown.style.opacity="1"}_updateDropdownClass(e){Cj.forEach(u=>{const i=`ng-select-${u}`;this._renderer.removeClass(this._dropdown,i),this._renderer.removeClass(this._select,i)});const a=`ng-select-${e}`;this._renderer.addClass(this._dropdown,a),this._renderer.addClass(this._select,a)}_handleScroll(){this._zone.runOutsideAngular(()=>{NE(this.scrollElementRef.nativeElement,"scroll").pipe(Fh(this._destroy$),Voe(0,$le)).subscribe(e=>{const a=e.path||e.composedPath&&e.composedPath();if(!a||0===a.length&&!e.target)return;const u=a&&0!==a.length?a[0].scrollTop:e.target.scrollTop;this._onContentScrolled(u)})})}_handleOutsideClick(){this._document&&this._zone.runOutsideAngular(()=>{SM(NE(this._document,"touchstart",{capture:!0}),NE(this._document,"click",{capture:!0})).pipe(Fh(this._destroy$)).subscribe(e=>this._checkToClose(e))})}_checkToClose(e){if(this._select.contains(e.target)||this._dropdown.contains(e.target))return;const a=e.path||e.composedPath&&e.composedPath();e.target&&e.target.shadowRoot&&a&&a[0]&&this._select.contains(a[0])||this._zone.run(()=>this.outsideClick.emit())}_onItemsChange(e,a){this.items=e||[],this._scrollToEndFired=!1,this.itemsLength=e.length,this.virtualScroll?this._updateItemsRange(a):(this._setVirtualHeight(),this._updateItems(a))}_updateItems(e){this.update.emit(this.items),!1!==e&&this._zone.runOutsideAngular(()=>{Promise.resolve().then(()=>{const a=this._scrollablePanel.clientHeight;this._panelService.setDimensions(0,a),this._handleDropdownPosition(),this.scrollTo(this.markedItem,e)})})}_updateItemsRange(e){this._zone.runOutsideAngular(()=>{this._measureDimensions().then(()=>{e?(this._renderItemsRange(this._startOffset),this._handleDropdownPosition()):this._renderItemsRange()})})}_onContentScrolled(e){this.virtualScroll&&this._renderItemsRange(e),this._lastScrollPosition=e,this._fireScrollToEnd(e)}_updateVirtualHeight(e){this._updateScrollHeight&&(this._virtualPadding.style.height=`${e}px`,this._updateScrollHeight=!1)}_setVirtualHeight(){this._virtualPadding&&(this._virtualPadding.style.height="0px")}_onItemsLengthChanged(){this._updateScrollHeight=!0}_renderItemsRange(e=null){if(e&&this._lastScrollPosition===e)return;e=e||this._scrollablePanel.scrollTop;const a=this._panelService.calculateItems(e,this.itemsLength,this.bufferAmount);this._updateVirtualHeight(a.scrollHeight),this._contentPanel.style.transform=`translateY(${a.topPadding}px)`,this._zone.run(()=>{this.update.emit(this.items.slice(a.start,a.end)),this.scroll.emit({start:a.start,end:a.end})}),ai(e)&&0===this._lastScrollPosition&&(this._scrollablePanel.scrollTop=e,this._lastScrollPosition=e)}_measureDimensions(){if(this._panelService.dimensions.itemHeight>0||0===this.itemsLength)return Promise.resolve(this._panelService.dimensions);const[e]=this.items;return this.update.emit([e]),Promise.resolve().then(()=>{const u=this._dropdown.querySelector(`#${e.htmlId}`).clientHeight;this._virtualPadding.style.height=u*this.itemsLength+"px";const i=this._scrollablePanel.clientHeight;return this._panelService.setDimensions(u,i),this._panelService.dimensions})}_fireScrollToEnd(e){if(this._scrollToEndFired||0===e)return;const a=this.virtualScroll?this._virtualPadding:this._contentPanel;e+this._dropdown.clientHeight>=a.clientHeight-1&&(this._zone.run(()=>this.scrollToEnd.emit()),this._scrollToEndFired=!0)}_calculateCurrentPosition(e){if("auto"!==this.position)return this.position;const a=this._select.getBoundingClientRect(),u=document.documentElement.scrollTop||document.body.scrollTop;return a.top+window.pageYOffset+a.height+e.getBoundingClientRect().height>u+document.documentElement.clientHeight?"top":"bottom"}_appendDropdown(){if(this.appendTo){if(this._parent=document.querySelector(this.appendTo),!this._parent)throw new Error(`appendTo selector ${this.appendTo} did not found any parent element`);this._updateXPosition(),this._parent.appendChild(this._dropdown)}}_updateXPosition(){const e=this._select.getBoundingClientRect(),a=this._parent.getBoundingClientRect(),u=e.left-a.left;this._dropdown.style.left=u+"px",this._dropdown.style.width=e.width+"px",this._dropdown.style.minWidth=e.width+"px"}_updateYPosition(){const e=this._select.getBoundingClientRect(),a=this._parent.getBoundingClientRect(),u=e.height;if("top"===this._currentPosition){const i=a.bottom-e.bottom;this._dropdown.style.bottom=i+u+"px",this._dropdown.style.top="auto"}else if("bottom"===this._currentPosition){const i=e.top-a.top;this._dropdown.style.top=i+u+"px",this._dropdown.style.bottom="auto"}}_setupMousedownListener(){this._zone.runOutsideAngular(()=>{NE(this._dropdown,"mousedown").pipe(Fh(this._destroy$)).subscribe(e=>{"INPUT"!==e.target.tagName&&e.preventDefault()})})}static#e=this.\u0275fac=function(a){return new(a||qE)(X(Vn),X(rt),X($E),X(Rt),X(ei,8))};static#a=this.\u0275cmp=Md({type:qE,selectors:[["ng-dropdown-panel"]],viewQuery:function(a,u){if(1&a&&(N4(ile,7,Rt),N4(nle,7,Rt),N4(rle,7,Rt)),2&a){let i;Li(i=Ti())&&(u.contentElementRef=i.first),Li(i=Ti())&&(u.scrollElementRef=i.first),Li(i=Ti())&&(u.paddingElementRef=i.first)}},inputs:{items:"items",markedItem:"markedItem",position:"position",appendTo:"appendTo",bufferAmount:"bufferAmount",virtualScroll:[2,"virtualScroll","virtualScroll",au],headerTemplate:"headerTemplate",footerTemplate:"footerTemplate",filterValue:"filterValue"},outputs:{update:"update",scroll:"scroll",scrollToEnd:"scrollToEnd",outsideClick:"outsideClick"},standalone:!0,features:[s,nn,ix],ngContentSelectors:xj,decls:9,vars:6,consts:[["scroll",""],["padding",""],["content",""],[1,"ng-dropdown-header"],["role","listbox",1,"ng-dropdown-panel-items","scroll-host"],[1,"ng-dropdown-footer"],[3,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(a,u){1&a&&(a_(),Ji(0,ole,2,4,"div",3),eu(1,"div",4,0),J1(3,"div",null,1),eu(5,"div",null,2),t_(7),wu()(),Ji(8,lle,2,4,"div",5)),2&a&&(Qo(u.headerTemplate?0:-1),$a(3),cr("total-padding",u.virtualScroll),$a(2),cr("scrollable-content",u.virtualScroll&&u.items.length),$a(3),Qo(u.footerTemplate?8:-1))},dependencies:[eh],encapsulation:2,changeDetection:0})}class YE{constructor(e){this.elementRef=e,this.disabled=!1,this.stateChange$=new sa}get label(){return(this.elementRef.nativeElement.textContent||"").trim()}ngOnChanges(e){e.disabled&&this.stateChange$.next({value:this.value,disabled:this.disabled})}ngAfterViewChecked(){this.label!==this._previousLabel&&(this._previousLabel=this.label,this.stateChange$.next({value:this.value,disabled:this.disabled,label:this.elementRef.nativeElement.innerHTML}))}ngOnDestroy(){this.stateChange$.complete()}static#e=this.\u0275fac=function(a){return new(a||YE)(X(Rt))};static#a=this.\u0275cmp=Md({type:YE,selectors:[["ng-option"]],inputs:{value:"value",disabled:[2,"disabled","disabled",au]},standalone:!0,features:[s,nn,ix],ngContentSelectors:xj,decls:1,vars:0,template:function(a,u){1&a&&(a_(),t_(0))},encapsulation:2,changeDetection:0})}function yj(){return new qle}class qle{constructor(){this._selected=[]}get value(){return this._selected}select(e,a,u){if(e.selected=!0,(!e.children||!a&&u)&&this._selected.push(e),a)if(e.parent){const i=e.parent.children.length,r=e.parent.children.filter(o=>o.selected).length;e.parent.selected=i===r}else e.children&&(this._setChildrenSelectedState(e.children,!0),this._removeChildren(e),u&&this._activeChildren(e)?this._selected=[...this._selected.filter(i=>i.parent!==e),e]:this._selected=[...this._selected,...e.children.filter(i=>!i.disabled)])}unselect(e,a){if(this._selected=this._selected.filter(u=>u!==e),e.selected=!1,a)if(e.parent&&e.parent.selected){const u=e.parent.children;this._removeParent(e.parent),this._removeChildren(e.parent),this._selected.push(...u.filter(i=>i!==e&&!i.disabled)),e.parent.selected=!1}else e.children&&(this._setChildrenSelectedState(e.children,!1),this._removeChildren(e))}clear(e){this._selected=e?this._selected.filter(a=>a.disabled):[]}_setChildrenSelectedState(e,a){for(const u of e)u.disabled||(u.selected=a)}_removeChildren(e){this._selected=[...this._selected.filter(a=>a.parent!==e),...e.children.filter(a=>a.parent===e&&a.disabled&&a.selected)]}_removeParent(e){this._selected=this._selected.filter(a=>a!==e)}_activeChildren(e){return e.children.every(a=>!a.disabled||a.selected)}}class n2{constructor(){this.notFoundText="No items found",this.typeToSearchText="Type to search",this.addTagText="Add item",this.loadingText="Loading...",this.clearAllText="Clear all",this.disableVirtualScroll=!0,this.openOnEnter=!0,this.appearance="underline"}static#e=this.\u0275fac=function(a){return new(a||n2)};static#a=this.\u0275prov=oe({token:n2,factory:n2.\u0275fac,providedIn:"root"})}class r2{warn(e){console.warn(e)}static#e=this.\u0275fac=function(a){return new(a||r2)};static#a=this.\u0275prov=oe({token:r2,factory:r2.\u0275fac,providedIn:"root"})}const _j=new he("ng-select-selection-model");class QE{get items(){return this._items}set items(e){this._itemsAreUsed=!0,this._items=e??[]}get compareWith(){return this._compareWith}set compareWith(e){if(null!=e&&!gF(e))throw Error("`compareWith` must be a function.");this._compareWith=e}get clearSearchOnAdd(){return ai(this._clearSearchOnAdd)?this._clearSearchOnAdd:ai(this.config.clearSearchOnAdd)?this.config.clearSearchOnAdd:this.closeOnSelect}set clearSearchOnAdd(e){this._clearSearchOnAdd=e}get deselectOnClick(){return ai(this._deselectOnClick)?this._deselectOnClick:ai(this.config.deselectOnClick)?this.config.deselectOnClick:this.multiple}set deselectOnClick(e){this._deselectOnClick=e}get disabled(){return this.readonly||this._disabled}get filtered(){return!!this.searchTerm&&this.searchable||this._isComposing}get single(){return!this.multiple}get _editableSearchTerm(){return this.editableSearchTerm&&!this.multiple}constructor(e,a,u,i,r,o,d){this.classes=e,this.autoFocus=a,this.config=u,this._cd=o,this._console=d,this.markFirst=!0,this.preventToggleOnRightClick=!1,this.dropdownPosition="auto",this.loading=!1,this.closeOnSelect=!0,this.hideSelected=!1,this.selectOnTab=!1,this.bufferAmount=4,this.selectableGroup=!1,this.selectableGroupAsModel=!0,this.searchFn=null,this.trackByFn=null,this.clearOnBackspace=!0,this.labelForId=null,this.inputAttrs={},this.readonly=!1,this.searchWhileComposing=!0,this.minTermLength=0,this.editableSearchTerm=!1,this.keyDownFn=h=>!0,this.ngClass=null,this.multiple=!1,this.addTag=!1,this.searchable=!0,this.clearable=!0,this.isOpen=!1,this.blurEvent=new Ue,this.focusEvent=new Ue,this.changeEvent=new Ue,this.openEvent=new Ue,this.closeEvent=new Ue,this.searchEvent=new Ue,this.clearEvent=new Ue,this.addEvent=new Ue,this.removeEvent=new Ue,this.scroll=new Ue,this.scrollToEnd=new Ue,this.useDefaultClass=!0,this.viewPortItems=[],this.searchTerm=null,this.dropdownId=Dj(),this.escapeHTML=!0,this._items=[],this._defaultLabel="label",this._pressedKeys=[],this._isComposing=!1,this._destroy$=new sa,this._keyPress$=new sa,this._onChange=h=>{},this._onTouched=()=>{},this.clearItem=h=>{const m=this.selectedItems.find(g=>g.value===h);this.unselect(m)},this.trackByOption=(h,m)=>this.trackByFn?this.trackByFn(m.value):m,this._mergeGlobalConfig(u),this.itemsList=new Zle(this,i?i():yj()),this.element=r.nativeElement}get selectedItems(){return this.itemsList.selectedItems}get selectedValues(){return this.selectedItems.map(e=>e.value)}get hasValue(){return this.selectedItems.length>0}get currentPanelPosition(){if(this.dropdownPanel)return this.dropdownPanel.currentPosition}ngOnInit(){this._handleKeyPresses(),this._setInputAttributes()}ngOnChanges(e){e.multiple&&this.itemsList.clearSelected(),e.items&&this._setItems(e.items.currentValue||[]),e.isOpen&&(this._manualOpen=ai(e.isOpen.currentValue))}ngAfterViewInit(){this._itemsAreUsed||(this.escapeHTML=!1,this._setItemsFromNgOptions()),ai(this.autoFocus)&&this.focus()}ngOnDestroy(){this._destroy$.next(),this._destroy$.complete()}handleKeyDown(e){if(T0[e.which]){if(!1===this.keyDownFn(e))return;this.handleKeyCode(e)}else e.key&&1===e.key.length&&this._keyPress$.next(e.key.toLocaleLowerCase())}handleKeyCode(e){const a=e.target;this.clearButton&&this.clearButton.nativeElement===a?this.handleKeyCodeClear(e):this.handleKeyCodeInput(e)}handleKeyCodeInput(e){switch(e.which){case T0.ArrowDown:this._handleArrowDown(e);break;case T0.ArrowUp:this._handleArrowUp(e);break;case T0.Space:this._handleSpace(e);break;case T0.Enter:this._handleEnter(e);break;case T0.Tab:this._handleTab(e);break;case T0.Esc:this.close(),e.preventDefault();break;case T0.Backspace:this._handleBackspace()}}handleKeyCodeClear(e){if(e.which===T0.Enter)this.handleClearClick(),e.preventDefault()}handleMousedown(e){if(this.preventToggleOnRightClick&&2===e.button)return!1;const a=e.target;"INPUT"!==a.tagName&&e.preventDefault(),a.classList.contains("ng-clear-wrapper")?this.handleClearClick():a.classList.contains("ng-arrow-wrapper")?this.handleArrowClick():a.classList.contains("ng-value-icon")||(this.focused||this.focus(),this.searchable?this.open():this.toggle())}handleArrowClick(){this.isOpen?this.close():this.open()}handleClearClick(){this.hasValue&&(this.itemsList.clearSelected(!0),this._updateNgModel()),this._clearSearch(),this.focus(),this.clearEvent.emit(),this._onSelectionChanged()}clearModel(){this.clearable&&(this.itemsList.clearSelected(),this._updateNgModel())}writeValue(e){this.itemsList.clearSelected(),this._handleWriteValue(e),this._cd.markForCheck()}registerOnChange(e){this._onChange=e}registerOnTouched(e){this._onTouched=e}setDisabledState(e){this._disabled=e,this._cd.markForCheck()}toggle(){this.isOpen?this.close():this.open()}open(){this.disabled||this.isOpen||this._manualOpen||!this._isTypeahead&&!this.addTag&&this.itemsList.noItemsToSelect||(this.isOpen=!0,this.itemsList.markSelectedOrDefault(this.markFirst),this.openEvent.emit(),this.searchTerm||this.focus(),this.detectChanges())}close(){!this.isOpen||this._manualOpen||(this.isOpen=!1,this._isComposing=!1,this._editableSearchTerm?this.itemsList.resetFilteredItems():this._clearSearch(),this.itemsList.unmarkItem(),this._onTouched(),this.closeEvent.emit(),this._cd.markForCheck())}toggleItem(e){!e||e.disabled||this.disabled||(this.deselectOnClick&&e.selected?this.unselect(e):this.select(e),this._editableSearchTerm&&this._setSearchTermFromItems(),this._onSelectionChanged())}select(e){e.selected||(this.itemsList.select(e),this.clearSearchOnAdd&&!this._editableSearchTerm&&this._clearSearch(),this._updateNgModel(),this.multiple&&this.addEvent.emit(e.value)),(this.closeOnSelect||this.itemsList.noItemsToSelect)&&this.close()}focus(){this.searchInput.nativeElement.focus()}blur(){this.searchInput.nativeElement.blur()}unselect(e){e&&(this.itemsList.unselect(e),this.focus(),this._updateNgModel(),this.removeEvent.emit(e.value))}selectTag(){let e;e=gF(this.addTag)?this.addTag(this.searchTerm):this._primitive?this.searchTerm:{[this.bindLabel]:this.searchTerm};const a=u=>this._isTypeahead||!this.isOpen?this.itemsList.mapItem(u,null):this.itemsList.addItem(u);!function Ule(t){return t instanceof Promise}(e)?e&&this.select(a(e)):e.then(u=>this.select(a(u))).catch(()=>{})}showClear(){return this.clearable&&(this.hasValue||this.searchTerm)&&!this.disabled}focusOnClear(){this.blur(),this.clearButton&&this.clearButton.nativeElement.focus()}get showAddTag(){if(!this._validTerm)return!1;const e=this.searchTerm.toLowerCase().trim();return this.addTag&&!this.itemsList.filteredItems.some(a=>a.label.toLowerCase()===e)&&(!this.hideSelected&&this.isOpen||!this.selectedItems.some(a=>a.label.toLowerCase()===e))&&!this.loading}showNoItemsFound(){const e=0===this.itemsList.filteredItems.length;return(e&&!this._isTypeahead&&!this.loading||e&&this._isTypeahead&&this._validTerm&&!this.loading)&&!this.showAddTag}showTypeToSearch(){return 0===this.itemsList.filteredItems.length&&this._isTypeahead&&!this._validTerm&&!this.loading}onCompositionStart(){this._isComposing=!0}onCompositionEnd(e){this._isComposing=!1,!this.searchWhileComposing&&this.filter(e)}filter(e){this._isComposing&&!this.searchWhileComposing||(this.searchTerm=e,this._isTypeahead&&(this._validTerm||0===this.minTermLength)&&this.typeahead.next(e),this._isTypeahead||(this.itemsList.filter(this.searchTerm),this.isOpen&&this.itemsList.markSelectedOrDefault(this.markFirst)),this.searchEvent.emit({term:e,items:this.itemsList.filteredItems.map(a=>a.value)}),this.open())}onInputFocus(e){this.focused||(this._editableSearchTerm&&this._setSearchTermFromItems(),this.element.classList.add("ng-select-focused"),this.focusEvent.emit(e),this.focused=!0)}onInputBlur(e){this.element.classList.remove("ng-select-focused"),this.blurEvent.emit(e),!this.isOpen&&!this.disabled&&this._onTouched(),this._editableSearchTerm&&this._setSearchTermFromItems(),this.focused=!1}onItemHover(e){e.disabled||this.itemsList.markItem(e)}detectChanges(){this._cd.destroyed||this._cd.detectChanges()}_setSearchTermFromItems(){const e=this.selectedItems&&this.selectedItems[0];this.searchTerm=e&&e.label||null}_setItems(e){const a=e[0];this.bindLabel=this.bindLabel||this._defaultLabel,this._primitive=ai(a)?!u2(a):this._primitive||this.bindLabel===this._defaultLabel,this.itemsList.setItems(e),e.length>0&&this.hasValue&&this.itemsList.mapSelectedItems(),this.isOpen&&ai(this.searchTerm)&&!this._isTypeahead&&this.itemsList.filter(this.searchTerm),(this._isTypeahead||this.isOpen)&&this.itemsList.markSelectedOrDefault(this.markFirst)}_setItemsFromNgOptions(){const e=u=>{this.items=u.map(i=>({$ngOptionValue:i.value,$ngOptionLabel:i.elementRef.nativeElement.innerHTML,disabled:i.disabled})),this.itemsList.setItems(this.items),this.hasValue&&this.itemsList.mapSelectedItems(),this.detectChanges()},a=()=>{const u=SM(this.ngOptions.changes,this._destroy$);SM(...this.ngOptions.map(i=>i.stateChange$)).pipe(Fh(u)).subscribe(i=>{const r=this.itemsList.findItem(i.value);r.disabled=i.disabled,r.label=i.label||r.label,this._cd.detectChanges()})};this.ngOptions.changes.pipe(Ej(this.ngOptions),Fh(this._destroy$)).subscribe(u=>{this.bindLabel=this._defaultLabel,e(u),a()})}_isValidWriteValue(e){if(!ai(e)||this.multiple&&""===e||Array.isArray(e)&&0===e.length)return!1;const a=u=>!(!ai(this.compareWith)&&u2(u)&&this.bindValue)||(this._console.warn(`Setting object(${JSON.stringify(u)}) as your model with bindValue is not allowed unless [compareWith] is used.`),!1);return this.multiple?Array.isArray(e)?e.every(u=>a(u)):(this._console.warn("Multiple select ngModel should be array."),!1):a(e)}_handleWriteValue(e){if(!this._isValidWriteValue(e))return;const a=u=>{let i=this.itemsList.findItem(u);if(i)this.itemsList.select(i);else{const r=u2(u),o=!r&&!this.bindValue;r||o?this.itemsList.select(this.itemsList.mapItem(u,null)):this.bindValue&&(i={[this.bindLabel]:null,[this.bindValue]:u},this.itemsList.select(this.itemsList.mapItem(i,null)))}};this.multiple?e.forEach(u=>a(u)):a(e)}_handleKeyPresses(){this.searchable||this._keyPress$.pipe(Fh(this._destroy$),pr(e=>this._pressedKeys.push(e)),vj(200),Jt(()=>this._pressedKeys.length>0),aa(()=>this._pressedKeys.join(""))).subscribe(e=>{const a=this.itemsList.findByLabel(e);a&&(this.isOpen?(this.itemsList.markItem(a),this._scrollToMarked(),this._cd.markForCheck()):this.select(a)),this._pressedKeys=[]})}_setInputAttributes(){const e=this.searchInput.nativeElement,a={type:"text",autocorrect:"off",autocapitalize:"off",autocomplete:this.labelForId?"off":this.dropdownId,...this.inputAttrs};for(const u of Object.keys(a))e.setAttribute(u,a[u])}_updateNgModel(){const e=[];for(const u of this.selectedItems)if(this.bindValue){let i=null;if(u.children){const r=this.groupValue?this.bindValue:this.groupBy;i=u.value[r||this.groupBy]}else i=this.itemsList.resolveNested(u.value,this.bindValue);e.push(i)}else e.push(u.value);const a=this.selectedItems.map(u=>u.value);this.multiple?(this._onChange(e),this.changeEvent.emit(a)):(this._onChange(ai(e[0])?e[0]:null),this.changeEvent.emit(a[0])),this._cd.markForCheck()}_clearSearch(){this.searchTerm&&(this._changeSearch(null),this.itemsList.resetFilteredItems())}_changeSearch(e){this.searchTerm=e,this._isTypeahead&&this.typeahead.next(e)}_scrollToMarked(){!this.isOpen||!this.dropdownPanel||this.dropdownPanel.scrollTo(this.itemsList.markedItem)}_scrollToTag(){!this.isOpen||!this.dropdownPanel||this.dropdownPanel.scrollToTag()}_onSelectionChanged(){this.isOpen&&this.deselectOnClick&&this.appendTo&&(this._cd.detectChanges(),this.dropdownPanel.adjustPosition())}_handleTab(e){if(!1===this.isOpen)if(this.showClear()&&!e.shiftKey)this.focusOnClear(),e.preventDefault();else if(!this.addTag)return;this.selectOnTab?this.itemsList.markedItem?(this.toggleItem(this.itemsList.markedItem),e.preventDefault()):this.showAddTag?(this.selectTag(),e.preventDefault()):this.close():this.close()}_handleEnter(e){if(this.isOpen||this._manualOpen)this.itemsList.markedItem?this.toggleItem(this.itemsList.markedItem):this.showAddTag&&this.selectTag();else{if(!this.openOnEnter)return;this.open()}e.preventDefault()}_handleSpace(e){this.isOpen||this._manualOpen||(this.open(),e.preventDefault())}_handleArrowDown(e){this._nextItemIsTag(1)?(this.itemsList.unmarkItem(),this._scrollToTag()):(this.itemsList.markNextItem(),this._scrollToMarked()),this.open(),e.preventDefault()}_handleArrowUp(e){this.isOpen&&(this._nextItemIsTag(-1)?(this.itemsList.unmarkItem(),this._scrollToTag()):(this.itemsList.markPreviousItem(),this._scrollToMarked()),e.preventDefault())}_nextItemIsTag(e){const a=this.itemsList.markedIndex+e;return this.addTag&&this.searchTerm&&this.itemsList.markedItem&&(a<0||a===this.itemsList.filteredItems.length)}_handleBackspace(){this.searchTerm||!this.clearable||!this.clearOnBackspace||!this.hasValue||(this.multiple?this.unselect(this.itemsList.lastSelectedItem):this.clearModel())}get _isTypeahead(){return this.typeahead&&this.typeahead.observers.length>0}get _validTerm(){const e=this.searchTerm&&this.searchTerm.trim();return e&&e.length>=this.minTermLength}_mergeGlobalConfig(e){this.placeholder=this.placeholder||e.placeholder,this.notFoundText=this.notFoundText||e.notFoundText,this.typeToSearchText=this.typeToSearchText||e.typeToSearchText,this.addTagText=this.addTagText||e.addTagText,this.loadingText=this.loadingText||e.loadingText,this.clearAllText=this.clearAllText||e.clearAllText,this.virtualScroll=ai(this.virtualScroll)?this.virtualScroll:!!ai(e.disableVirtualScroll)&&!e.disableVirtualScroll,this.openOnEnter=ai(this.openOnEnter)?this.openOnEnter:e.openOnEnter,this.appendTo=this.appendTo||e.appendTo,this.bindValue=this.bindValue||e.bindValue,this.bindLabel=this.bindLabel||e.bindLabel,this.appearance=this.appearance||e.appearance}static#e=this.\u0275fac=function(a){return new(a||QE)(Zd("class"),Zd("autofocus"),X(n2),X(_j,8),X(Rt),X(Xu),X(r2))};static#a=this.\u0275cmp=Md({type:QE,selectors:[["ng-select"]],contentQueries:function(a,u,i){if(1&a&&(Wr(i,IE,5,st),Wr(i,RE,5,st),Wr(i,HE,5,st),Wr(i,VE,5,st),Wr(i,OE,5,st),Wr(i,jE,5,st),Wr(i,GE,5,st),Wr(i,KE,5,st),Wr(i,WE,5,st),Wr(i,UE,5,st),Wr(i,JE,5,st),Wr(i,ZE,5,st),Wr(i,YE,5)),2&a){let r;Li(r=Ti())&&(u.optionTemplate=r.first),Li(r=Ti())&&(u.optgroupTemplate=r.first),Li(r=Ti())&&(u.labelTemplate=r.first),Li(r=Ti())&&(u.multiLabelTemplate=r.first),Li(r=Ti())&&(u.headerTemplate=r.first),Li(r=Ti())&&(u.footerTemplate=r.first),Li(r=Ti())&&(u.notFoundTemplate=r.first),Li(r=Ti())&&(u.placeholderTemplate=r.first),Li(r=Ti())&&(u.typeToSearchTemplate=r.first),Li(r=Ti())&&(u.loadingTextTemplate=r.first),Li(r=Ti())&&(u.tagTemplate=r.first),Li(r=Ti())&&(u.loadingSpinnerTemplate=r.first),Li(r=Ti())&&(u.ngOptions=r)}},viewQuery:function(a,u){if(1&a&&(N4(qE,5),N4(sle,7),N4(dle,5)),2&a){let i;Li(i=Ti())&&(u.dropdownPanel=i.first),Li(i=Ti())&&(u.searchInput=i.first),Li(i=Ti())&&(u.clearButton=i.first)}},hostVars:20,hostBindings:function(a,u){1&a&&Qu("keydown",function(r){return u.handleKeyDown(r)}),2&a&&cr("ng-select-typeahead",u.typeahead)("ng-select-multiple",u.multiple)("ng-select-taggable",u.addTag)("ng-select-searchable",u.searchable)("ng-select-clearable",u.clearable)("ng-select-opened",u.isOpen)("ng-select",u.useDefaultClass)("ng-select-disabled",u.disabled)("ng-select-filtered",u.filtered)("ng-select-single",u.single)},inputs:{bindLabel:"bindLabel",bindValue:"bindValue",markFirst:[2,"markFirst","markFirst",au],placeholder:"placeholder",notFoundText:"notFoundText",typeToSearchText:"typeToSearchText",preventToggleOnRightClick:"preventToggleOnRightClick",addTagText:"addTagText",loadingText:"loadingText",clearAllText:"clearAllText",appearance:"appearance",dropdownPosition:"dropdownPosition",appendTo:"appendTo",loading:[2,"loading","loading",au],closeOnSelect:[2,"closeOnSelect","closeOnSelect",au],hideSelected:[2,"hideSelected","hideSelected",au],selectOnTab:[2,"selectOnTab","selectOnTab",au],openOnEnter:[2,"openOnEnter","openOnEnter",au],maxSelectedItems:[2,"maxSelectedItems","maxSelectedItems",iE],groupBy:"groupBy",groupValue:"groupValue",bufferAmount:[2,"bufferAmount","bufferAmount",iE],virtualScroll:[2,"virtualScroll","virtualScroll",au],selectableGroup:[2,"selectableGroup","selectableGroup",au],selectableGroupAsModel:[2,"selectableGroupAsModel","selectableGroupAsModel",au],searchFn:"searchFn",trackByFn:"trackByFn",clearOnBackspace:[2,"clearOnBackspace","clearOnBackspace",au],labelForId:"labelForId",inputAttrs:"inputAttrs",tabIndex:[2,"tabIndex","tabIndex",iE],readonly:[2,"readonly","readonly",au],searchWhileComposing:[2,"searchWhileComposing","searchWhileComposing",au],minTermLength:[2,"minTermLength","minTermLength",iE],editableSearchTerm:[2,"editableSearchTerm","editableSearchTerm",au],keyDownFn:"keyDownFn",ngClass:"ngClass",typeahead:"typeahead",multiple:[2,"multiple","multiple",au],addTag:"addTag",searchable:[2,"searchable","searchable",au],clearable:[2,"clearable","clearable",au],isOpen:"isOpen",items:"items",compareWith:"compareWith",clearSearchOnAdd:"clearSearchOnAdd",deselectOnClick:"deselectOnClick"},outputs:{blurEvent:"blur",focusEvent:"focus",changeEvent:"change",openEvent:"open",closeEvent:"close",searchEvent:"search",clearEvent:"clear",addEvent:"add",removeEvent:"remove",scroll:"scroll",scrollToEnd:"scrollToEnd"},standalone:!0,features:[Bu([{provide:L0,useExisting:It(()=>QE),multi:!0},$E]),s,nn,ix],decls:13,vars:19,consts:[["searchInput",""],["defaultPlaceholderTemplate",""],["defaultLabelTemplate",""],["defaultLoadingSpinnerTemplate",""],["clearButton",""],["defaultOptionTemplate",""],["defaultTagTemplate",""],["defaultNotFoundTemplate",""],["defaultTypeToSearchTemplate",""],["defaultLoadingTextTemplate",""],[1,"ng-select-container",3,"mousedown"],[1,"ng-value-container"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],["aria-haspopup","listbox","role","combobox",1,"ng-input"],["aria-autocomplete","list",3,"blur","change","compositionend","compositionstart","focus","input","disabled","readOnly","value"],["tabindex","0",1,"ng-clear-wrapper",3,"title"],[1,"ng-arrow-wrapper"],[1,"ng-arrow"],["role","listbox","aria-label","Options list",1,"ng-dropdown-panel",3,"virtualScroll","bufferAmount","appendTo","position","headerTemplate","footerTemplate","filterValue","items","markedItem","ng-select-multiple","ngClass","id"],[3,"ngTemplateOutlet"],[1,"ng-placeholder"],[1,"ng-value",3,"ng-value-disabled"],[1,"ng-value"],["aria-hidden","true",1,"ng-value-icon","left",3,"click"],[1,"ng-value-label",3,"ngItemLabel","escape"],[1,"ng-spinner-loader"],["aria-hidden","true",1,"ng-clear"],["role","listbox","aria-label","Options list",1,"ng-dropdown-panel",3,"update","scroll","scrollToEnd","outsideClick","virtualScroll","bufferAmount","appendTo","position","headerTemplate","footerTemplate","filterValue","items","markedItem","ngClass","id"],[1,"ng-option",3,"ng-option-disabled","ng-option-selected","ng-optgroup","ng-option","ng-option-child","ng-option-marked"],["role","option",1,"ng-option",3,"ng-option-marked"],[1,"ng-option",3,"click","mouseover"],[1,"ng-option-label",3,"ngItemLabel","escape"],["role","option",1,"ng-option",3,"mouseover","click"],[1,"ng-tag-label"],[1,"ng-option","ng-option-disabled"]],template:function(a,u){if(1&a){const i=Z1();eu(0,"div",10),Qu("mousedown",function(o){return nt(i),Xe(u.handleMousedown(o))}),eu(1,"div",11),Ji(2,Ele,3,1)(3,xle,2,0)(4,Dle,1,5,null,12),eu(5,"div",13)(6,"input",14,0),Qu("blur",function(o){return nt(i),Xe(u.onInputBlur(o))})("change",function(o){return nt(i),Xe(o.stopPropagation())})("compositionend",function(){nt(i);const o=w0(7);return Xe(u.onCompositionEnd(o.value))})("compositionstart",function(){return nt(i),Xe(u.onCompositionStart())})("focus",function(o){return nt(i),Xe(u.onInputFocus(o))})("input",function(){nt(i);const o=w0(7);return Xe(u.filter(o.value))}),wu()()(),Ji(8,_le,3,1)(9,Fle,4,1,"span",15),eu(10,"span",16),J1(11,"span",17),wu()(),Ji(12,jle,8,17,"ng-dropdown-panel",18)}2&a&&(cr("ng-appearance-outline","outline"===u.appearance)("ng-has-value",u.hasValue),$a(2),Qo(0!==u.selectedItems.length||u.searchTerm?-1:2),$a(),Qo(u.multiLabelTemplate&&u.multiple||!(u.selectedItems.length>0)?-1:3),$a(),Qo(u.multiple&&u.multiLabelTemplate&&u.selectedValues.length>0?4:-1),$a(),dr("aria-expanded",u.isOpen)("aria-owns",u.isOpen?u.dropdownId:null),$a(),ki("disabled",u.disabled)("readOnly",!u.searchable||u.itemsList.maxItemsSelected)("value",u.searchTerm?u.searchTerm:""),dr("aria-activedescendant",u.isOpen?null==u.itemsList||null==u.itemsList.markedItem?null:u.itemsList.markedItem.htmlId:null)("aria-controls",u.isOpen?u.dropdownId:null)("id",u.labelForId)("tabindex",u.tabIndex),$a(2),Qo(u.loading?8:-1),$a(),Qo(u.showClear()?9:-1),$a(3),Qo(u.isOpen?12:-1))},dependencies:[eh,i2,qE,Q1],styles:['@charset "UTF-8";.ng-select{position:relative;display:block;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.ng-select div,.ng-select input,.ng-select span{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.ng-select [hidden]{display:none}.ng-select.ng-select-searchable .ng-select-container .ng-value-container .ng-input{opacity:1}.ng-select.ng-select-opened .ng-select-container{z-index:1001}.ng-select.ng-select-disabled .ng-select-container .ng-value-container .ng-placeholder,.ng-select.ng-select-disabled .ng-select-container .ng-value-container .ng-value{-webkit-user-select:none;user-select:none;cursor:default}.ng-select.ng-select-disabled .ng-arrow-wrapper{cursor:default}.ng-select.ng-select-filtered .ng-placeholder{display:none}.ng-select .ng-select-container{cursor:default;display:flex;outline:none;overflow:hidden;position:relative;width:100%}.ng-select .ng-select-container .ng-value-container{display:flex;flex:1}.ng-select .ng-select-container .ng-value-container .ng-input{opacity:0}.ng-select .ng-select-container .ng-value-container .ng-input>input{box-sizing:content-box;background:none transparent;border:0 none;box-shadow:none;outline:none;padding:0;cursor:default;width:100%}.ng-select .ng-select-container .ng-value-container .ng-input>input::-ms-clear{display:none}.ng-select .ng-select-container .ng-value-container .ng-input>input[readonly]{-webkit-user-select:unset;user-select:unset;width:0;padding:0}.ng-select.ng-select-single.ng-select-filtered .ng-select-container .ng-value-container .ng-value{visibility:hidden}.ng-select.ng-select-single .ng-select-container .ng-value-container,.ng-select.ng-select-single .ng-select-container .ng-value-container .ng-value{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ng-select.ng-select-single .ng-select-container .ng-value-container .ng-value .ng-value-icon{display:none}.ng-select.ng-select-single .ng-select-container .ng-value-container .ng-input{position:absolute;left:0;width:100%}.ng-select.ng-select-multiple.ng-select-disabled>.ng-select-container .ng-value-container .ng-value .ng-value-icon{display:none}.ng-select.ng-select-multiple .ng-select-container .ng-value-container{flex-wrap:wrap}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-placeholder{position:absolute}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value{white-space:nowrap}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value.ng-value-disabled .ng-value-icon{display:none}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value .ng-value-icon{cursor:pointer}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-input{flex:1;z-index:2}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-placeholder{z-index:1}.ng-select .ng-clear-wrapper{cursor:pointer;position:relative;width:17px;-webkit-user-select:none;user-select:none}.ng-select .ng-clear-wrapper .ng-clear{display:inline-block;font-size:18px;line-height:1;pointer-events:none}.ng-select .ng-spinner-loader{border-radius:50%;width:17px;height:17px;margin-right:5px;font-size:10px;position:relative;text-indent:-9999em;border-top:2px solid rgba(66,66,66,.2);border-right:2px solid rgba(66,66,66,.2);border-bottom:2px solid rgba(66,66,66,.2);border-left:2px solid #424242;transform:translateZ(0);animation:load8 .8s infinite linear}.ng-select .ng-spinner-loader:after{border-radius:50%;width:17px;height:17px}@-webkit-keyframes load8{0%{-webkit-transform:rotate(0deg);transform:rotate(0)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes load8{0%{-webkit-transform:rotate(0deg);transform:rotate(0)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.ng-select .ng-arrow-wrapper{cursor:pointer;position:relative;text-align:center;-webkit-user-select:none;user-select:none}.ng-select .ng-arrow-wrapper .ng-arrow{pointer-events:none;display:inline-block;height:0;width:0;position:relative}.ng-dropdown-panel{box-sizing:border-box;position:absolute;opacity:0;width:100%;z-index:1050;-webkit-overflow-scrolling:touch}.ng-dropdown-panel .ng-dropdown-panel-items{display:block;height:auto;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;max-height:240px;overflow-y:auto}.ng-dropdown-panel .ng-dropdown-panel-items .ng-optgroup{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ng-dropdown-panel .ng-dropdown-panel-items .ng-option{box-sizing:border-box;cursor:pointer;display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ng-dropdown-panel .ng-dropdown-panel-items .ng-option .ng-option-label:empty:before{content:"\\200b"}.ng-dropdown-panel .ng-dropdown-panel-items .ng-option .highlighted{font-weight:700;text-decoration:underline}.ng-dropdown-panel .ng-dropdown-panel-items .ng-option.disabled{cursor:default}.ng-dropdown-panel .scroll-host{overflow:hidden;overflow-y:auto;position:relative;display:block;-webkit-overflow-scrolling:touch}.ng-dropdown-panel .scrollable-content{top:0;left:0;width:100%;height:100%;position:absolute}.ng-dropdown-panel .total-padding{width:1px;opacity:0}\n'],encapsulation:2,changeDetection:0})}class vF{static#e=this.\u0275fac=function(a){return new(a||vF)};static#a=this.\u0275mod=kn({type:vF,imports:[qE,YE,QE,RE,IE,HE,VE,OE,jE,KE,GE,WE,UE,JE,ZE,i2],exports:[QE,YE,RE,IE,HE,VE,OE,jE,KE,GE,WE,UE,JE,ZE]});static#t=this.\u0275inj=$u({providers:[{provide:_j,useValue:yj}]})}const Yle=["*"],Qle=t=>["nav-item",t];function Xle(t,e){if(1&t){const a=Z1();eu(0,"span",7),Qu("click",function(i){nt(a);const r=dt().$implicit,o=dt();return i.preventDefault(),Xe(o.removeTab(r))}),B0(1," \u274c"),wu()}}function e0e(t,e){if(1&t){const a=Z1();eu(0,"li",3),Qu("keydown",function(i){const r=nt(a).index;return Xe(dt().keyNavActions(i,r))}),eu(1,"a",4),Qu("click",function(){return Xe(nt(a).$implicit.active=!0)}),eu(2,"span",5),B0(3),wu(),Ji(4,Xle,2,0,"span",6),wu()()}if(2&t){const a=e.$implicit;cr("active",a.active)("disabled",a.disabled),ki("ngClass",I4(15,Qle,a.customClass||"")),$a(),cr("active",a.active)("disabled",a.disabled),dr("aria-controls",a.id?a.id:"")("aria-selected",!!a.active)("id",a.id?a.id+"-link":""),$a(),ki("ngTransclude",a.headingRef),$a(),$1(a.heading),$a(),ki("ngIf",a.removable)}}class XE{set ngTransclude(e){this._ngTransclude=e,e&&this.viewRef.createEmbeddedView(e)}get ngTransclude(){return this._ngTransclude}constructor(e){this.viewRef=e}static#e=this.\u0275fac=function(a){return new(a||XE)(X(sr))};static#a=this.\u0275dir=Me({type:XE,selectors:[["","ngTransclude",""]],inputs:{ngTransclude:"ngTransclude"}})}class o2{constructor(){this.type="tabs",this.isKeysAllowed=!0,this.ariaLabel="Tabs"}static#e=this.\u0275fac=function(a){return new(a||o2)};static#a=this.\u0275prov=oe({token:o2,factory:o2.\u0275fac,providedIn:"root"})}class ev{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,a,u){this.renderer=a,this.elementRef=u,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){this.tabs.push(e),e.active=1===this.tabs.length&&!e.active}removeTab(e,a={reselect:!0,emit:!0}){const u=this.tabs.indexOf(e);if(-1!==u&&!this.isDestroyed){if(a.reselect&&e.active&&this.hasAvailableTabs(u)){const i=this.getClosestTabIndex(u);this.tabs[i].active=!0}a.emit&&e.removed.emit(e),this.tabs.splice(u,1),e.elementRef.nativeElement.parentNode&&this.renderer.removeChild(e.elementRef.nativeElement.parentNode,e.elementRef.nativeElement)}}keyNavActions(e,a){if(!this.isKeysAllowed)return;const u=Array.from(this.elementRef.nativeElement.querySelectorAll(".nav-link"));if(13===e.keyCode||"Enter"===e.key||32===e.keyCode||"Space"===e.key)return e.preventDefault(),void u[a%u.length].click();if(39!==e.keyCode&&"RightArrow"!==e.key)if(37!==e.keyCode&&"LeftArrow"!==e.key)if(36!==e.keyCode&&"Home"!==e.key)if(35!==e.keyCode&&"End"!==e.key){if((46===e.keyCode||"Delete"===e.key)&&this.tabs[a].removable){if(this.removeTab(this.tabs[a]),u[a+1])return void u[(a+1)%u.length].focus();u[u.length-1]&&u[0].focus()}}else{e.preventDefault();let i,r=1,o=a;do{o-r<0?(o=u.length-1,i=u[o],r=0):i=u[o-r],r++}while(i.classList.contains("disabled"));i.focus()}else{e.preventDefault();let i,r=0;do{i=u[r%u.length],r++}while(i.classList.contains("disabled"));i.focus()}else{let i,r=1,o=a;do{o-r<0?(o=u.length-1,i=u[o],r=0):i=u[o-r],r++}while(i.classList.contains("disabled"));i.focus()}else{let i,r=1;do{i=u[(a+r)%u.length],r++}while(i.classList.contains("disabled"));i.focus()}}getClosestTabIndex(e){const a=this.tabs.length;if(!a)return-1;for(let u=1;u<=a;u+=1){const i=e-u,r=e+u;if(this.tabs[i]&&!this.tabs[i].disabled)return i;if(this.tabs[r]&&!this.tabs[r].disabled)return r}return-1}hasAvailableTabs(e){const a=this.tabs.length;if(!a)return!1;for(let u=0;u{this.renderer.removeClass(this.elementRef.nativeElement,a)}),this._customClass=e?e.trim():"",this.customClass&&this.customClass.split(" ").forEach(a=>{this.renderer.addClass(this.elementRef.nativeElement,a)})}get active(){return this._active}set active(e){if(this._active!==e){if(this.disabled&&e||!e)return void(this._active&&!e&&(this.deselect.emit(this),this._active=e));this._active=e,this.selectTab.emit(this),this.tabset.tabs.forEach(a=>{a!==this&&(a.active=!1)})}}get ariaLabelledby(){return this.id?`${this.id}-link`:""}constructor(e,a,u){this.elementRef=a,this.renderer=u,this.disabled=!1,this.removable=!1,this.selectTab=new Ue,this.deselect=new Ue,this.removed=new Ue,this.addClass=!0,this.role="tabpanel",this._active=!1,this._customClass="",this.tabset=e,this.tabset.addTab(this)}ngOnInit(){this.removable=!!this.removable}ngOnDestroy(){this.tabset.removeTab(this,{reselect:!1,emit:!1})}static#e=this.\u0275fac=function(a){return new(a||av)(X(ev),X(Rt),X(Vn))};static#a=this.\u0275dir=Me({type:av,selectors:[["tab"],["","tab",""]],hostVars:7,hostBindings:function(a,u){2&a&&(dr("id",u.id)("role",u.role)("aria-labelledby",u.ariaLabelledby),cr("active",u.active)("tab-pane",u.addClass))},inputs:{heading:"heading",id:"id",disabled:"disabled",removable:"removable",customClass:"customClass",active:"active"},outputs:{selectTab:"selectTab",deselect:"deselect",removed:"removed"},exportAs:["tab"]})}class l2{constructor(e,a){a.headingRef=e}static#e=this.\u0275fac=function(a){return new(a||l2)(X(st),X(av))};static#a=this.\u0275dir=Me({type:l2,selectors:[["","tabHeading",""]]})}class s2{static forRoot(){return{ngModule:s2,providers:[]}}static#e=this.\u0275fac=function(a){return new(a||s2)};static#a=this.\u0275mod=kn({type:s2,declarations:[XE,av,ev,l2],imports:[ah],exports:[av,ev,l2,XE]});static#t=this.\u0275inj=$u({imports:[ah]})}function Js(t){return!!t&&(t instanceof ht||Se(t.lift)&&Se(t.subscribe))}function d2(t){return new ht(e=>{Jr(t()).subscribe(e)})}class a0e extends sa{constructor(e=1/0,a=1/0,u=FM){super(),this._bufferSize=e,this._windowTime=a,this._timestampProvider=u,this._buffer=[],this._infiniteTimeWindow=!0,this._infiniteTimeWindow=a===1/0,this._bufferSize=Math.max(1,e),this._windowTime=Math.max(1,a)}next(e){const{isStopped:a,_buffer:u,_infiniteTimeWindow:i,_timestampProvider:r,_windowTime:o}=this;a||(u.push(e),!i&&u.push(r.now()+o)),this._trimBuffer(),super.next(e)}_subscribe(e){this._throwIfClosed(),this._trimBuffer();const a=this._innerSubscribe(e),{_infiniteTimeWindow:u,_buffer:i}=this,r=i.slice();for(let o=0;o{u.unsubscribe(),t()}});return Jr(e(...a)).subscribe(u)}function Fj(t,e,a){let u,i=!1;return t&&"object"==typeof t?({bufferSize:u=1/0,windowTime:e=1/0,refCount:i=!1,scheduler:a}=t):u=t??1/0,function t0e(t={}){const{connector:e=(()=>new sa),resetOnError:a=!0,resetOnComplete:u=!0,resetOnRefCountZero:i=!0}=t;return r=>{let o,d,h,m=0,g=!1,v=!1;const k=()=>{d?.unsubscribe(),d=void 0},x=()=>{k(),o=h=void 0,g=v=!1},D=()=>{const C=o;x(),C?.unsubscribe()};return da((C,F)=>{m++,!v&&!g&&k();const A=h=h??e();F.add(()=>{m--,0===m&&!v&&!g&&(d=zM(D,i))}),A.subscribe(F),!o&&m>0&&(o=new Ar({next:z=>A.next(z),error:z=>{v=!0,k(),d=zM(x,a,z),A.error(z)},complete:()=>{g=!0,k(),d=zM(x,u),A.complete()}}),Jr(C).subscribe(o))})(r)}}({connector:()=>new a0e(u,e,a),resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:i})}class c2{}class mp extends c2{getTranslation(e){return $e({})}static \u0275fac=(()=>{let e;return function(u){return(e||(e=Au(mp)))(u||mp)}})();static \u0275prov=oe({token:mp,factory:mp.\u0275fac})}class MM{}class tv{handle(e){return e.key}static \u0275fac=function(a){return new(a||tv)};static \u0275prov=oe({token:tv,factory:tv.\u0275fac})}function h2(t,e){if(t===e)return!0;if(null===t||null===e)return!1;if(t!=t&&e!=e)return!0;let i,r,o,a=typeof t;if(a==typeof e&&"object"==a){if(!Array.isArray(t)){if(Array.isArray(e))return!1;for(r in o=Object.create(null),t){if(!h2(t[r],e[r]))return!1;o[r]=!0}for(r in e)if(!(r in o)&&typeof e[r]<"u")return!1;return!0}if(!Array.isArray(e))return!1;if((i=t.length)==e.length){for(r=0;r{LM(e[u])?u in t?a[u]=Aj(t[u],e[u]):Object.assign(a,{[u]:e[u]}):Object.assign(a,{[u]:e[u]})}),a}class bF{}class pp extends bF{templateMatcher=/{{\s?([^{}\s]*)\s?}}/g;interpolate(e,a){let u;return u="string"==typeof e?this.interpolateString(e,a):"function"==typeof e?this.interpolateFunction(e,a):e,u}getValue(e,a){let u="string"==typeof a?a.split("."):[a];a="";do{a+=u.shift(),!al(e)||!al(e[a])||"object"!=typeof e[a]&&u.length?u.length?a+=".":e=void 0:(e=e[a],a="")}while(u.length);return e}interpolateFunction(e,a){return e(a)}interpolateString(e,a){return a?e.replace(this.templateMatcher,(u,i)=>{let r=this.getValue(a,i);return al(r)?r:u}):e}static \u0275fac=(()=>{let e;return function(u){return(e||(e=Au(pp)))(u||pp)}})();static \u0275prov=oe({token:pp,factory:pp.\u0275fac})}class kF{}class gp extends kF{compile(e,a){return e}compileTranslations(e,a){return e}static \u0275fac=(()=>{let e;return function(u){return(e||(e=Au(gp)))(u||gp)}})();static \u0275prov=oe({token:gp,factory:gp.\u0275fac})}class wj{defaultLang;currentLang=this.defaultLang;translations={};langs=[];onTranslationChange=new Ue;onLangChange=new Ue;onDefaultLangChange=new Ue}const TM=new he("USE_STORE"),PM=new he("USE_DEFAULT_LANG"),NM=new he("DEFAULT_LANGUAGE"),IM=new he("USE_EXTEND");class at{store;currentLoader;compiler;parser;missingTranslationHandler;useDefaultLang;isolate;extend;loadingTranslations;pending=!1;_onTranslationChange=new Ue;_onLangChange=new Ue;_onDefaultLangChange=new Ue;_defaultLang;_currentLang;_langs=[];_translations={};_translationRequests={};get onTranslationChange(){return this.isolate?this._onTranslationChange:this.store.onTranslationChange}get onLangChange(){return this.isolate?this._onLangChange:this.store.onLangChange}get onDefaultLangChange(){return this.isolate?this._onDefaultLangChange:this.store.onDefaultLangChange}get defaultLang(){return this.isolate?this._defaultLang:this.store.defaultLang}set defaultLang(e){this.isolate?this._defaultLang=e:this.store.defaultLang=e}get currentLang(){return this.isolate?this._currentLang:this.store.currentLang}set currentLang(e){this.isolate?this._currentLang=e:this.store.currentLang=e}get langs(){return this.isolate?this._langs:this.store.langs}set langs(e){this.isolate?this._langs=e:this.store.langs=e}get translations(){return this.isolate?this._translations:this.store.translations}set translations(e){this.isolate?this._translations=e:this.store.translations=e}constructor(e,a,u,i,r,o=!0,d=!1,h=!1,m){this.store=e,this.currentLoader=a,this.compiler=u,this.parser=i,this.missingTranslationHandler=r,this.useDefaultLang=o,this.isolate=d,this.extend=h,m&&this.setDefaultLang(m)}setDefaultLang(e){if(e===this.defaultLang)return;let a=this.retrieveTranslations(e);typeof a<"u"?(null==this.defaultLang&&(this.defaultLang=e),a.pipe(gu(1)).subscribe(u=>{this.changeDefaultLang(e)})):this.changeDefaultLang(e)}getDefaultLang(){return this.defaultLang}use(e){if(e===this.currentLang)return $e(this.translations[e]);let a=this.retrieveTranslations(e);return typeof a<"u"?(this.currentLang||(this.currentLang=e),a.pipe(gu(1)).subscribe(u=>{this.changeLang(e)}),a):(this.changeLang(e),$e(this.translations[e]))}retrieveTranslations(e){let a;return(typeof this.translations[e]>"u"||this.extend)&&(this._translationRequests[e]=this._translationRequests[e]||this.getTranslation(e),a=this._translationRequests[e]),a}getTranslation(e){this.pending=!0;const a=this.currentLoader.getTranslation(e).pipe(Fj(1),gu(1));return this.loadingTranslations=a.pipe(aa(u=>this.compiler.compileTranslations(u,e)),Fj(1),gu(1)),this.loadingTranslations.subscribe({next:u=>{this.translations[e]=this.extend&&this.translations[e]?{...u,...this.translations[e]}:u,this.updateLangs(),this.pending=!1},error:u=>{this.pending=!1}}),a}setTranslation(e,a,u=!1){a=this.compiler.compileTranslations(a,e),(u||this.extend)&&this.translations[e]?this.translations[e]=Aj(this.translations[e],a):this.translations[e]=a,this.updateLangs(),this.onTranslationChange.emit({lang:e,translations:this.translations[e]})}getLangs(){return this.langs}addLangs(e){e.forEach(a=>{-1===this.langs.indexOf(a)&&this.langs.push(a)})}updateLangs(){this.addLangs(Object.keys(this.translations))}getParsedResult(e,a,u){let i;if(a instanceof Array){let r={},o=!1;for(let d of a)r[d]=this.getParsedResult(e,d,u),Js(r[d])&&(o=!0);if(o){return XV(a.map(h=>Js(r[h])?r[h]:$e(r[h]))).pipe(aa(h=>{let m={};return h.forEach((g,v)=>{m[a[v]]=g}),m}))}return r}if(e&&(i=this.parser.interpolate(this.parser.getValue(e,a),u)),typeof i>"u"&&null!=this.defaultLang&&this.defaultLang!==this.currentLang&&this.useDefaultLang&&(i=this.parser.interpolate(this.parser.getValue(this.translations[this.defaultLang],a),u)),typeof i>"u"){let r={key:a,translateService:this};typeof u<"u"&&(r.interpolateParams=u),i=this.missingTranslationHandler.handle(r)}return typeof i<"u"?i:a}get(e,a){if(!al(e)||!e.length)throw new Error('Parameter "key" required');if(this.pending)return this.loadingTranslations.pipe(dp(u=>Js(u=this.getParsedResult(u,e,a))?u:$e(u)));{let u=this.getParsedResult(this.translations[this.currentLang],e,a);return Js(u)?u:$e(u)}}getStreamOnTranslationChange(e,a){if(!al(e)||!e.length)throw new Error('Parameter "key" required');return e2(d2(()=>this.get(e,a)),this.onTranslationChange.pipe(Do(u=>{const i=this.getParsedResult(u.translations,e,a);return"function"==typeof i.subscribe?i:$e(i)})))}stream(e,a){if(!al(e)||!e.length)throw new Error('Parameter "key" required');return e2(d2(()=>this.get(e,a)),this.onLangChange.pipe(Do(u=>{const i=this.getParsedResult(u.translations,e,a);return Js(i)?i:$e(i)})))}instant(e,a){if(!al(e)||!e.length)throw new Error('Parameter "key" required');let u=this.getParsedResult(this.translations[this.currentLang],e,a);if(Js(u)){if(e instanceof Array){let i={};return e.forEach((r,o)=>{i[e[o]]=e[o]}),i}return e}return u}set(e,a,u=this.currentLang){this.translations[u][e]=this.compiler.compile(a,u),this.updateLangs(),this.onTranslationChange.emit({lang:u,translations:this.translations[u]})}changeLang(e){this.currentLang=e,this.onLangChange.emit({lang:e,translations:this.translations[e]}),null==this.defaultLang&&this.changeDefaultLang(e)}changeDefaultLang(e){this.defaultLang=e,this.onDefaultLangChange.emit({lang:e,translations:this.translations[e]})}reloadLang(e){return this.resetLang(e),this.getTranslation(e)}resetLang(e){this._translationRequests[e]=void 0,this.translations[e]=void 0}getBrowserLang(){if(typeof window>"u"||typeof window.navigator>"u")return;let e=window.navigator.languages?window.navigator.languages[0]:null;return e=e||window.navigator.language||window.navigator.browserLanguage||window.navigator.userLanguage,typeof e>"u"?void 0:(-1!==e.indexOf("-")&&(e=e.split("-")[0]),-1!==e.indexOf("_")&&(e=e.split("_")[0]),e)}getBrowserCultureLang(){if(typeof window>"u"||typeof window.navigator>"u")return;let e=window.navigator.languages?window.navigator.languages[0]:null;return e=e||window.navigator.language||window.navigator.browserLanguage||window.navigator.userLanguage,e}static \u0275fac=function(a){return new(a||at)(ye(wj),ye(c2),ye(kF),ye(bF),ye(MM),ye(PM),ye(TM),ye(IM),ye(NM))};static \u0275prov=oe({token:at,factory:at.\u0275fac})}class m2{translateService;element;_ref;key;lastParams;currentParams;onLangChangeSub;onDefaultLangChangeSub;onTranslationChangeSub;set translate(e){e&&(this.key=e,this.checkNodes())}set translateParams(e){h2(this.currentParams,e)||(this.currentParams=e,this.checkNodes(!0))}constructor(e,a,u){this.translateService=e,this.element=a,this._ref=u,this.onTranslationChangeSub||(this.onTranslationChangeSub=this.translateService.onTranslationChange.subscribe(i=>{i.lang===this.translateService.currentLang&&this.checkNodes(!0,i.translations)})),this.onLangChangeSub||(this.onLangChangeSub=this.translateService.onLangChange.subscribe(i=>{this.checkNodes(!0,i.translations)})),this.onDefaultLangChangeSub||(this.onDefaultLangChangeSub=this.translateService.onDefaultLangChange.subscribe(i=>{this.checkNodes(!0)}))}ngAfterViewChecked(){this.checkNodes()}checkNodes(e=!1,a){let u=this.element.nativeElement.childNodes;u.length||(this.setContent(this.element.nativeElement,this.key),u=this.element.nativeElement.childNodes);for(let i=0;i{r!==e&&(a.lastKey=e),a.originalContent||(a.originalContent=this.getContent(a)),a.currentValue=al(r)?r:a.originalContent||e,this.setContent(a,this.key?a.currentValue:a.originalContent.replace(e,a.currentValue)),this._ref.markForCheck()};if(al(u)){let r=this.translateService.getParsedResult(u,e,this.currentParams);Js(r)?r.subscribe({next:i}):i(r)}else this.translateService.get(e,this.currentParams).subscribe(i)}}getContent(e){return al(e.textContent)?e.textContent:e.data}setContent(e,a){al(e.textContent)?e.textContent=a:e.data=a}ngOnDestroy(){this.onLangChangeSub&&this.onLangChangeSub.unsubscribe(),this.onDefaultLangChangeSub&&this.onDefaultLangChangeSub.unsubscribe(),this.onTranslationChangeSub&&this.onTranslationChangeSub.unsubscribe()}static \u0275fac=function(a){return new(a||m2)(X(at),X(Rt),X(Xu))};static \u0275dir=Me({type:m2,selectors:[["","translate",""],["","ngx-translate",""]],inputs:{translate:"translate",translateParams:"translateParams"}})}class Ep{translate;_ref;value="";lastKey=null;lastParams=[];onTranslationChange;onLangChange;onDefaultLangChange;constructor(e,a){this.translate=e,this._ref=a}updateValue(e,a,u){let i=r=>{this.value=void 0!==r?r:e,this.lastKey=e,this._ref.markForCheck()};if(u){let r=this.translate.getParsedResult(u,e,a);Js(r.subscribe)?r.subscribe(i):i(r)}this.translate.get(e,a).subscribe(i)}transform(e,...a){if(!e||!e.length)return e;if(h2(e,this.lastKey)&&h2(a,this.lastParams))return this.value;let u;if(al(a[0])&&a.length)if("string"==typeof a[0]&&a[0].length){let i=a[0].replace(/(\')?([a-zA-Z0-9_]+)(\')?(\s)?:/g,'"$2":').replace(/:(\s)?(\')(.*?)(\')/g,':"$3"');try{u=JSON.parse(i)}catch{throw new SyntaxError(`Wrong parameter in TranslatePipe. Expected a valid Object, received: ${a[0]}`)}}else"object"==typeof a[0]&&!Array.isArray(a[0])&&(u=a[0]);return this.lastKey=e,this.lastParams=a,this.updateValue(e,u),this._dispose(),this.onTranslationChange||(this.onTranslationChange=this.translate.onTranslationChange.subscribe(i=>{this.lastKey&&i.lang===this.translate.currentLang&&(this.lastKey=null,this.updateValue(e,u,i.translations))})),this.onLangChange||(this.onLangChange=this.translate.onLangChange.subscribe(i=>{this.lastKey&&(this.lastKey=null,this.updateValue(e,u,i.translations))})),this.onDefaultLangChange||(this.onDefaultLangChange=this.translate.onDefaultLangChange.subscribe(()=>{this.lastKey&&(this.lastKey=null,this.updateValue(e,u))})),this.value}_dispose(){typeof this.onTranslationChange<"u"&&(this.onTranslationChange.unsubscribe(),this.onTranslationChange=void 0),typeof this.onLangChange<"u"&&(this.onLangChange.unsubscribe(),this.onLangChange=void 0),typeof this.onDefaultLangChange<"u"&&(this.onDefaultLangChange.unsubscribe(),this.onDefaultLangChange=void 0)}ngOnDestroy(){this._dispose()}static \u0275fac=function(a){return new(a||Ep)(X(at,16),X(Xu,16))};static \u0275pipe=Ai({name:"translate",type:Ep,pure:!1});static \u0275prov=oe({token:Ep,factory:Ep.\u0275fac})}class Ac{static forRoot(e={}){return{ngModule:Ac,providers:[e.loader||{provide:c2,useClass:mp},e.compiler||{provide:kF,useClass:gp},e.parser||{provide:bF,useClass:pp},e.missingTranslationHandler||{provide:MM,useClass:tv},wj,{provide:TM,useValue:e.isolate},{provide:PM,useValue:e.useDefaultLang},{provide:IM,useValue:e.extend},{provide:NM,useValue:e.defaultLanguage},at]}}static forChild(e={}){return{ngModule:Ac,providers:[e.loader||{provide:c2,useClass:mp},e.compiler||{provide:kF,useClass:gp},e.parser||{provide:bF,useClass:pp},e.missingTranslationHandler||{provide:MM,useClass:tv},{provide:TM,useValue:e.isolate},{provide:PM,useValue:e.useDefaultLang},{provide:IM,useValue:e.extend},{provide:NM,useValue:e.defaultLanguage},at]}}static \u0275fac=function(a){return new(a||Ac)};static \u0275mod=kn({type:Ac,declarations:[Ep,m2],exports:[Ep,m2]});static \u0275inj=$u({})}class u0e{http;prefix;suffix;constructor(e,a="/assets/i18n/",u=".json"){this.http=e,this.prefix=a,this.suffix=u}getTranslation(e){return this.http.get(`${this.prefix}${e}${this.suffix}`)}}var i0e=O(973),n0e=O.n(i0e);var o0e=O(370),l0e=O.n(o0e);function RM(...t){const e=Ix(t),a=YV(t),{args:u,keys:i}=$V(t);if(0===u.length)return qi([],e);const r=new ht(function s0e(t,e,a=$n){return u=>{Bj(e,()=>{const{length:i}=t,r=new Array(i);let o=i,d=i;for(let h=0;h{const m=qi(t[h],e);let g=!1;m.subscribe(it(u,v=>{r[h]=v,g||(g=!0,d--),d||u.next(a(r.slice()))},()=>{--o||u.complete()}))},u)},u)}}(u,e,i?o=>QV(i,o):$n));return a?r.pipe(tM(a)):r}function Bj(t,e,a){t?Dc(a,t,e):e()}function xF(t,e){const a=Se(t)?t:()=>t,u=i=>i.error(a());return new ht(e?i=>e.schedule(u,0,i):u)}function HM(){return da((t,e)=>{let a=null;t._refCount++;const u=it(e,void 0,void 0,void 0,()=>{if(!t||t._refCount<=0||0<--t._refCount)return void(a=null);const i=t._connection,r=a;a=null,i&&(!r||i===r)&&i.unsubscribe(),e.unsubscribe()});t.subscribe(u),u.closed||(a=t.connect())})}class Sj extends ht{constructor(e,a){super(),this.source=e,this.subjectFactory=a,this._subject=null,this._refCount=0,this._connection=null,Mn(e)&&(this.lift=e.lift)}_subscribe(e){return this.getSubject().subscribe(e)}getSubject(){const e=this._subject;return(!e||e.isStopped)&&(this._subject=this.subjectFactory()),this._subject}_teardown(){this._refCount=0;const{_connection:e}=this;this._subject=this._connection=null,e?.unsubscribe()}connect(){let e=this._connection;if(!e){e=this._connection=new wa;const a=this.getSubject();e.add(this.source.subscribe(it(a,void 0,()=>{this._teardown(),a.complete()},u=>{this._teardown(),a.error(u)},()=>this._teardown()))),e.closed&&(this._connection=null,e=wa.EMPTY)}return e}refCount(){return HM()(this)}}function vp(t){return da((e,a)=>{let r,u=null,i=!1;u=e.subscribe(it(a,void 0,void 0,o=>{r=Jr(t(o,vp(t)(e))),u?(u.unsubscribe(),u=null,r.subscribe(a)):i=!0})),i&&(u.unsubscribe(),u=null,r.subscribe(a))})}function c0e(t,e){return da(function d0e(t,e,a,u,i){return(r,o)=>{let d=a,h=e,m=0;r.subscribe(it(o,g=>{const v=m++;h=d?t(h,g,v):(d=!0,g),u&&o.next(h)},i&&(()=>{d&&o.next(h),o.complete()})))}}(t,e,arguments.length>=2,!0))}function VM(t){return t<=0?()=>Ju:da((e,a)=>{let u=[];e.subscribe(it(a,i=>{u.push(i),t{for(const i of u)a.next(i);a.complete()},void 0,()=>{u=null}))})}const qa="primary",p2=Symbol("RouteTitle");class p0e{constructor(e){this.params=e||{}}has(e){return Object.prototype.hasOwnProperty.call(this.params,e)}get(e){if(this.has(e)){const a=this.params[e];return Array.isArray(a)?a[0]:a}return null}getAll(e){if(this.has(e)){const a=this.params[e];return Array.isArray(a)?a:[a]}return[]}get keys(){return Object.keys(this.params)}}function uv(t){return new p0e(t)}function g0e(t,e,a){const u=a.path.split("/");if(u.length>t.length||"full"===a.pathMatch&&(e.hasChildren()||u.lengthu[r]===i)}return t===e}function Mj(t){return t.length>0?t[t.length-1]:null}function Ah(t){return Js(t)?t:sx(t)?qi(Promise.resolve(t)):$e(t)}const v0e={exact:function Pj(t,e,a){if(!kp(t.segments,e.segments)||!fF(t.segments,e.segments,a)||t.numberOfChildren!==e.numberOfChildren)return!1;for(const u in e.children)if(!t.children[u]||!Pj(t.children[u],e.children[u],a))return!1;return!0},subset:Nj},Lj={exact:function b0e(t,e){return Zs(t,e)},subset:function k0e(t,e){return Object.keys(e).length<=Object.keys(t).length&&Object.keys(e).every(a=>zj(t[a],e[a]))},ignored:()=>!0};function Tj(t,e,a){return v0e[a.paths](t.root,e.root,a.matrixParams)&&Lj[a.queryParams](t.queryParams,e.queryParams)&&!("exact"===a.fragment&&t.fragment!==e.fragment)}function Nj(t,e,a){return Ij(t,e,e.segments,a)}function Ij(t,e,a,u){if(t.segments.length>a.length){const i=t.segments.slice(0,a.length);return!(!kp(i,a)||e.hasChildren()||!fF(i,a,u))}if(t.segments.length===a.length){if(!kp(t.segments,a)||!fF(t.segments,a,u))return!1;for(const i in e.children)if(!t.children[i]||!Nj(t.children[i],e.children[i],u))return!1;return!0}{const i=a.slice(0,t.segments.length),r=a.slice(t.segments.length);return!!(kp(t.segments,i)&&fF(t.segments,i,u)&&t.children[qa])&&Ij(t.children[qa],e,r,u)}}function fF(t,e,a){return e.every((u,i)=>Lj[a](t[i].parameters,u.parameters))}class bp{constructor(e=new iu([],{}),a={},u=null){this.root=e,this.queryParams=a,this.fragment=u}get queryParamMap(){return this._queryParamMap??=uv(this.queryParams),this._queryParamMap}toString(){return D0e.serialize(this)}}class iu{constructor(e,a){this.segments=e,this.children=a,this.parent=null,Object.values(a).forEach(u=>u.parent=this)}hasChildren(){return this.numberOfChildren>0}get numberOfChildren(){return Object.keys(this.children).length}toString(){return CF(this)}}class g2{constructor(e,a){this.path=e,this.parameters=a}get parameterMap(){return this._parameterMap??=uv(this.parameters),this._parameterMap}toString(){return Vj(this)}}function kp(t,e){return t.length===e.length&&t.every((a,u)=>a.path===e[u].path)}class wc{static#e=this.\u0275fac=function(a){return new(a||wc)};static#a=this.\u0275prov=oe({token:wc,factory:()=>new DF,providedIn:"root"})}class DF{parse(e){const a=new L0e(e);return new bp(a.parseRootSegment(),a.parseQueryParams(),a.parseFragment())}serialize(e){const a=`/${E2(e.root,!0)}`,u=function _0e(t){const e=Object.entries(t).map(([a,u])=>Array.isArray(u)?u.map(i=>`${yF(a)}=${yF(i)}`).join("&"):`${yF(a)}=${yF(u)}`).filter(a=>a);return e.length?`?${e.join("&")}`:""}(e.queryParams),i="string"==typeof e.fragment?`#${function C0e(t){return encodeURI(t)}(e.fragment)}`:"";return`${a}${u}${i}`}}const D0e=new DF;function CF(t){return t.segments.map(e=>Vj(e)).join("/")}function E2(t,e){if(!t.hasChildren())return CF(t);if(e){const a=t.children[qa]?E2(t.children[qa],!1):"",u=[];return Object.entries(t.children).forEach(([i,r])=>{i!==qa&&u.push(`${i}:${E2(r,!1)}`)}),u.length>0?`${a}(${u.join("//")})`:a}{const a=function f0e(t,e){let a=[];return Object.entries(t.children).forEach(([u,i])=>{u===qa&&(a=a.concat(e(i,u)))}),Object.entries(t.children).forEach(([u,i])=>{u!==qa&&(a=a.concat(e(i,u)))}),a}(t,(u,i)=>i===qa?[E2(t.children[qa],!1)]:[`${i}:${E2(u,!1)}`]);return 1===Object.keys(t.children).length&&null!=t.children[qa]?`${CF(t)}/${a[0]}`:`${CF(t)}/(${a.join("//")})`}}function Rj(t){return encodeURIComponent(t).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function yF(t){return Rj(t).replace(/%3B/gi,";")}function jM(t){return Rj(t).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function _F(t){return decodeURIComponent(t)}function Hj(t){return _F(t.replace(/\+/g,"%20"))}function Vj(t){return`${jM(t.path)}${function y0e(t){return Object.entries(t).map(([e,a])=>`;${jM(e)}=${jM(a)}`).join("")}(t.parameters)}`}const F0e=/^[^\/()?;#]+/;function GM(t){const e=t.match(F0e);return e?e[0]:""}const A0e=/^[^\/()?;=#]+/;const B0e=/^[^=?&#]+/;const z0e=/^[^&#]+/;class L0e{constructor(e){this.url=e,this.remaining=e}parseRootSegment(){return this.consumeOptional("/"),""===this.remaining||this.peekStartsWith("?")||this.peekStartsWith("#")?new iu([],{}):new iu([],this.parseChildren())}parseQueryParams(){const e={};if(this.consumeOptional("?"))do{this.parseQueryParam(e)}while(this.consumeOptional("&"));return e}parseFragment(){return this.consumeOptional("#")?decodeURIComponent(this.remaining):null}parseChildren(){if(""===this.remaining)return{};this.consumeOptional("/");const e=[];for(this.peekStartsWith("(")||e.push(this.parseSegment());this.peekStartsWith("/")&&!this.peekStartsWith("//")&&!this.peekStartsWith("/(");)this.capture("/"),e.push(this.parseSegment());let a={};this.peekStartsWith("/(")&&(this.capture("/"),a=this.parseParens(!0));let u={};return this.peekStartsWith("(")&&(u=this.parseParens(!1)),(e.length>0||Object.keys(a).length>0)&&(u[qa]=new iu(e,a)),u}parseSegment(){const e=GM(this.remaining);if(""===e&&this.peekStartsWith(";"))throw new Z(4009,!1);return this.capture(e),new g2(_F(e),this.parseMatrixParams())}parseMatrixParams(){const e={};for(;this.consumeOptional(";");)this.parseParam(e);return e}parseParam(e){const a=function w0e(t){const e=t.match(A0e);return e?e[0]:""}(this.remaining);if(!a)return;this.capture(a);let u="";if(this.consumeOptional("=")){const i=GM(this.remaining);i&&(u=i,this.capture(u))}e[_F(a)]=_F(u)}parseQueryParam(e){const a=function S0e(t){const e=t.match(B0e);return e?e[0]:""}(this.remaining);if(!a)return;this.capture(a);let u="";if(this.consumeOptional("=")){const o=function M0e(t){const e=t.match(z0e);return e?e[0]:""}(this.remaining);o&&(u=o,this.capture(u))}const i=Hj(a),r=Hj(u);if(e.hasOwnProperty(i)){let o=e[i];Array.isArray(o)||(o=[o],e[i]=o),o.push(r)}else e[i]=r}parseParens(e){const a={};for(this.capture("(");!this.consumeOptional(")")&&this.remaining.length>0;){const u=GM(this.remaining),i=this.remaining[u.length];if("/"!==i&&")"!==i&&";"!==i)throw new Z(4010,!1);let r;u.indexOf(":")>-1?(r=u.slice(0,u.indexOf(":")),this.capture(r),this.capture(":")):e&&(r=qa);const o=this.parseChildren();a[r]=1===Object.keys(o).length?o[qa]:new iu([],o),this.consumeOptional("//")}return a}peekStartsWith(e){return this.remaining.startsWith(e)}consumeOptional(e){return!!this.peekStartsWith(e)&&(this.remaining=this.remaining.substring(e.length),!0)}capture(e){if(!this.consumeOptional(e))throw new Z(4011,!1)}}function Oj(t){return t.segments.length>0?new iu([],{[qa]:t}):t}function jj(t){const e={};for(const[u,i]of Object.entries(t.children)){const r=jj(i);if(u===qa&&0===r.segments.length&&r.hasChildren())for(const[o,d]of Object.entries(r.children))e[o]=d;else(r.segments.length>0||r.hasChildren())&&(e[u]=r)}return function T0e(t){if(1===t.numberOfChildren&&t.children[qa]){const e=t.children[qa];return new iu(t.segments.concat(e.segments),e.children)}return t}(new iu(t.segments,e))}function xp(t){return t instanceof bp}function Gj(t){let e;const u=function a(r){const o={};for(const h of r.children){const m=a(h);o[h.outlet]=m}const d=new iu(r.url,o);return r===t&&(e=d),d}(t.root),i=Oj(u);return e??i}function Kj(t,e,a,u){let i=t;for(;i.parent;)i=i.parent;if(0===e.length)return KM(i,i,i,a,u);const r=function N0e(t){if("string"==typeof t[0]&&1===t.length&&"/"===t[0])return new Uj(!0,0,t);let e=0,a=!1;const u=t.reduce((i,r,o)=>{if("object"==typeof r&&null!=r){if(r.outlets){const d={};return Object.entries(r.outlets).forEach(([h,m])=>{d[h]="string"==typeof m?m.split("/"):m}),[...i,{outlets:d}]}if(r.segmentPath)return[...i,r.segmentPath]}return"string"!=typeof r?[...i,r]:0===o?(r.split("/").forEach((d,h)=>{0==h&&"."===d||(0==h&&""===d?a=!0:".."===d?e++:""!=d&&i.push(d))}),i):[...i,r]},[]);return new Uj(a,e,u)}(e);if(r.toRoot())return KM(i,i,new iu([],{}),a,u);const o=function I0e(t,e,a){if(t.isAbsolute)return new AF(e,!0,0);if(!a)return new AF(e,!1,NaN);if(null===a.parent)return new AF(a,!0,0);const u=FF(t.commands[0])?0:1,i=a.segments.length-1+u;return function R0e(t,e,a){let u=t,i=e,r=a;for(;r>i;){if(r-=i,u=u.parent,!u)throw new Z(4005,!1);i=u.segments.length}return new AF(u,!1,i-r)}(a,i,t.numberOfDoubleDots)}(r,i,t),d=o.processChildren?b2(o.segmentGroup,o.index,r.commands):Jj(o.segmentGroup,o.index,r.commands);return KM(i,o.segmentGroup,d,a,u)}function FF(t){return"object"==typeof t&&null!=t&&!t.outlets&&!t.segmentPath}function v2(t){return"object"==typeof t&&null!=t&&t.outlets}function KM(t,e,a,u,i){let o,r={};u&&Object.entries(u).forEach(([h,m])=>{r[h]=Array.isArray(m)?m.map(g=>`${g}`):`${m}`}),o=t===e?a:Wj(t,e,a);const d=Oj(jj(o));return new bp(d,r,i)}function Wj(t,e,a){const u={};return Object.entries(t.children).forEach(([i,r])=>{u[i]=r===e?a:Wj(r,e,a)}),new iu(t.segments,u)}class Uj{constructor(e,a,u){if(this.isAbsolute=e,this.numberOfDoubleDots=a,this.commands=u,e&&u.length>0&&FF(u[0]))throw new Z(4003,!1);const i=u.find(v2);if(i&&i!==Mj(u))throw new Z(4004,!1)}toRoot(){return this.isAbsolute&&1===this.commands.length&&"/"==this.commands[0]}}class AF{constructor(e,a,u){this.segmentGroup=e,this.processChildren=a,this.index=u}}function Jj(t,e,a){if(t??=new iu([],{}),0===t.segments.length&&t.hasChildren())return b2(t,e,a);const u=function V0e(t,e,a){let u=0,i=e;const r={match:!1,pathIndex:0,commandIndex:0};for(;i=a.length)return r;const o=t.segments[i],d=a[u];if(v2(d))break;const h=`${d}`,m=u0&&void 0===h)break;if(h&&m&&"object"==typeof m&&void 0===m.outlets){if(!$j(h,m,o))return r;u+=2}else{if(!$j(h,{},o))return r;u++}i++}return{match:!0,pathIndex:i,commandIndex:u}}(t,e,a),i=a.slice(u.commandIndex);if(u.match&&u.pathIndexr!==qa)&&t.children[qa]&&1===t.numberOfChildren&&0===t.children[qa].segments.length){const r=b2(t.children[qa],e,a);return new iu(t.segments,r.children)}return Object.entries(u).forEach(([r,o])=>{"string"==typeof o&&(o=[o]),null!==o&&(i[r]=Jj(t.children[r],e,o))}),Object.entries(t.children).forEach(([r,o])=>{void 0===u[r]&&(i[r]=o)}),new iu(t.segments,i)}}function WM(t,e,a){const u=t.segments.slice(0,e);let i=0;for(;i{"string"==typeof u&&(u=[u]),null!==u&&(e[a]=WM(new iu([],{}),0,u))}),e}function Zj(t){const e={};return Object.entries(t).forEach(([a,u])=>e[a]=`${u}`),e}function $j(t,e,a){return t==a.path&&Zs(e,a.parameters)}const k2="imperative";var gt,Co,x2;!function(t){t[t.NavigationStart=0]="NavigationStart",t[t.NavigationEnd=1]="NavigationEnd",t[t.NavigationCancel=2]="NavigationCancel",t[t.NavigationError=3]="NavigationError",t[t.RoutesRecognized=4]="RoutesRecognized",t[t.ResolveStart=5]="ResolveStart",t[t.ResolveEnd=6]="ResolveEnd",t[t.GuardsCheckStart=7]="GuardsCheckStart",t[t.GuardsCheckEnd=8]="GuardsCheckEnd",t[t.RouteConfigLoadStart=9]="RouteConfigLoadStart",t[t.RouteConfigLoadEnd=10]="RouteConfigLoadEnd",t[t.ChildActivationStart=11]="ChildActivationStart",t[t.ChildActivationEnd=12]="ChildActivationEnd",t[t.ActivationStart=13]="ActivationStart",t[t.ActivationEnd=14]="ActivationEnd",t[t.Scroll=15]="Scroll",t[t.NavigationSkipped=16]="NavigationSkipped"}(gt||(gt={}));class $s{constructor(e,a){this.id=e,this.url=a}}class wF extends $s{constructor(e,a,u="imperative",i=null){super(e,a),this.type=gt.NavigationStart,this.navigationTrigger=u,this.restoredState=i}toString(){return`NavigationStart(id: ${this.id}, url: '${this.url}')`}}class qs extends $s{constructor(e,a,u){super(e,a),this.urlAfterRedirects=u,this.type=gt.NavigationEnd}toString(){return`NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}')`}}!function(t){t[t.Redirect=0]="Redirect",t[t.SupersededByNewNavigation=1]="SupersededByNewNavigation",t[t.NoDataFromResolver=2]="NoDataFromResolver",t[t.GuardRejected=3]="GuardRejected"}(Co||(Co={})),function(t){t[t.IgnoredSameUrlNavigation=0]="IgnoredSameUrlNavigation",t[t.IgnoredByUrlHandlingStrategy=1]="IgnoredByUrlHandlingStrategy"}(x2||(x2={}));class fp extends $s{constructor(e,a,u,i){super(e,a),this.reason=u,this.code=i,this.type=gt.NavigationCancel}toString(){return`NavigationCancel(id: ${this.id}, url: '${this.url}')`}}class iv extends $s{constructor(e,a,u,i){super(e,a),this.reason=u,this.code=i,this.type=gt.NavigationSkipped}}class UM extends $s{constructor(e,a,u,i){super(e,a),this.error=u,this.target=i,this.type=gt.NavigationError}toString(){return`NavigationError(id: ${this.id}, url: '${this.url}', error: ${this.error})`}}class qj extends $s{constructor(e,a,u,i){super(e,a),this.urlAfterRedirects=u,this.state=i,this.type=gt.RoutesRecognized}toString(){return`RoutesRecognized(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class j0e extends $s{constructor(e,a,u,i){super(e,a),this.urlAfterRedirects=u,this.state=i,this.type=gt.GuardsCheckStart}toString(){return`GuardsCheckStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class G0e extends $s{constructor(e,a,u,i,r){super(e,a),this.urlAfterRedirects=u,this.state=i,this.shouldActivate=r,this.type=gt.GuardsCheckEnd}toString(){return`GuardsCheckEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state}, shouldActivate: ${this.shouldActivate})`}}class K0e extends $s{constructor(e,a,u,i){super(e,a),this.urlAfterRedirects=u,this.state=i,this.type=gt.ResolveStart}toString(){return`ResolveStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class W0e extends $s{constructor(e,a,u,i){super(e,a),this.urlAfterRedirects=u,this.state=i,this.type=gt.ResolveEnd}toString(){return`ResolveEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class U0e{constructor(e){this.route=e,this.type=gt.RouteConfigLoadStart}toString(){return`RouteConfigLoadStart(path: ${this.route.path})`}}class J0e{constructor(e){this.route=e,this.type=gt.RouteConfigLoadEnd}toString(){return`RouteConfigLoadEnd(path: ${this.route.path})`}}class Z0e{constructor(e){this.snapshot=e,this.type=gt.ChildActivationStart}toString(){return`ChildActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class $0e{constructor(e){this.snapshot=e,this.type=gt.ChildActivationEnd}toString(){return`ChildActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class q0e{constructor(e){this.snapshot=e,this.type=gt.ActivationStart}toString(){return`ActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class Y0e{constructor(e){this.snapshot=e,this.type=gt.ActivationEnd}toString(){return`ActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class Yj{constructor(e,a,u){this.routerEvent=e,this.position=a,this.anchor=u,this.type=gt.Scroll}toString(){const e=this.position?`${this.position[0]}, ${this.position[1]}`:null;return`Scroll(anchor: '${this.anchor}', position: '${e}')`}}class JM{}class BF{constructor(e,a){this.url=e,this.navigationBehaviorOptions=a}}function P0(t){return t.outlet||qa}function f2(t){if(!t)return null;if(t.routeConfig?._injector)return t.routeConfig._injector;for(let e=t.parent;e;e=e.parent){const a=e.routeConfig;if(a?._loadedInjector)return a._loadedInjector;if(a?._injector)return a._injector}return null}class use{get injector(){return f2(this.route?.snapshot)??this.rootInjector}set injector(e){}constructor(e){this.rootInjector=e,this.outlet=null,this.route=null,this.children=new Bc(this.rootInjector),this.attachRef=null}}class Bc{constructor(e){this.rootInjector=e,this.contexts=new Map}onChildOutletCreated(e,a){const u=this.getOrCreateContext(e);u.outlet=a,this.contexts.set(e,u)}onChildOutletDestroyed(e){const a=this.getContext(e);a&&(a.outlet=null,a.attachRef=null)}onOutletDeactivated(){const e=this.contexts;return this.contexts=new Map,e}onOutletReAttached(e){this.contexts=e}getOrCreateContext(e){let a=this.getContext(e);return a||(a=new use(this.rootInjector),this.contexts.set(e,a)),a}getContext(e){return this.contexts.get(e)||null}static#e=this.\u0275fac=function(a){return new(a||Bc)(ye(tn))};static#a=this.\u0275prov=oe({token:Bc,factory:Bc.\u0275fac,providedIn:"root"})}class Qj{constructor(e){this._root=e}get root(){return this._root.value}parent(e){const a=this.pathFromRoot(e);return a.length>1?a[a.length-2]:null}children(e){const a=ZM(e,this._root);return a?a.children.map(u=>u.value):[]}firstChild(e){const a=ZM(e,this._root);return a&&a.children.length>0?a.children[0].value:null}siblings(e){const a=$M(e,this._root);return a.length<2?[]:a[a.length-2].children.map(i=>i.value).filter(i=>i!==e)}pathFromRoot(e){return $M(e,this._root).map(a=>a.value)}}function ZM(t,e){if(t===e.value)return e;for(const a of e.children){const u=ZM(t,a);if(u)return u}return null}function $M(t,e){if(t===e.value)return[e];for(const a of e.children){const u=$M(t,a);if(u.length)return u.unshift(e),u}return[]}class N0{constructor(e,a){this.value=e,this.children=a}toString(){return`TreeNode(${this.value})`}}function nv(t){const e={};return t&&t.children.forEach(a=>e[a.value.outlet]=a),e}class Xj extends Qj{constructor(e,a){super(e),this.snapshot=a,qM(this,e)}toString(){return this.snapshot.toString()}}function eG(t){const e=function ise(t){const e={},a={},u={},i="",r=new zF([],e,u,i,a,qa,t,null,{});return new aG("",new N0(r,[]))}(t),a=new Ye([new g2("",{})]),u=new Ye({}),i=new Ye({}),r=new Ye({}),o=new Ye(""),d=new rv(a,u,r,o,i,qa,t,e.root);return d.snapshot=e.root,new Xj(new N0(d,[]),e)}class rv{constructor(e,a,u,i,r,o,d,h){this.urlSubject=e,this.paramsSubject=a,this.queryParamsSubject=u,this.fragmentSubject=i,this.dataSubject=r,this.outlet=o,this.component=d,this._futureSnapshot=h,this.title=this.dataSubject?.pipe(aa(m=>m[p2]))??$e(void 0),this.url=e,this.params=a,this.queryParams=u,this.fragment=i,this.data=r}get routeConfig(){return this._futureSnapshot.routeConfig}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap??=this.params.pipe(aa(e=>uv(e))),this._paramMap}get queryParamMap(){return this._queryParamMap??=this.queryParams.pipe(aa(e=>uv(e))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():`Future(${this._futureSnapshot})`}}function SF(t,e,a="emptyOnly"){let u;const{routeConfig:i}=t;return u=null===e||"always"!==a&&""!==i?.path&&(e.component||e.routeConfig?.loadComponent)?{params:{...t.params},data:{...t.data},resolve:{...t.data,...t._resolvedData??{}}}:{params:{...e.params,...t.params},data:{...e.data,...t.data},resolve:{...t.data,...e.data,...i?.data,...t._resolvedData}},i&&uG(i)&&(u.resolve[p2]=i.title),u}class zF{get title(){return this.data?.[p2]}constructor(e,a,u,i,r,o,d,h,m){this.url=e,this.params=a,this.queryParams=u,this.fragment=i,this.data=r,this.outlet=o,this.component=d,this.routeConfig=h,this._resolve=m}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap??=uv(this.params),this._paramMap}get queryParamMap(){return this._queryParamMap??=uv(this.queryParams),this._queryParamMap}toString(){return`Route(url:'${this.url.map(u=>u.toString()).join("/")}', path:'${this.routeConfig?this.routeConfig.path:""}')`}}class aG extends Qj{constructor(e,a){super(a),this.url=e,qM(this,a)}toString(){return tG(this._root)}}function qM(t,e){e.value._routerState=t,e.children.forEach(a=>qM(t,a))}function tG(t){const e=t.children.length>0?` { ${t.children.map(tG).join(", ")} } `:"";return`${t.value}${e}`}function YM(t){if(t.snapshot){const e=t.snapshot,a=t._futureSnapshot;t.snapshot=a,Zs(e.queryParams,a.queryParams)||t.queryParamsSubject.next(a.queryParams),e.fragment!==a.fragment&&t.fragmentSubject.next(a.fragment),Zs(e.params,a.params)||t.paramsSubject.next(a.params),function E0e(t,e){if(t.length!==e.length)return!1;for(let a=0;aZs(a.parameters,e[u].parameters))}(t.url,e.url),u=!t.parent!=!e.parent;return a&&!u&&(!t.parent||QM(t.parent,e.parent))}function uG(t){return"string"==typeof t.title||null===t.title}class Dp{constructor(){this.activated=null,this._activatedRoute=null,this.name=qa,this.activateEvents=new Ue,this.deactivateEvents=new Ue,this.attachEvents=new Ue,this.detachEvents=new Ue,this.parentContexts=U(Bc),this.location=U(sr),this.changeDetector=U(Xu),this.inputBinder=U(MF,{optional:!0}),this.supportsBindingToComponentInputs=!0}get activatedComponentRef(){return this.activated}ngOnChanges(e){if(e.name){const{firstChange:a,previousValue:u}=e.name;if(a)return;this.isTrackedInParentContexts(u)&&(this.deactivate(),this.parentContexts.onChildOutletDestroyed(u)),this.initializeOutletWithName()}}ngOnDestroy(){this.isTrackedInParentContexts(this.name)&&this.parentContexts.onChildOutletDestroyed(this.name),this.inputBinder?.unsubscribeFromRouteData(this)}isTrackedInParentContexts(e){return this.parentContexts.getContext(e)?.outlet===this}ngOnInit(){this.initializeOutletWithName()}initializeOutletWithName(){if(this.parentContexts.onChildOutletCreated(this.name,this),this.activated)return;const e=this.parentContexts.getContext(this.name);e?.route&&(e.attachRef?this.attach(e.attachRef,e.route):this.activateWith(e.route,e.injector))}get isActivated(){return!!this.activated}get component(){if(!this.activated)throw new Z(4012,!1);return this.activated.instance}get activatedRoute(){if(!this.activated)throw new Z(4012,!1);return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){if(!this.activated)throw new Z(4012,!1);this.location.detach();const e=this.activated;return this.activated=null,this._activatedRoute=null,this.detachEvents.emit(e.instance),e}attach(e,a){this.activated=e,this._activatedRoute=a,this.location.insert(e.hostView),this.inputBinder?.bindActivatedRouteToOutletComponent(this),this.attachEvents.emit(e.instance)}deactivate(){if(this.activated){const e=this.component;this.activated.destroy(),this.activated=null,this._activatedRoute=null,this.deactivateEvents.emit(e)}}activateWith(e,a){if(this.isActivated)throw new Z(4013,!1);this._activatedRoute=e;const u=this.location,r=e.snapshot.component,o=this.parentContexts.getOrCreateContext(this.name).children,d=new XM(e,o,u.injector);this.activated=u.createComponent(r,{index:u.length,injector:d,environmentInjector:a}),this.changeDetector.markForCheck(),this.inputBinder?.bindActivatedRouteToOutletComponent(this),this.activateEvents.emit(this.activated.instance)}static#e=this.\u0275fac=function(a){return new(a||Dp)};static#a=this.\u0275dir=Me({type:Dp,selectors:[["router-outlet"]],inputs:{name:"name"},outputs:{activateEvents:"activate",deactivateEvents:"deactivate",attachEvents:"attach",detachEvents:"detach"},exportAs:["outlet"],standalone:!0,features:[nn]})}class XM{__ngOutletInjector(e){return new XM(this.route,this.childContexts,e)}constructor(e,a,u){this.route=e,this.childContexts=a,this.parent=u}get(e,a){return e===rv?this.route:e===Bc?this.childContexts:this.parent.get(e,a)}}const MF=new he("");class ov{constructor(){this.outletDataSubscriptions=new Map}bindActivatedRouteToOutletComponent(e){this.unsubscribeFromRouteData(e),this.subscribeToRouteData(e)}unsubscribeFromRouteData(e){this.outletDataSubscriptions.get(e)?.unsubscribe(),this.outletDataSubscriptions.delete(e)}subscribeToRouteData(e){const{activatedRoute:a}=e,u=RM([a.queryParams,a.params,a.data]).pipe(Do(([i,r,o],d)=>(o={...i,...r,...o},0===d?$e(o):Promise.resolve(o)))).subscribe(i=>{if(!e.isActivated||!e.activatedComponentRef||e.activatedRoute!==a||null===a.component)return void this.unsubscribeFromRouteData(e);const r=function Pte(t){const e=pa(t);if(!e)return null;const a=new F4(e);return{get selector(){return a.selector},get type(){return a.componentType},get inputs(){return a.inputs},get outputs(){return a.outputs},get ngContentSelectors(){return a.ngContentSelectors},get isStandalone(){return e.standalone},get isSignal(){return e.signals}}}(a.component);if(r)for(const{templateName:o}of r.inputs)e.activatedComponentRef.setInput(o,i[o]);else this.unsubscribeFromRouteData(e)});this.outletDataSubscriptions.set(e,u)}static#e=this.\u0275fac=function(a){return new(a||ov)};static#a=this.\u0275prov=oe({token:ov,factory:ov.\u0275fac})}function D2(t,e,a){if(a&&t.shouldReuseRoute(e.value,a.value.snapshot)){const u=a.value;u._futureSnapshot=e.value;const i=function rse(t,e,a){return e.children.map(u=>{for(const i of a.children)if(t.shouldReuseRoute(u.value,i.value.snapshot))return D2(t,u,i);return D2(t,u)})}(t,e,a);return new N0(u,i)}{if(t.shouldAttach(e.value)){const r=t.retrieve(e.value);if(null!==r){const o=r.route;return o.value._futureSnapshot=e.value,o.children=e.children.map(d=>D2(t,d)),o}}const u=function ose(t){return new rv(new Ye(t.url),new Ye(t.params),new Ye(t.queryParams),new Ye(t.fragment),new Ye(t.data),t.outlet,t.component,t)}(e.value),i=e.children.map(r=>D2(t,r));return new N0(u,i)}}class eL{constructor(e,a){this.redirectTo=e,this.navigationBehaviorOptions=a}}const iG="ngNavigationCancelingError";function LF(t,e){const{redirectTo:a,navigationBehaviorOptions:u}=xp(e)?{redirectTo:e,navigationBehaviorOptions:void 0}:e,i=nG(!1,Co.Redirect);return i.url=a,i.navigationBehaviorOptions=u,i}function nG(t,e){const a=new Error(`NavigationCancelingError: ${t||""}`);return a[iG]=!0,a.cancellationCode=e,a}function rG(t){return!!t&&t[iG]}class dse{constructor(e,a,u,i,r){this.routeReuseStrategy=e,this.futureState=a,this.currState=u,this.forwardEvent=i,this.inputBindingEnabled=r}activate(e){const a=this.futureState._root,u=this.currState?this.currState._root:null;this.deactivateChildRoutes(a,u,e),YM(this.futureState.root),this.activateChildRoutes(a,u,e)}deactivateChildRoutes(e,a,u){const i=nv(a);e.children.forEach(r=>{const o=r.value.outlet;this.deactivateRoutes(r,i[o],u),delete i[o]}),Object.values(i).forEach(r=>{this.deactivateRouteAndItsChildren(r,u)})}deactivateRoutes(e,a,u){const i=e.value,r=a?a.value:null;if(i===r)if(i.component){const o=u.getContext(i.outlet);o&&this.deactivateChildRoutes(e,a,o.children)}else this.deactivateChildRoutes(e,a,u);else r&&this.deactivateRouteAndItsChildren(a,u)}deactivateRouteAndItsChildren(e,a){e.value.component&&this.routeReuseStrategy.shouldDetach(e.value.snapshot)?this.detachAndStoreRouteSubtree(e,a):this.deactivateRouteAndOutlet(e,a)}detachAndStoreRouteSubtree(e,a){const u=a.getContext(e.value.outlet),i=u&&e.value.component?u.children:a,r=nv(e);for(const o of Object.values(r))this.deactivateRouteAndItsChildren(o,i);if(u&&u.outlet){const o=u.outlet.detach(),d=u.children.onOutletDeactivated();this.routeReuseStrategy.store(e.value.snapshot,{componentRef:o,route:e,contexts:d})}}deactivateRouteAndOutlet(e,a){const u=a.getContext(e.value.outlet),i=u&&e.value.component?u.children:a,r=nv(e);for(const o of Object.values(r))this.deactivateRouteAndItsChildren(o,i);u&&(u.outlet&&(u.outlet.deactivate(),u.children.onOutletDeactivated()),u.attachRef=null,u.route=null)}activateChildRoutes(e,a,u){const i=nv(a);e.children.forEach(r=>{this.activateRoutes(r,i[r.value.outlet],u),this.forwardEvent(new Y0e(r.value.snapshot))}),e.children.length&&this.forwardEvent(new $0e(e.value.snapshot))}activateRoutes(e,a,u){const i=e.value,r=a?a.value:null;if(YM(i),i===r)if(i.component){const o=u.getOrCreateContext(i.outlet);this.activateChildRoutes(e,a,o.children)}else this.activateChildRoutes(e,a,u);else if(i.component){const o=u.getOrCreateContext(i.outlet);if(this.routeReuseStrategy.shouldAttach(i.snapshot)){const d=this.routeReuseStrategy.retrieve(i.snapshot);this.routeReuseStrategy.store(i.snapshot,null),o.children.onOutletReAttached(d.contexts),o.attachRef=d.componentRef,o.route=d.route.value,o.outlet&&o.outlet.attach(d.componentRef,d.route.value),YM(d.route.value),this.activateChildRoutes(e,null,o.children)}else o.attachRef=null,o.route=i,o.outlet&&o.outlet.activateWith(i,o.injector),this.activateChildRoutes(e,null,o.children)}else this.activateChildRoutes(e,null,u)}}class oG{constructor(e){this.path=e,this.route=this.path[this.path.length-1]}}class TF{constructor(e,a){this.component=e,this.route=a}}function cse(t,e,a){const u=t._root;return C2(u,e?e._root:null,a,[u.value])}function lv(t,e){const a=Symbol(),u=e.get(t,a);return u===a?"function"!=typeof t||function Wf(t){return null!==a1(t)}(t)?e.get(t):t:u}function C2(t,e,a,u,i={canDeactivateChecks:[],canActivateChecks:[]}){const r=nv(e);return t.children.forEach(o=>{(function mse(t,e,a,u,i={canDeactivateChecks:[],canActivateChecks:[]}){const r=t.value,o=e?e.value:null,d=a?a.getContext(t.value.outlet):null;if(o&&r.routeConfig===o.routeConfig){const h=function pse(t,e,a){if("function"==typeof a)return a(t,e);switch(a){case"pathParamsChange":return!kp(t.url,e.url);case"pathParamsOrQueryParamsChange":return!kp(t.url,e.url)||!Zs(t.queryParams,e.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!QM(t,e)||!Zs(t.queryParams,e.queryParams);default:return!QM(t,e)}}(o,r,r.routeConfig.runGuardsAndResolvers);h?i.canActivateChecks.push(new oG(u)):(r.data=o.data,r._resolvedData=o._resolvedData),r.component?C2(t,e,d?d.children:null,u,i):C2(t,e,a,u,i),h&&d&&d.outlet&&d.outlet.isActivated&&i.canDeactivateChecks.push(new TF(d.outlet.component,o))}else o&&y2(e,d,i),i.canActivateChecks.push(new oG(u)),r.component?C2(t,null,d?d.children:null,u,i):C2(t,null,a,u,i);return i})(o,r[o.value.outlet],a,u.concat([o.value]),i),delete r[o.value.outlet]}),Object.entries(r).forEach(([o,d])=>y2(d,a.getContext(o),i)),i}function y2(t,e,a){const u=nv(t),i=t.value;Object.entries(u).forEach(([r,o])=>{i.component?y2(o,e?e.children.getContext(r):null,a):y2(o,e,a)}),i.component&&e&&e.outlet&&e.outlet.isActivated?a.canDeactivateChecks.push(new TF(e.outlet.component,i)):a.canDeactivateChecks.push(new TF(null,i))}function _2(t){return"function"==typeof t}function lG(t){return t instanceof yi||"EmptyError"===t?.name}const PF=Symbol("INITIAL_VALUE");function sv(){return Do(t=>RM(t.map(e=>e.pipe(gu(1),Ej(PF)))).pipe(aa(e=>{for(const a of e)if(!0!==a){if(a===PF)return PF;if(!1===a||fse(a))return a}return!0}),Jt(e=>e!==PF),gu(1)))}function fse(t){return xp(t)||t instanceof eL}function Dse(t,e){return jn(a=>{const{targetSnapshot:u,currentSnapshot:i,guards:{canActivateChecks:r,canDeactivateChecks:o}}=a;return 0===o.length&&0===r.length?$e({...a,guardsResult:!0}):function Cse(t,e,a,u){return qi(t).pipe(jn(i=>function Bse(t,e,a,u,i){const r=e&&e.routeConfig?e.routeConfig.canDeactivate:null;if(!r||0===r.length)return $e(!0);const o=r.map(d=>{const h=f2(e)??i,m=lv(d,h);return Ah(function kse(t){return t&&_2(t.canDeactivate)}(m)?m.canDeactivate(t,e,a,u):Pr(h,()=>m(t,e,a,u))).pipe(Ln())});return $e(o).pipe(sv())}(i.component,i.route,a,e,u)),Ln(i=>!0!==i,!0))}(o,u,i,t).pipe(jn(d=>d&&function gse(t){return"boolean"==typeof t}(d)?function yse(t,e,a,u){return qi(e).pipe(dp(i=>e2(function Fse(t,e){return null!==t&&e&&e(new Z0e(t)),$e(!0)}(i.route.parent,u),function _se(t,e){return null!==t&&e&&e(new q0e(t)),$e(!0)}(i.route,u),function wse(t,e,a){const u=e[e.length-1],r=e.slice(0,e.length-1).reverse().map(o=>function hse(t){const e=t.routeConfig?t.routeConfig.canActivateChild:null;return e&&0!==e.length?{node:t,guards:e}:null}(o)).filter(o=>null!==o).map(o=>d2(()=>$e(o.guards.map(h=>{const m=f2(o.node)??a,g=lv(h,m);return Ah(function bse(t){return t&&_2(t.canActivateChild)}(g)?g.canActivateChild(u,t):Pr(m,()=>g(u,t))).pipe(Ln())})).pipe(sv())));return $e(r).pipe(sv())}(t,i.path,a),function Ase(t,e,a){const u=e.routeConfig?e.routeConfig.canActivate:null;if(!u||0===u.length)return $e(!0);const i=u.map(r=>d2(()=>{const o=f2(e)??a,d=lv(r,o);return Ah(function vse(t){return t&&_2(t.canActivate)}(d)?d.canActivate(e,t):Pr(o,()=>d(e,t))).pipe(Ln())}));return $e(i).pipe(sv())}(t,i.route,a))),Ln(i=>!0!==i,!0))}(u,r,t,e):$e(d)),aa(d=>({...a,guardsResult:d})))})}function Sse(t,e,a,u){const i=e.canLoad;if(void 0===i||0===i.length)return $e(!0);return $e(i.map(o=>{const d=lv(o,t);return Ah(function Ese(t){return t&&_2(t.canLoad)}(d)?d.canLoad(e,a):Pr(t,()=>d(e,a)))})).pipe(sv(),sG(u))}function sG(t){return function qh(...t){return jp(t)}(pr(e=>{if("boolean"!=typeof e)throw LF(0,e)}),aa(e=>!0===e))}function zse(t,e,a,u){const i=e.canMatch;if(!i||0===i.length)return $e(!0);return $e(i.map(o=>{const d=lv(o,t);return Ah(function xse(t){return t&&_2(t.canMatch)}(d)?d.canMatch(e,a):Pr(t,()=>d(e,a)))})).pipe(sv(),sG())}class aL{constructor(e){this.segmentGroup=e||null}}class NF extends Error{constructor(e){super(),this.urlTree=e}}function dv(t){return xF(new aL(t))}class Tse{constructor(e,a){this.urlSerializer=e,this.urlTree=a}lineralizeSegments(e,a){let u=[],i=a.root;for(;;){if(u=u.concat(i.segments),0===i.numberOfChildren)return $e(u);if(i.numberOfChildren>1||!i.children[qa])return e.redirectTo,xF(new Z(4e3,!1));i=i.children[qa]}}applyRedirectCommands(e,a,u,i,r){if("string"!=typeof a){const d=a,{queryParams:h,fragment:m,routeConfig:g,url:v,outlet:k,params:x,data:D,title:C}=i,F=Pr(r,()=>d({params:x,data:D,queryParams:h,fragment:m,routeConfig:g,url:v,outlet:k,title:C}));if(F instanceof bp)throw new NF(F);a=F}const o=this.applyRedirectCreateUrlTree(a,this.urlSerializer.parse(a),e,u);if("/"===a[0])throw new NF(o);return o}applyRedirectCreateUrlTree(e,a,u,i){const r=this.createSegmentGroup(e,a.root,u,i);return new bp(r,this.createQueryParams(a.queryParams,this.urlTree.queryParams),a.fragment)}createQueryParams(e,a){const u={};return Object.entries(e).forEach(([i,r])=>{if("string"==typeof r&&":"===r[0]){const d=r.substring(1);u[i]=a[d]}else u[i]=r}),u}createSegmentGroup(e,a,u,i){const r=this.createSegments(e,a.segments,u,i);let o={};return Object.entries(a.children).forEach(([d,h])=>{o[d]=this.createSegmentGroup(e,h,u,i)}),new iu(r,o)}createSegments(e,a,u,i){return a.map(r=>":"===r.path[0]?this.findPosParam(e,r,i):this.findOrReturn(r,u))}findPosParam(e,a,u){const i=u[a.path.substring(1)];if(!i)throw new Z(4001,!1);return i}findOrReturn(e,a){let u=0;for(const i of a){if(i.path===e.path)return a.splice(u),i;u++}return e}}const tL={matched:!1,consumedSegments:[],remainingSegments:[],parameters:{},positionalParamSegments:{}};function Pse(t,e,a,u,i){const r=uL(t,e,a);return r.matched?(u=function Q0e(t,e){return t.providers&&!t._injector&&(t._injector=_(t.providers,e,`Route: ${t.path}`)),t._injector??e}(e,u),zse(u,e,a).pipe(aa(o=>!0===o?r:{...tL}))):$e(r)}function uL(t,e,a){if("**"===e.path)return function Nse(t){return{matched:!0,parameters:t.length>0?Mj(t).parameters:{},consumedSegments:t,remainingSegments:[],positionalParamSegments:{}}}(a);if(""===e.path)return"full"===e.pathMatch&&(t.hasChildren()||a.length>0)?{...tL}:{matched:!0,consumedSegments:[],remainingSegments:a,parameters:{},positionalParamSegments:{}};const i=(e.matcher||g0e)(a,t,e);if(!i)return{...tL};const r={};Object.entries(i.posParams??{}).forEach(([d,h])=>{r[d]=h.path});const o=i.consumed.length>0?{...r,...i.consumed[i.consumed.length-1].parameters}:r;return{matched:!0,consumedSegments:i.consumed,remainingSegments:a.slice(i.consumed.length),parameters:o,positionalParamSegments:i.posParams??{}}}function dG(t,e,a,u){return a.length>0&&function Hse(t,e,a){return a.some(u=>IF(t,e,u)&&P0(u)!==qa)}(t,a,u)?{segmentGroup:new iu(e,Rse(u,new iu(a,t.children))),slicedSegments:[]}:0===a.length&&function Vse(t,e,a){return a.some(u=>IF(t,e,u))}(t,a,u)?{segmentGroup:new iu(t.segments,Ise(t,a,u,t.children)),slicedSegments:a}:{segmentGroup:new iu(t.segments,t.children),slicedSegments:a}}function Ise(t,e,a,u){const i={};for(const r of a)if(IF(t,e,r)&&!u[P0(r)]){const o=new iu([],{});i[P0(r)]=o}return{...u,...i}}function Rse(t,e){const a={};a[qa]=e;for(const u of t)if(""===u.path&&P0(u)!==qa){const i=new iu([],{});a[P0(u)]=i}return a}function IF(t,e,a){return(!(t.hasChildren()||e.length>0)||"full"!==a.pathMatch)&&""===a.path}class Gse{}class Use{constructor(e,a,u,i,r,o,d){this.injector=e,this.configLoader=a,this.rootComponentType=u,this.config=i,this.urlTree=r,this.paramsInheritanceStrategy=o,this.urlSerializer=d,this.applyRedirects=new Tse(this.urlSerializer,this.urlTree),this.absoluteRedirectCount=0,this.allowRedirects=!0}noMatchError(e){return new Z(4002,`'${e.segmentGroup}'`)}recognize(){const e=dG(this.urlTree.root,[],[],this.config).segmentGroup;return this.match(e).pipe(aa(({children:a,rootSnapshot:u})=>{const i=new N0(u,a),r=new aG("",i),o=function P0e(t,e,a=null,u=null){return Kj(Gj(t),e,a,u)}(u,[],this.urlTree.queryParams,this.urlTree.fragment);return o.queryParams=this.urlTree.queryParams,r.url=this.urlSerializer.serialize(o),{state:r,tree:o}}))}match(e){const a=new zF([],Object.freeze({}),Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,Object.freeze({}),qa,this.rootComponentType,null,{});return this.processSegmentGroup(this.injector,this.config,e,qa,a).pipe(aa(u=>({children:u,rootSnapshot:a})),vp(u=>{if(u instanceof NF)return this.urlTree=u.urlTree,this.match(u.urlTree.root);throw u instanceof aL?this.noMatchError(u):u}))}processSegmentGroup(e,a,u,i,r){return 0===u.segments.length&&u.hasChildren()?this.processChildren(e,a,u,r):this.processSegment(e,a,u,u.segments,i,!0,r).pipe(aa(o=>o instanceof N0?[o]:[]))}processChildren(e,a,u,i){const r=[];for(const o of Object.keys(u.children))"primary"===o?r.unshift(o):r.push(o);return qi(r).pipe(dp(o=>{const d=u.children[o],h=function tse(t,e){const a=t.filter(u=>P0(u)===e);return a.push(...t.filter(u=>P0(u)!==e)),a}(a,o);return this.processSegmentGroup(e,h,d,o,i)}),c0e((o,d)=>(o.push(...d),o)),Yl(null),function h0e(t,e){const a=arguments.length>=2;return u=>u.pipe(t?Jt((i,r)=>t(i,r,u)):$n,VM(1),a?Yl(e):Eu(()=>new yi))}(),jn(o=>{if(null===o)return dv(u);const d=cG(o);return function Jse(t){t.sort((e,a)=>e.value.outlet===qa?-1:a.value.outlet===qa?1:e.value.outlet.localeCompare(a.value.outlet))}(d),$e(d)}))}processSegment(e,a,u,i,r,o,d){return qi(a).pipe(dp(h=>this.processSegmentAgainstRoute(h._injector??e,a,h,u,i,r,o,d).pipe(vp(m=>{if(m instanceof aL)return $e(null);throw m}))),Ln(h=>!!h),vp(h=>{if(lG(h))return function jse(t,e,a){return 0===e.length&&!t.children[a]}(u,i,r)?$e(new Gse):dv(u);throw h}))}processSegmentAgainstRoute(e,a,u,i,r,o,d,h){return function Ose(t,e,a,u){return!!(P0(t)===u||u!==qa&&IF(e,a,t))&&uL(e,t,a).matched}(u,i,r,o)?void 0===u.redirectTo?this.matchSegmentAgainstRoute(e,i,u,r,o,h):this.allowRedirects&&d?this.expandSegmentAgainstRouteUsingRedirect(e,i,a,u,r,o,h):dv(i):dv(i)}expandSegmentAgainstRouteUsingRedirect(e,a,u,i,r,o,d){const{matched:h,parameters:m,consumedSegments:g,positionalParamSegments:v,remainingSegments:k}=uL(a,i,r);if(!h)return dv(a);"string"==typeof i.redirectTo&&"/"===i.redirectTo[0]&&(this.absoluteRedirectCount++,this.absoluteRedirectCount>31&&(this.allowRedirects=!1));const x=new zF(r,m,Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,hG(i),P0(i),i.component??i._loadedComponent??null,i,mG(i)),D=SF(x,d,this.paramsInheritanceStrategy);x.params=Object.freeze(D.params),x.data=Object.freeze(D.data);const C=this.applyRedirects.applyRedirectCommands(g,i.redirectTo,v,x,e);return this.applyRedirects.lineralizeSegments(i,C).pipe(jn(F=>this.processSegment(e,u,a,F.concat(k),o,!1,d)))}matchSegmentAgainstRoute(e,a,u,i,r,o){const d=Pse(a,u,i,e,this.urlSerializer);return"**"===u.path&&(a.children={}),d.pipe(Do(h=>h.matched?(e=u._injector??e,this.getChildConfig(e,u,i).pipe(Do(({routes:m})=>{const g=u._loadedInjector??e,{parameters:v,consumedSegments:k,remainingSegments:x}=h,D=new zF(k,v,Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,hG(u),P0(u),u.component??u._loadedComponent??null,u,mG(u)),C=SF(D,o,this.paramsInheritanceStrategy);D.params=Object.freeze(C.params),D.data=Object.freeze(C.data);const{segmentGroup:F,slicedSegments:A}=dG(a,k,x,m);if(0===A.length&&F.hasChildren())return this.processChildren(g,m,F,D).pipe(aa(M=>new N0(D,M)));if(0===m.length&&0===A.length)return $e(new N0(D,[]));const z=P0(u)===r;return this.processSegment(g,m,F,A,z?qa:r,!0,D).pipe(aa(M=>new N0(D,M instanceof N0?[M]:[])))}))):dv(a)))}getChildConfig(e,a,u){return a.children?$e({routes:a.children,injector:e}):a.loadChildren?void 0!==a._loadedRoutes?$e({routes:a._loadedRoutes,injector:a._loadedInjector}):Sse(e,a,u,this.urlSerializer).pipe(jn(i=>i?this.configLoader.loadChildren(e,a).pipe(pr(r=>{a._loadedRoutes=r.routes,a._loadedInjector=r.injector})):function Lse(t){return xF(nG(!1,Co.GuardRejected))}())):$e({routes:[],injector:e})}}function Zse(t){const e=t.value.routeConfig;return e&&""===e.path}function cG(t){const e=[],a=new Set;for(const u of t){if(!Zse(u)){e.push(u);continue}const i=e.find(r=>u.value.routeConfig===r.value.routeConfig);void 0!==i?(i.children.push(...u.children),a.add(i)):e.push(u)}for(const u of a){const i=cG(u.children);e.push(new N0(u.value,i))}return e.filter(u=>!a.has(u))}function hG(t){return t.data||{}}function mG(t){return t.resolve||{}}function $se(t,e,a,u,i,r){return jn(o=>function Kse(t,e,a,u,i,r,o="emptyOnly"){return new Use(t,e,a,u,i,o,r).recognize()}(t,e,a,u,o.extractedUrl,i,r).pipe(aa(({state:d,tree:h})=>({...o,targetSnapshot:d,urlAfterRedirects:h}))))}function qse(t,e){return jn(a=>{const{targetSnapshot:u,guards:{canActivateChecks:i}}=a;if(!i.length)return $e(a);const r=new Set(i.map(h=>h.route)),o=new Set;for(const h of r)if(!o.has(h))for(const m of pG(h))o.add(m);let d=0;return qi(o).pipe(dp(h=>r.has(h)?function Yse(t,e,a,u){const i=t.routeConfig,r=t._resolve;return void 0!==i?.title&&!uG(i)&&(r[p2]=i.title),function Qse(t,e,a,u){const i=OM(t);if(0===i.length)return $e({});const r={};return qi(i).pipe(jn(o=>function Xse(t,e,a,u){const i=f2(e)??u,r=lv(t,i),o=r.resolve?r.resolve(e,a):Pr(i,()=>r(e,a));return Ah(o)}(t[o],e,a,u).pipe(Ln(),pr(d=>{if(d instanceof eL)throw LF(new DF,d);r[o]=d}))),VM(1),function m0e(t){return aa(()=>t)}(r),vp(o=>lG(o)?Ju:xF(o)))}(r,t,e,u).pipe(aa(o=>(t._resolvedData=o,t.data=SF(t,t.parent,a).resolve,null)))}(h,u,t,e):(h.data=SF(h,h.parent,t).resolve,$e(void 0))),pr(()=>d++),VM(1),jn(h=>d===o.size?$e(a):Ju))})}function pG(t){const e=t.children.map(a=>pG(a)).flat();return[t,...e]}function iL(t){return Do(e=>{const a=t(e);return a?qi(a).pipe(aa(()=>e)):$e(e)})}class F2{buildTitle(e){let a,u=e.root;for(;void 0!==u;)a=this.getResolvedTitleForRoute(u)??a,u=u.children.find(i=>i.outlet===qa);return a}getResolvedTitleForRoute(e){return e.data[p2]}static#e=this.\u0275fac=function(a){return new(a||F2)};static#a=this.\u0275prov=oe({token:F2,factory:()=>U(A2),providedIn:"root"})}class A2 extends F2{constructor(e){super(),this.title=e}updateTitle(e){const a=this.buildTitle(e);void 0!==a&&this.title.setTitle(a)}static#e=this.\u0275fac=function(a){return new(a||A2)(ye(zx))};static#a=this.\u0275prov=oe({token:A2,factory:A2.\u0275fac,providedIn:"root"})}const cv=new he("",{providedIn:"root",factory:()=>({})});class Cp{static#e=this.\u0275fac=function(a){return new(a||Cp)};static#a=this.\u0275cmp=Md({type:Cp,selectors:[["ng-component"]],standalone:!0,features:[ix],decls:1,vars:0,template:function(a,u){1&a&&J1(0,"router-outlet")},dependencies:[Dp],encapsulation:2})}function nL(t){const e=t.children&&t.children.map(nL),a=e?{...t,children:e}:{...t};return!a.component&&!a.loadComponent&&(e||a.loadChildren)&&a.outlet&&a.outlet!==qa&&(a.component=Cp),a}const hv=new he("");class yp{constructor(){this.componentLoaders=new WeakMap,this.childrenLoaders=new WeakMap,this.compiler=U(pc)}loadComponent(e){if(this.componentLoaders.get(e))return this.componentLoaders.get(e);if(e._loadedComponent)return $e(e._loadedComponent);this.onLoadStartListener&&this.onLoadStartListener(e);const a=Ah(e.loadComponent()).pipe(aa(gG),pr(i=>{this.onLoadEndListener&&this.onLoadEndListener(e),e._loadedComponent=i}),$x(()=>{this.componentLoaders.delete(e)})),u=new Sj(a,()=>new sa).pipe(HM());return this.componentLoaders.set(e,u),u}loadChildren(e,a){if(this.childrenLoaders.get(a))return this.childrenLoaders.get(a);if(a._loadedRoutes)return $e({routes:a._loadedRoutes,injector:a._loadedInjector});this.onLoadStartListener&&this.onLoadStartListener(a);const i=function ede(t,e,a,u){return Ah(t.loadChildren()).pipe(aa(gG),jn(i=>i instanceof l||Array.isArray(i)?$e(i):qi(e.compileModuleAsync(i))),aa(i=>{u&&u(t);let r,o,d=!1;return Array.isArray(i)?(o=i,d=!0):(r=i.create(a).injector,o=r.get(hv,[],{optional:!0,self:!0}).flat()),{routes:o.map(nL),injector:r}}))}(a,this.compiler,e,this.onLoadEndListener).pipe($x(()=>{this.childrenLoaders.delete(a)})),r=new Sj(i,()=>new sa).pipe(HM());return this.childrenLoaders.set(a,r),r}static#e=this.\u0275fac=function(a){return new(a||yp)};static#a=this.\u0275prov=oe({token:yp,factory:yp.\u0275fac,providedIn:"root"})}function gG(t){return function ade(t){return t&&"object"==typeof t&&"default"in t}(t)?t.default:t}class mv{static#e=this.\u0275fac=function(a){return new(a||mv)};static#a=this.\u0275prov=oe({token:mv,factory:()=>U(w2),providedIn:"root"})}class w2{shouldProcessUrl(e){return!0}extract(e){return e}merge(e,a){return e}static#e=this.\u0275fac=function(a){return new(a||w2)};static#a=this.\u0275prov=oe({token:w2,factory:w2.\u0275fac,providedIn:"root"})}const EG=new he(""),vG=new he("");function tde(t,e,a){const u=t.get(vG),i=t.get(ei);return t.get(rt).runOutsideAngular(()=>{if(!i.startViewTransition||u.skipNextTransition)return u.skipNextTransition=!1,new Promise(m=>setTimeout(m));let r;const o=new Promise(m=>{r=m}),d=i.startViewTransition(()=>(r(),function ude(t){return new Promise(e=>{Fk({read:()=>setTimeout(e)},{injector:t})})}(t))),{onViewTransitionCreated:h}=u;return h&&Pr(t,()=>h({transition:d,from:e,to:a})),o})}const bG=new he("");class wh{get hasRequestedNavigation(){return 0!==this.navigationId}constructor(){this.currentNavigation=null,this.currentTransition=null,this.lastSuccessfulNavigation=null,this.events=new sa,this.transitionAbortSubject=new sa,this.configLoader=U(yp),this.environmentInjector=U(tn),this.urlSerializer=U(wc),this.rootContexts=U(Bc),this.location=U(xc),this.inputBindingEnabled=null!==U(MF,{optional:!0}),this.titleStrategy=U(F2),this.options=U(cv,{optional:!0})||{},this.paramsInheritanceStrategy=this.options.paramsInheritanceStrategy||"emptyOnly",this.urlHandlingStrategy=U(mv),this.createViewTransition=U(EG,{optional:!0}),this.navigationErrorHandler=U(bG,{optional:!0}),this.navigationId=0,this.afterPreactivation=()=>$e(void 0),this.rootComponentType=null;this.configLoader.onLoadEndListener=u=>this.events.next(new J0e(u)),this.configLoader.onLoadStartListener=u=>this.events.next(new U0e(u))}complete(){this.transitions?.complete()}handleNavigationRequest(e){const a=++this.navigationId;this.transitions?.next({...this.transitions.value,...e,id:a})}setupNavigations(e,a,u){return this.transitions=new Ye({id:0,currentUrlTree:a,currentRawUrl:a,extractedUrl:this.urlHandlingStrategy.extract(a),urlAfterRedirects:this.urlHandlingStrategy.extract(a),rawUrl:a,extras:{},resolve:()=>{},reject:()=>{},promise:Promise.resolve(!0),source:k2,restoredState:null,currentSnapshot:u.snapshot,targetSnapshot:null,currentRouterState:u,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null}),this.transitions.pipe(Jt(i=>0!==i.id),aa(i=>({...i,extractedUrl:this.urlHandlingStrategy.extract(i.rawUrl)})),Do(i=>{let r=!1,o=!1;return $e(i).pipe(Do(d=>{if(this.navigationId>i.id)return this.cancelNavigationTransition(i,"",Co.SupersededByNewNavigation),Ju;this.currentTransition=i,this.currentNavigation={id:d.id,initialUrl:d.rawUrl,extractedUrl:d.extractedUrl,targetBrowserUrl:"string"==typeof d.extras.browserUrl?this.urlSerializer.parse(d.extras.browserUrl):d.extras.browserUrl,trigger:d.source,extras:d.extras,previousNavigation:this.lastSuccessfulNavigation?{...this.lastSuccessfulNavigation,previousNavigation:null}:null};const h=!e.navigated||this.isUpdatingInternalState()||this.isUpdatedBrowserUrl(),m=d.extras.onSameUrlNavigation??e.onSameUrlNavigation;if(!h&&"reload"!==m){const g="";return this.events.next(new iv(d.id,this.urlSerializer.serialize(d.rawUrl),g,x2.IgnoredSameUrlNavigation)),d.resolve(!1),Ju}if(this.urlHandlingStrategy.shouldProcessUrl(d.rawUrl))return $e(d).pipe(Do(g=>{const v=this.transitions?.getValue();return this.events.next(new wF(g.id,this.urlSerializer.serialize(g.extractedUrl),g.source,g.restoredState)),v!==this.transitions?.getValue()?Ju:Promise.resolve(g)}),$se(this.environmentInjector,this.configLoader,this.rootComponentType,e.config,this.urlSerializer,this.paramsInheritanceStrategy),pr(g=>{i.targetSnapshot=g.targetSnapshot,i.urlAfterRedirects=g.urlAfterRedirects,this.currentNavigation={...this.currentNavigation,finalUrl:g.urlAfterRedirects};const v=new qj(g.id,this.urlSerializer.serialize(g.extractedUrl),this.urlSerializer.serialize(g.urlAfterRedirects),g.targetSnapshot);this.events.next(v)}));if(h&&this.urlHandlingStrategy.shouldProcessUrl(d.currentRawUrl)){const{id:g,extractedUrl:v,source:k,restoredState:x,extras:D}=d,C=new wF(g,this.urlSerializer.serialize(v),k,x);this.events.next(C);const F=eG(this.rootComponentType).snapshot;return this.currentTransition=i={...d,targetSnapshot:F,urlAfterRedirects:v,extras:{...D,skipLocationChange:!1,replaceUrl:!1}},this.currentNavigation.finalUrl=v,$e(i)}{const g="";return this.events.next(new iv(d.id,this.urlSerializer.serialize(d.extractedUrl),g,x2.IgnoredByUrlHandlingStrategy)),d.resolve(!1),Ju}}),pr(d=>{const h=new j0e(d.id,this.urlSerializer.serialize(d.extractedUrl),this.urlSerializer.serialize(d.urlAfterRedirects),d.targetSnapshot);this.events.next(h)}),aa(d=>(this.currentTransition=i={...d,guards:cse(d.targetSnapshot,d.currentSnapshot,this.rootContexts)},i)),Dse(this.environmentInjector,d=>this.events.next(d)),pr(d=>{if(i.guardsResult=d.guardsResult,d.guardsResult&&"boolean"!=typeof d.guardsResult)throw LF(this.urlSerializer,d.guardsResult);const h=new G0e(d.id,this.urlSerializer.serialize(d.extractedUrl),this.urlSerializer.serialize(d.urlAfterRedirects),d.targetSnapshot,!!d.guardsResult);this.events.next(h)}),Jt(d=>!!d.guardsResult||(this.cancelNavigationTransition(d,"",Co.GuardRejected),!1)),iL(d=>{if(d.guards.canActivateChecks.length)return $e(d).pipe(pr(h=>{const m=new K0e(h.id,this.urlSerializer.serialize(h.extractedUrl),this.urlSerializer.serialize(h.urlAfterRedirects),h.targetSnapshot);this.events.next(m)}),Do(h=>{let m=!1;return $e(h).pipe(qse(this.paramsInheritanceStrategy,this.environmentInjector),pr({next:()=>m=!0,complete:()=>{m||this.cancelNavigationTransition(h,"",Co.NoDataFromResolver)}}))}),pr(h=>{const m=new W0e(h.id,this.urlSerializer.serialize(h.extractedUrl),this.urlSerializer.serialize(h.urlAfterRedirects),h.targetSnapshot);this.events.next(m)}))}),iL(d=>{const h=m=>{const g=[];m.routeConfig?.loadComponent&&!m.routeConfig._loadedComponent&&g.push(this.configLoader.loadComponent(m.routeConfig).pipe(pr(v=>{m.component=v}),aa(()=>{})));for(const v of m.children)g.push(...h(v));return g};return RM(h(d.targetSnapshot.root)).pipe(Yl(null),gu(1))}),iL(()=>this.afterPreactivation()),Do(()=>{const{currentSnapshot:d,targetSnapshot:h}=i,m=this.createViewTransition?.(this.environmentInjector,d.root,h.root);return m?qi(m).pipe(aa(()=>i)):$e(i)}),aa(d=>{const h=function nse(t,e,a){const u=D2(t,e._root,a?a._root:void 0);return new Xj(u,e)}(e.routeReuseStrategy,d.targetSnapshot,d.currentRouterState);return this.currentTransition=i={...d,targetRouterState:h},this.currentNavigation.targetRouterState=h,i}),pr(()=>{this.events.next(new JM)}),((t,e,a,u)=>aa(i=>(new dse(e,i.targetRouterState,i.currentRouterState,a,u).activate(t),i)))(this.rootContexts,e.routeReuseStrategy,d=>this.events.next(d),this.inputBindingEnabled),gu(1),pr({next:d=>{r=!0,this.lastSuccessfulNavigation=this.currentNavigation,this.events.next(new qs(d.id,this.urlSerializer.serialize(d.extractedUrl),this.urlSerializer.serialize(d.urlAfterRedirects))),this.titleStrategy?.updateTitle(d.targetRouterState.snapshot),d.resolve(!0)},complete:()=>{r=!0}}),Fh(this.transitionAbortSubject.pipe(pr(d=>{throw d}))),$x(()=>{!r&&!o&&this.cancelNavigationTransition(i,"",Co.SupersededByNewNavigation),this.currentTransition?.id===i.id&&(this.currentNavigation=null,this.currentTransition=null)}),vp(d=>{if(o=!0,rG(d))this.events.next(new fp(i.id,this.urlSerializer.serialize(i.extractedUrl),d.message,d.cancellationCode)),function lse(t){return rG(t)&&xp(t.url)}(d)?this.events.next(new BF(d.url,d.navigationBehaviorOptions)):i.resolve(!1);else{const h=new UM(i.id,this.urlSerializer.serialize(i.extractedUrl),d,i.targetSnapshot??void 0);try{const m=Pr(this.environmentInjector,()=>this.navigationErrorHandler?.(h));if(m instanceof eL){const{message:g,cancellationCode:v}=LF(this.urlSerializer,m);this.events.next(new fp(i.id,this.urlSerializer.serialize(i.extractedUrl),g,v)),this.events.next(new BF(m.redirectTo,m.navigationBehaviorOptions))}else{this.events.next(h);const g=e.errorHandler(d);i.resolve(!!g)}}catch(m){this.options.resolveNavigationPromiseOnError?i.resolve(!1):i.reject(m)}}return Ju}))}))}cancelNavigationTransition(e,a,u){const i=new fp(e.id,this.urlSerializer.serialize(e.extractedUrl),a,u);this.events.next(i),e.resolve(!1)}isUpdatingInternalState(){return this.currentTransition?.extractedUrl.toString()!==this.currentTransition?.currentUrlTree.toString()}isUpdatedBrowserUrl(){const e=this.urlHandlingStrategy.extract(this.urlSerializer.parse(this.location.path(!0))),a=this.currentNavigation?.targetBrowserUrl??this.currentNavigation?.extractedUrl;return e.toString()!==a?.toString()&&!this.currentNavigation?.extras.skipLocationChange}static#e=this.\u0275fac=function(a){return new(a||wh)};static#a=this.\u0275prov=oe({token:wh,factory:wh.\u0275fac,providedIn:"root"})}function ide(t){return t!==k2}class RF{static#e=this.\u0275fac=function(a){return new(a||RF)};static#a=this.\u0275prov=oe({token:RF,factory:()=>U(pv),providedIn:"root"})}class nde{shouldDetach(e){return!1}store(e,a){}shouldAttach(e){return!1}retrieve(e){return null}shouldReuseRoute(e,a){return e.routeConfig===a.routeConfig}}class pv extends nde{static#e=this.\u0275fac=(()=>{let e;return function(u){return(e||(e=Au(pv)))(u||pv)}})();static#a=this.\u0275prov=oe({token:pv,factory:pv.\u0275fac,providedIn:"root"})}class B2{static#e=this.\u0275fac=function(a){return new(a||B2)};static#a=this.\u0275prov=oe({token:B2,factory:()=>U(gv),providedIn:"root"})}class gv extends B2{constructor(){super(...arguments),this.location=U(xc),this.urlSerializer=U(wc),this.options=U(cv,{optional:!0})||{},this.canceledNavigationResolution=this.options.canceledNavigationResolution||"replace",this.urlHandlingStrategy=U(mv),this.urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred",this.currentUrlTree=new bp,this.rawUrlTree=this.currentUrlTree,this.currentPageId=0,this.lastSuccessfulId=-1,this.routerState=eG(null),this.stateMemento=this.createStateMemento()}getCurrentUrlTree(){return this.currentUrlTree}getRawUrlTree(){return this.rawUrlTree}restoredState(){return this.location.getState()}get browserPageId(){return"computed"!==this.canceledNavigationResolution?this.currentPageId:this.restoredState()?.\u0275routerPageId??this.currentPageId}getRouterState(){return this.routerState}createStateMemento(){return{rawUrlTree:this.rawUrlTree,currentUrlTree:this.currentUrlTree,routerState:this.routerState}}registerNonRouterCurrentEntryChangeListener(e){return this.location.subscribe(a=>{"popstate"===a.type&&e(a.url,a.state)})}handleRouterEvent(e,a){if(e instanceof wF)this.stateMemento=this.createStateMemento();else if(e instanceof iv)this.rawUrlTree=a.initialUrl;else if(e instanceof qj){if("eager"===this.urlUpdateStrategy&&!a.extras.skipLocationChange){const u=this.urlHandlingStrategy.merge(a.finalUrl,a.initialUrl);this.setBrowserUrl(a.targetBrowserUrl??u,a)}}else e instanceof JM?(this.currentUrlTree=a.finalUrl,this.rawUrlTree=this.urlHandlingStrategy.merge(a.finalUrl,a.initialUrl),this.routerState=a.targetRouterState,"deferred"===this.urlUpdateStrategy&&!a.extras.skipLocationChange&&this.setBrowserUrl(a.targetBrowserUrl??this.rawUrlTree,a)):e instanceof fp&&(e.code===Co.GuardRejected||e.code===Co.NoDataFromResolver)?this.restoreHistory(a):e instanceof UM?this.restoreHistory(a,!0):e instanceof qs&&(this.lastSuccessfulId=e.id,this.currentPageId=this.browserPageId)}setBrowserUrl(e,a){const u=e instanceof bp?this.urlSerializer.serialize(e):e;if(this.location.isCurrentPathEqualTo(u)||a.extras.replaceUrl){const i=this.browserPageId,r={...a.extras.state,...this.generateNgRouterState(a.id,i)};this.location.replaceState(u,"",r)}else{const i={...a.extras.state,...this.generateNgRouterState(a.id,this.browserPageId+1)};this.location.go(u,"",i)}}restoreHistory(e,a=!1){if("computed"===this.canceledNavigationResolution){const u=this.browserPageId,i=this.currentPageId-u;0!==i?this.location.historyGo(i):this.currentUrlTree===e.finalUrl&&0===i&&(this.resetState(e),this.resetUrlToCurrentUrlTree())}else"replace"===this.canceledNavigationResolution&&(a&&this.resetState(e),this.resetUrlToCurrentUrlTree())}resetState(e){this.routerState=this.stateMemento.routerState,this.currentUrlTree=this.stateMemento.currentUrlTree,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,e.finalUrl??this.rawUrlTree)}resetUrlToCurrentUrlTree(){this.location.replaceState(this.urlSerializer.serialize(this.rawUrlTree),"",this.generateNgRouterState(this.lastSuccessfulId,this.currentPageId))}generateNgRouterState(e,a){return"computed"===this.canceledNavigationResolution?{navigationId:e,\u0275routerPageId:a}:{navigationId:e}}static#e=this.\u0275fac=(()=>{let e;return function(u){return(e||(e=Au(gv)))(u||gv)}})();static#a=this.\u0275prov=oe({token:gv,factory:gv.\u0275fac,providedIn:"root"})}var Ev;function kG(t,e){t.events.pipe(Jt(a=>a instanceof qs||a instanceof fp||a instanceof UM||a instanceof iv),aa(a=>a instanceof qs||a instanceof iv?Ev.COMPLETE:a instanceof fp&&(a.code===Co.Redirect||a.code===Co.SupersededByNewNavigation)?Ev.REDIRECTING:Ev.FAILED),Jt(a=>a!==Ev.REDIRECTING),gu(1)).subscribe(()=>{e()})}function rde(t){throw t}!function(t){t[t.COMPLETE=0]="COMPLETE",t[t.FAILED=1]="FAILED",t[t.REDIRECTING=2]="REDIRECTING"}(Ev||(Ev={}));const ode={paths:"exact",fragment:"ignored",matrixParams:"ignored",queryParams:"exact"},lde={paths:"subset",fragment:"ignored",matrixParams:"ignored",queryParams:"subset"};class gr{get currentUrlTree(){return this.stateManager.getCurrentUrlTree()}get rawUrlTree(){return this.stateManager.getRawUrlTree()}get events(){return this._events}get routerState(){return this.stateManager.getRouterState()}constructor(){this.disposed=!1,this.console=U(q1),this.stateManager=U(B2),this.options=U(cv,{optional:!0})||{},this.pendingTasks=U(na),this.urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred",this.navigationTransitions=U(wh),this.urlSerializer=U(wc),this.location=U(xc),this.urlHandlingStrategy=U(mv),this._events=new sa,this.errorHandler=this.options.errorHandler||rde,this.navigated=!1,this.routeReuseStrategy=U(RF),this.onSameUrlNavigation=this.options.onSameUrlNavigation||"ignore",this.config=U(hv,{optional:!0})?.flat()??[],this.componentInputBindingEnabled=!!U(MF,{optional:!0}),this.eventsSubscription=new wa,this.resetConfig(this.config),this.navigationTransitions.setupNavigations(this,this.currentUrlTree,this.routerState).subscribe({error:e=>{this.console.warn(e)}}),this.subscribeToNavigationEvents()}subscribeToNavigationEvents(){const e=this.navigationTransitions.events.subscribe(a=>{try{const u=this.navigationTransitions.currentTransition,i=this.navigationTransitions.currentNavigation;if(null!==u&&null!==i)if(this.stateManager.handleRouterEvent(a,i),a instanceof fp&&a.code!==Co.Redirect&&a.code!==Co.SupersededByNewNavigation)this.navigated=!0;else if(a instanceof qs)this.navigated=!0;else if(a instanceof BF){const r=a.navigationBehaviorOptions,o=this.urlHandlingStrategy.merge(a.url,u.currentRawUrl),d={browserUrl:u.extras.browserUrl,info:u.extras.info,skipLocationChange:u.extras.skipLocationChange,replaceUrl:u.extras.replaceUrl||"eager"===this.urlUpdateStrategy||ide(u.source),...r};this.scheduleNavigation(o,k2,null,d,{resolve:u.resolve,reject:u.reject,promise:u.promise})}(function dde(t){return!(t instanceof JM||t instanceof BF)})(a)&&this._events.next(a)}catch(u){this.navigationTransitions.transitionAbortSubject.next(u)}});this.eventsSubscription.add(e)}resetRootComponentType(e){this.routerState.root.component=e,this.navigationTransitions.rootComponentType=e}initialNavigation(){this.setUpLocationChangeListener(),this.navigationTransitions.hasRequestedNavigation||this.navigateToSyncWithBrowser(this.location.path(!0),k2,this.stateManager.restoredState())}setUpLocationChangeListener(){this.nonRouterCurrentEntryChangeSubscription??=this.stateManager.registerNonRouterCurrentEntryChangeListener((e,a)=>{setTimeout(()=>{this.navigateToSyncWithBrowser(e,"popstate",a)},0)})}navigateToSyncWithBrowser(e,a,u){const i={replaceUrl:!0},r=u?.navigationId?u:null;if(u){const d={...u};delete d.navigationId,delete d.\u0275routerPageId,0!==Object.keys(d).length&&(i.state=d)}const o=this.parseUrl(e);this.scheduleNavigation(o,a,r,i)}get url(){return this.serializeUrl(this.currentUrlTree)}getCurrentNavigation(){return this.navigationTransitions.currentNavigation}get lastSuccessfulNavigation(){return this.navigationTransitions.lastSuccessfulNavigation}resetConfig(e){this.config=e.map(nL),this.navigated=!1}ngOnDestroy(){this.dispose()}dispose(){this.navigationTransitions.complete(),this.nonRouterCurrentEntryChangeSubscription&&(this.nonRouterCurrentEntryChangeSubscription.unsubscribe(),this.nonRouterCurrentEntryChangeSubscription=void 0),this.disposed=!0,this.eventsSubscription.unsubscribe()}createUrlTree(e,a={}){const{relativeTo:u,queryParams:i,fragment:r,queryParamsHandling:o,preserveFragment:d}=a,h=d?this.currentUrlTree.fragment:r;let g,m=null;switch(o){case"merge":m={...this.currentUrlTree.queryParams,...i};break;case"preserve":m=this.currentUrlTree.queryParams;break;default:m=i||null}null!==m&&(m=this.removeEmptyProps(m));try{g=Gj(u?u.snapshot:this.routerState.snapshot.root)}catch{("string"!=typeof e[0]||"/"!==e[0][0])&&(e=[]),g=this.currentUrlTree.root}return Kj(g,e,m,h??null)}navigateByUrl(e,a={skipLocationChange:!1}){const u=xp(e)?e:this.parseUrl(e),i=this.urlHandlingStrategy.merge(u,this.rawUrlTree);return this.scheduleNavigation(i,k2,null,a)}navigate(e,a={skipLocationChange:!1}){return function sde(t){for(let e=0;e(null!=i&&(a[u]=i),a),{})}scheduleNavigation(e,a,u,i,r){if(this.disposed)return Promise.resolve(!1);let o,d,h;r?(o=r.resolve,d=r.reject,h=r.promise):h=new Promise((g,v)=>{o=g,d=v});const m=this.pendingTasks.add();return kG(this,()=>{queueMicrotask(()=>this.pendingTasks.remove(m))}),this.navigationTransitions.handleNavigationRequest({source:a,restoredState:u,currentUrlTree:this.currentUrlTree,currentRawUrl:this.currentUrlTree,rawUrl:e,extras:i,resolve:o,reject:d,promise:h,currentSnapshot:this.routerState.snapshot,currentRouterState:this.routerState}),h.catch(g=>Promise.reject(g))}static#e=this.\u0275fac=function(a){return new(a||gr)};static#a=this.\u0275prov=oe({token:gr,factory:gr.\u0275fac,providedIn:"root"})}class Bh{constructor(e,a,u,i,r,o){this.router=e,this.route=a,this.tabIndexAttribute=u,this.renderer=i,this.el=r,this.locationStrategy=o,this.href=null,this.onChanges=new sa,this.preserveFragment=!1,this.skipLocationChange=!1,this.replaceUrl=!1,this.routerLinkInput=null;const d=r.nativeElement.tagName?.toLowerCase();this.isAnchorElement="a"===d||"area"===d,this.isAnchorElement?this.subscription=e.events.subscribe(h=>{h instanceof qs&&this.updateHref()}):this.setTabIndexIfNotOnNativeEl("0")}setTabIndexIfNotOnNativeEl(e){null!=this.tabIndexAttribute||this.isAnchorElement||this.applyAttributeValue("tabindex",e)}ngOnChanges(e){this.isAnchorElement&&this.updateHref(),this.onChanges.next(this)}set routerLink(e){null==e?(this.routerLinkInput=null,this.setTabIndexIfNotOnNativeEl(null)):(xp(e)?this.routerLinkInput=e:this.routerLinkInput=Array.isArray(e)?e:[e],this.setTabIndexIfNotOnNativeEl("0"))}onClick(e,a,u,i,r){const o=this.urlTree;if(null===o||this.isAnchorElement&&(0!==e||a||u||i||r||"string"==typeof this.target&&"_self"!=this.target))return!0;const d={skipLocationChange:this.skipLocationChange,replaceUrl:this.replaceUrl,state:this.state,info:this.info};return this.router.navigateByUrl(o,d),!this.isAnchorElement}ngOnDestroy(){this.subscription?.unsubscribe()}updateHref(){const e=this.urlTree;this.href=null!==e&&this.locationStrategy?this.locationStrategy?.prepareExternalUrl(this.router.serializeUrl(e)):null;const a=null===this.href?null:j6(this.href,this.el.nativeElement.tagName.toLowerCase(),"href");this.applyAttributeValue("href",a)}applyAttributeValue(e,a){const u=this.renderer,i=this.el.nativeElement;null!==a?u.setAttribute(i,e,a):u.removeAttribute(i,e)}get urlTree(){return null===this.routerLinkInput?null:xp(this.routerLinkInput)?this.routerLinkInput:this.router.createUrlTree(this.routerLinkInput,{relativeTo:void 0!==this.relativeTo?this.relativeTo:this.route,queryParams:this.queryParams,fragment:this.fragment,queryParamsHandling:this.queryParamsHandling,preserveFragment:this.preserveFragment})}static#e=this.\u0275fac=function(a){return new(a||Bh)(X(gr),X(rv),Zd("tabindex"),X(Vn),X(Rt),X(js))};static#a=this.\u0275dir=Me({type:Bh,selectors:[["","routerLink",""]],hostVars:1,hostBindings:function(a,u){1&a&&Qu("click",function(r){return u.onClick(r.button,r.ctrlKey,r.shiftKey,r.altKey,r.metaKey)}),2&a&&dr("target",u.target)},inputs:{target:"target",queryParams:"queryParams",fragment:"fragment",queryParamsHandling:"queryParamsHandling",state:"state",info:"info",relativeTo:"relativeTo",preserveFragment:[2,"preserveFragment","preserveFragment",au],skipLocationChange:[2,"skipLocationChange","skipLocationChange",au],replaceUrl:[2,"replaceUrl","replaceUrl",au],routerLink:"routerLink"},standalone:!0,features:[s,nn]})}class vv{get isActive(){return this._isActive}constructor(e,a,u,i,r){this.router=e,this.element=a,this.renderer=u,this.cdr=i,this.link=r,this.classes=[],this._isActive=!1,this.routerLinkActiveOptions={exact:!1},this.isActiveChange=new Ue,this.routerEventsSubscription=e.events.subscribe(o=>{o instanceof qs&&this.update()})}ngAfterContentInit(){$e(this.links.changes,$e(null)).pipe(PE()).subscribe(e=>{this.update(),this.subscribeToEachLinkOnChanges()})}subscribeToEachLinkOnChanges(){this.linkInputChangesSubscription?.unsubscribe();const e=[...this.links.toArray(),this.link].filter(a=>!!a).map(a=>a.onChanges);this.linkInputChangesSubscription=qi(e).pipe(PE()).subscribe(a=>{this._isActive!==this.isLinkActive(this.router)(a)&&this.update()})}set routerLinkActive(e){const a=Array.isArray(e)?e:e.split(" ");this.classes=a.filter(u=>!!u)}ngOnChanges(e){this.update()}ngOnDestroy(){this.routerEventsSubscription.unsubscribe(),this.linkInputChangesSubscription?.unsubscribe()}update(){!this.links||!this.router.navigated||queueMicrotask(()=>{const e=this.hasActiveLinks();this.classes.forEach(a=>{e?this.renderer.addClass(this.element.nativeElement,a):this.renderer.removeClass(this.element.nativeElement,a)}),e&&void 0!==this.ariaCurrentWhenActive?this.renderer.setAttribute(this.element.nativeElement,"aria-current",this.ariaCurrentWhenActive.toString()):this.renderer.removeAttribute(this.element.nativeElement,"aria-current"),this._isActive!==e&&(this._isActive=e,this.cdr.markForCheck(),this.isActiveChange.emit(e))})}isLinkActive(e){const a=function cde(t){return!!t.paths}(this.routerLinkActiveOptions)?this.routerLinkActiveOptions:this.routerLinkActiveOptions.exact||!1;return u=>{const i=u.urlTree;return!!i&&e.isActive(i,a)}}hasActiveLinks(){const e=this.isLinkActive(this.router);return this.link&&e(this.link)||this.links.some(e)}static#e=this.\u0275fac=function(a){return new(a||vv)(X(gr),X(Rt),X(Vn),X(Xu),X(Bh,8))};static#a=this.\u0275dir=Me({type:vv,selectors:[["","routerLinkActive",""]],contentQueries:function(a,u,i){if(1&a&&Wr(i,Bh,5),2&a){let r;Li(r=Ti())&&(u.links=r)}},inputs:{routerLinkActiveOptions:"routerLinkActiveOptions",ariaCurrentWhenActive:"ariaCurrentWhenActive",routerLinkActive:"routerLinkActive"},outputs:{isActiveChange:"isActiveChange"},exportAs:["routerLinkActive"],standalone:!0,features:[nn]})}class xG{}class HF{preload(e,a){return a().pipe(vp(()=>$e(null)))}static#e=this.\u0275fac=function(a){return new(a||HF)};static#a=this.\u0275prov=oe({token:HF,factory:HF.\u0275fac,providedIn:"root"})}class VF{preload(e,a){return $e(null)}static#e=this.\u0275fac=function(a){return new(a||VF)};static#a=this.\u0275prov=oe({token:VF,factory:VF.\u0275fac,providedIn:"root"})}class S2{constructor(e,a,u,i,r){this.router=e,this.injector=u,this.preloadingStrategy=i,this.loader=r}setUpPreloading(){this.subscription=this.router.events.pipe(Jt(e=>e instanceof qs),dp(()=>this.preload())).subscribe(()=>{})}preload(){return this.processRoutes(this.injector,this.router.config)}ngOnDestroy(){this.subscription&&this.subscription.unsubscribe()}processRoutes(e,a){const u=[];for(const i of a){i.providers&&!i._injector&&(i._injector=_(i.providers,e,`Route: ${i.path}`));const r=i._injector??e,o=i._loadedInjector??r;(i.loadChildren&&!i._loadedRoutes&&void 0===i.canLoad||i.loadComponent&&!i._loadedComponent)&&u.push(this.preloadConfig(r,i)),(i.children||i._loadedRoutes)&&u.push(this.processRoutes(o,i.children??i._loadedRoutes))}return qi(u).pipe(PE())}preloadConfig(e,a){return this.preloadingStrategy.preload(a,()=>{let u;u=a.loadChildren&&void 0===a.canLoad?this.loader.loadChildren(e,a):$e(null);const i=u.pipe(jn(r=>null===r?$e(void 0):(a._loadedRoutes=r.routes,a._loadedInjector=r.injector,this.processRoutes(r.injector??e,r.routes))));if(a.loadComponent&&!a._loadedComponent){return qi([i,this.loader.loadComponent(a)]).pipe(PE())}return i})}static#e=this.\u0275fac=function(a){return new(a||S2)(ye(gr),ye(pc),ye(tn),ye(xG),ye(yp))};static#a=this.\u0275prov=oe({token:S2,factory:S2.\u0275fac,providedIn:"root"})}const rL=new he("");class z2{constructor(e,a,u,i,r={}){this.urlSerializer=e,this.transitions=a,this.viewportScroller=u,this.zone=i,this.options=r,this.lastId=0,this.lastSource="imperative",this.restoredId=0,this.store={},r.scrollPositionRestoration||="disabled",r.anchorScrolling||="disabled"}init(){"disabled"!==this.options.scrollPositionRestoration&&this.viewportScroller.setHistoryScrollRestoration("manual"),this.routerEventsSubscription=this.createScrollEvents(),this.scrollEventsSubscription=this.consumeScrollEvents()}createScrollEvents(){return this.transitions.events.subscribe(e=>{e instanceof wF?(this.store[this.lastId]=this.viewportScroller.getScrollPosition(),this.lastSource=e.navigationTrigger,this.restoredId=e.restoredState?e.restoredState.navigationId:0):e instanceof qs?(this.lastId=e.id,this.scheduleScrollEvent(e,this.urlSerializer.parse(e.urlAfterRedirects).fragment)):e instanceof iv&&e.code===x2.IgnoredSameUrlNavigation&&(this.lastSource=void 0,this.restoredId=0,this.scheduleScrollEvent(e,this.urlSerializer.parse(e.url).fragment))})}consumeScrollEvents(){return this.transitions.events.subscribe(e=>{e instanceof Yj&&(e.position?"top"===this.options.scrollPositionRestoration?this.viewportScroller.scrollToPosition([0,0]):"enabled"===this.options.scrollPositionRestoration&&this.viewportScroller.scrollToPosition(e.position):e.anchor&&"enabled"===this.options.anchorScrolling?this.viewportScroller.scrollToAnchor(e.anchor):"disabled"!==this.options.scrollPositionRestoration&&this.viewportScroller.scrollToPosition([0,0]))})}scheduleScrollEvent(e,a){this.zone.runOutsideAngular(()=>{setTimeout(()=>{this.zone.run(()=>{this.transitions.events.next(new Yj(e,"popstate"===this.lastSource?this.store[this.restoredId]:null,a))})},0)})}ngOnDestroy(){this.routerEventsSubscription?.unsubscribe(),this.scrollEventsSubscription?.unsubscribe()}static#e=this.\u0275fac=function(a){oC()};static#a=this.\u0275prov=oe({token:z2,factory:z2.\u0275fac})}function fG(t){return t.routerState.root}function Ys(t,e){return{\u0275kind:t,\u0275providers:e}}new he("",{providedIn:"root",factory:()=>!1});function DG(){const t=U(su);return e=>{const a=t.get(An);if(e!==a.components[0])return;const u=t.get(gr),i=t.get(CG);1===t.get(oL)&&u.initialNavigation(),t.get(yG,null,Ja.Optional)?.setUpPreloading(),t.get(rL,null,Ja.Optional)?.init(),u.resetRootComponentType(a.componentTypes[0]),i.closed||(i.next(),i.complete(),i.unsubscribe())}}const CG=new he("",{factory:()=>new sa}),oL=new he("",{providedIn:"root",factory:()=>1});const yG=new he("");function gde(t){return Ys(0,[{provide:yG,useExisting:S2},{provide:xG,useExisting:t}])}function vde(t){return Ys(9,[{provide:EG,useValue:tde},{provide:vG,useValue:{skipNextTransition:!!t?.skipInitialTransition,...t}}])}const _G=new he("ROUTER_FORROOT_GUARD"),bde=[xc,{provide:wc,useClass:DF},gr,Bc,{provide:rv,useFactory:fG,deps:[gr]},yp,[]];class _p{constructor(e){}static forRoot(e,a){return{ngModule:_p,providers:[bde,[],{provide:hv,multi:!0,useValue:e},{provide:_G,useFactory:Dde,deps:[[gr,new is,new Bd]]},{provide:cv,useValue:a||{}},a?.useHash?{provide:js,useClass:kx}:{provide:js,useClass:rE},{provide:rL,useFactory:()=>{const t=U(zz),e=U(rt),a=U(cv),u=U(wh),i=U(wc);return a.scrollOffset&&t.setOffset(a.scrollOffset),new z2(i,u,t,e,a)}},a?.preloadingStrategy?gde(a.preloadingStrategy).\u0275providers:[],a?.initialNavigation?Cde(a):[],a?.bindToComponentInputs?Ys(8,[ov,{provide:MF,useExisting:ov}]).\u0275providers:[],a?.enableViewTransitions?vde().\u0275providers:[],[{provide:FG,useFactory:DG},{provide:h_,multi:!0,useExisting:FG}]]}}static forChild(e){return{ngModule:_p,providers:[{provide:hv,multi:!0,useValue:e}]}}static#e=this.\u0275fac=function(a){return new(a||_p)(ye(_G,8))};static#a=this.\u0275mod=kn({type:_p,imports:[Dp,Bh,vv,Cp],exports:[Dp,Bh,vv,Cp]});static#t=this.\u0275inj=$u({})}function Dde(t){return"guarded"}function Cde(t){return["disabled"===t.initialNavigation?Ys(3,[{provide:c_,multi:!0,useFactory:()=>{const e=U(gr);return()=>{e.setUpLocationChangeListener()}}},{provide:oL,useValue:2}]).\u0275providers:[],"enabledBlocking"===t.initialNavigation?Ys(2,[{provide:oL,useValue:0},{provide:c_,multi:!0,deps:[su],useFactory:e=>{const a=e.get(OH,Promise.resolve());return()=>a.then(()=>new Promise(u=>{const i=e.get(gr),r=e.get(CG);kG(i,()=>{u(!0)}),e.get(wh).afterPreactivation=()=>(u(!0),r.closed?$e(void 0):r),i.initialNavigation()}))}}]).\u0275providers:[]]}const FG=new he("");new tE("18.1.3");let OF=class{constructor(e){this.router=e,this.title="Angular-SlickGrid"}ngOnInit(){this.router.events.pipe(Jt(e=>e instanceof qs)).pipe(vj(0)).subscribe(()=>{const e=document.querySelector(".nav-link.active");e&&e.scrollIntoView({block:"nearest"})})}static#e=this.ctorParameters=()=>[{type:gr}]};OF=Ze([ca({selector:"app-root",template:'\n\n
\n
\n
\n \n
\n\n
\n
\n \n
\n
\n
\n
',styles:[l0e()]}),Ct("design:paramtypes",[gr])],OF);let jF=class{constructor(){this.title="Angular-Slickgrid - Demo Site",this.subTitle="This site is to demo multiple usage of Angular-Slickgrid, choose an example from the left side menu"}};jF=Ze([ca({template:'
\n

{{title}}

\n
\n\n
\n\n

Quick intro

\n

\n One of the best javascript datagrid\n SlickGrid which was originally developed by @mleibman is now available to Angular. I have\n tried, and used, a few datagrids and SlickGrid beats most of them in terms of functionalities\n and performance (it can easily even handle a million row).\n

\n

Documentation

\n

\n The documentation is powered by GitBook and can be found at this link\n Angular-Slickgrid - Documentation, so be sure to consult it before opening any new issue.\n
\n The\n HOWTO - Quick Start\n is the best starting point to get going with this library.\n

\n\n
\n Like my work? You can support me with caffeine :)\n\n

\n\n \n \'Buy\n \n
\n'})],jF);var Fde=O(145),Ade=O.n(Fde);var zu;!function(t){t.local="local",t.remote="remote"}(zu||(zu={}));class AG{constructor(e){this.rxjs=e,this._infiniteScrollBottomHit=!1}addRxJsResource(e){this.rxjs=e}executeBackendProcessesCallback(e,a,u,i){const r=new Date;a&&u.service.postProcess&&u.service.postProcess(a),a&&u?.internalPostProcess&&u.internalPostProcess(a),void 0!==u.postProcess&&(a instanceof Object&&(a.metrics={startTime:e,endTime:r,executionTime:r.valueOf()-e.valueOf(),itemCount:i,totalItemCount:i},u.service.options?.infiniteScroll&&(a.infiniteScrollBottomHit=this._infiniteScrollBottomHit,delete a.itemCount)),u.postProcess(a),this.setInfiniteScrollBottomHit(!1))}onBackendError(e,a){if("function"!=typeof a?.onError)throw e;a.onError(e)}executeBackendCallback(e,a,u,i,r,o){if(e){u&&!u.clearFilterTriggered&&!u.clearSortTriggered&&o?.emitActionChangedCallback&&o.emitActionChangedCallback.call(this,zu.remote);const d=e.process(a);if(d instanceof Promise&&d.then)d.then(h=>{this.executeBackendProcessesCallback(i,h,e,r),o?.successCallback?.call(this,u)}).catch(h=>{o?.errorCallback?.call(this,u),this.onBackendError(h,e)});else if(this.rxjs?.isObservable(d)){const h=this.rxjs;h.isObservable(o?.httpCancelRequestSubject)&&o?.httpCancelRequestSubject.next(),d.pipe(h.takeUntil(h.iif(()=>h.isObservable(o?.httpCancelRequestSubject),o?.httpCancelRequestSubject,h.EMPTY))).subscribe(m=>{this.executeBackendProcessesCallback(i,m,e,r),o?.successCallback?.call(this,u)},m=>{o?.errorCallback?.call(this,u),this.onBackendError(m,e)})}}}refreshBackendDataset(e){let a="";const u=e?.backendServiceApi;if(!u||!u.service||!u.process)throw new Error('BackendServiceApi requires at least a "process" function and a "service" defined');if(u.service&&(a=u.service.buildQuery()),a&&""!==a){const i=new Date;u.preProcess&&u.preProcess();const r=e?.pagination?.totalItems??0;this.executeBackendCallback(u,a,null,i,r)}}setInfiniteScrollBottomHit(e){this._infiniteScrollBottomHit=e}}function M2(t,e){["pop","push","reverse","shift","unshift","splice","sort"].forEach(u=>{t[u]=(...i)=>{const r=Array.prototype[u].apply(t,i);return e.apply(t,[t,i]),r}})}function GF(t,e,a){let u=t[e];Object.defineProperty(t,e,{configurable:!0,get:()=>u,set(i){u=i,a.apply(t,[i,t[e]])}})}Array.prototype.map,Array.prototype.reduce;const Sde=t=>t;class ue{}var Fp,$r,Ea;ue.locales={TEXT_ALL_SELECTED:"All Selected",TEXT_ALL_X_RECORDS_SELECTED:"All {{x}} records selected",TEXT_APPLY_MASS_UPDATE:"Apply Mass Update",TEXT_APPLY_TO_SELECTION:"Update Selection",TEXT_CANCEL:"Cancel",TEXT_CLEAR_ALL_FILTERS:"Clear all Filters",TEXT_CLEAR_ALL_GROUPING:"Clear all Grouping",TEXT_CLEAR_ALL_SORTING:"Clear all Sorting",TEXT_CLEAR_PINNING:"Unfreeze Columns/Rows",TEXT_CLONE:"Clone",TEXT_COLLAPSE_ALL_GROUPS:"Collapse all Groups",TEXT_CONTAINS:"Contains",TEXT_COLUMNS:"Columns",TEXT_COLUMN_RESIZE_BY_CONTENT:"Resize by Content",TEXT_COMMANDS:"Commands",TEXT_COPY:"Copy",TEXT_DROP_COLUMN_HEADER_TO_GROUP_BY:"Drop a column header here to group by the column",TEXT_EQUALS:"Equals",TEXT_EQUAL_TO:"Equal to",TEXT_ENDS_WITH:"Ends With",TEXT_ERROR_EDITABLE_GRID_REQUIRED:"Your grid must be editable in order to use the Composite Editor Modal.",TEXT_ERROR_ENABLE_CELL_NAVIGATION_REQUIRED:'Composite Editor requires the flag "enableCellNavigation" to be set to True in your Grid Options.',TEXT_ERROR_NO_CHANGES_DETECTED:"Sorry we could not detect any changes.",TEXT_ERROR_NO_EDITOR_FOUND:"We could not find any Editor in your Column Definition.",TEXT_ERROR_NO_RECORD_FOUND:"No records selected for edit or clone operation.",TEXT_ERROR_ROW_NOT_EDITABLE:"Current row is not editable.",TEXT_ERROR_ROW_SELECTION_REQUIRED:"You must select some rows before trying to apply new value(s).",TEXT_EXPAND_ALL_GROUPS:"Expand all Groups",TEXT_EXPORT_TO_CSV:"Export in CSV format",TEXT_EXPORT_TO_TEXT_FORMAT:"Export in Text format (Tab delimited)",TEXT_EXPORT_TO_EXCEL:"Export to Excel",TEXT_EXPORT_TO_TAB_DELIMITED:"Export in Text format (Tab delimited)",TEXT_FORCE_FIT_COLUMNS:"Force fit columns",TEXT_FILTER_SHORTCUTS:"Filter Shortcuts",TEXT_FREEZE_COLUMNS:"Freeze Columns",TEXT_GREATER_THAN:"Greater than",TEXT_GREATER_THAN_OR_EQUAL_TO:"Greater than or equal to",TEXT_GROUP_BY:"Group By",TEXT_HIDE_COLUMN:"Hide Column",TEXT_ITEMS:"items",TEXT_ITEMS_PER_PAGE:"items per page",TEXT_ITEMS_SELECTED:"items selected",TEXT_OF:"of",TEXT_OK:"OK",TEXT_LAST_UPDATE:"Last Update",TEXT_LESS_THAN:"Less than",TEXT_LESS_THAN_OR_EQUAL_TO:"Less than or equal to",TEXT_NOT_CONTAINS:"Not contains",TEXT_NOT_EQUAL_TO:"Not equal to",TEXT_PAGE:"Page",TEXT_RECORDS_SELECTED:"records selected",TEXT_REFRESH_DATASET:"Refresh Dataset",TEXT_REMOVE_FILTER:"Remove Filter",TEXT_REMOVE_SORT:"Remove Sort",TEXT_RESET_INPUT_VALUE:"Reset Input Value",TEXT_RESET_FORM:"Reset Form",TEXT_SAVE:"Save",TEXT_SELECT_ALL:"Select All",TEXT_SYNCHRONOUS_RESIZE:"Synchronous resize",TEXT_SORT_ASCENDING:"Sort Ascending",TEXT_SORT_DESCENDING:"Sort Descending",TEXT_STARTS_WITH:"Starts With",TEXT_TOGGLE_ALL_GROUPS:"Toggle all Groups",TEXT_TOGGLE_DARK_MODE:"Toggle Dark Mode",TEXT_TOGGLE_FILTER_ROW:"Toggle Filter Row",TEXT_TOGGLE_PRE_HEADER_ROW:"Toggle Pre-Header Row",TEXT_UNFREEZE_COLUMNS:"Unfreeze Columns",TEXT_X_OF_Y_SELECTED:"# of % selected",TEXT_X_OF_Y_MASS_SELECTED:"{{x}} of {{y}} selected"},ue.treeDataProperties={CHILDREN_PROP:"children",COLLAPSED_PROP:"__collapsed",HAS_CHILDREN_PROP:"__hasChildren",TREE_LEVEL_PROP:"__treeLevel",PARENT_PROP:"__parentId"},ue.DEFAULT_FORMATTER_NUMBER_MIN_DECIMAL=2,ue.DEFAULT_FORMATTER_NUMBER_MAX_DECIMAL=2,ue.DEFAULT_FORMATTER_CURRENCY_MIN_DECIMAL=2,ue.DEFAULT_FORMATTER_CURRENCY_MAX_DECIMAL=4,ue.DEFAULT_FORMATTER_PERCENT_MIN_DECIMAL=void 0,ue.DEFAULT_FORMATTER_PERCENT_MAX_DECIMAL=void 0,ue.DEFAULT_NUMBER_DECIMAL_SEPARATOR=".",ue.DEFAULT_NUMBER_THOUSAND_SEPARATOR="",ue.DEFAULT_NEGATIVE_NUMBER_WRAPPED_IN_BRAQUET=!1,ue.SLIDER_DEFAULT_MIN_VALUE=0,ue.SLIDER_DEFAULT_MAX_VALUE=100,ue.SLIDER_DEFAULT_STEP=1,ue.VALIDATION_REQUIRED_FIELD="Field is required",ue.VALIDATION_EDITOR_VALID_NUMBER="Please enter a valid number",ue.VALIDATION_EDITOR_VALID_INTEGER="Please enter a valid integer number",ue.VALIDATION_EDITOR_INTEGER_BETWEEN="Please enter a valid integer number between {{minValue}} and {{maxValue}}",ue.VALIDATION_EDITOR_INTEGER_MAX="Please enter a valid integer number that is lower than {{maxValue}}",ue.VALIDATION_EDITOR_INTEGER_MAX_INCLUSIVE="Please enter a valid integer number that is lower than or equal to {{maxValue}}",ue.VALIDATION_EDITOR_INTEGER_MIN="Please enter a valid integer number that is greater than {{minValue}}",ue.VALIDATION_EDITOR_INTEGER_MIN_INCLUSIVE="Please enter a valid integer number that is greater than or equal to {{minValue}}",ue.VALIDATION_EDITOR_NUMBER_BETWEEN="Please enter a valid number between {{minValue}} and {{maxValue}}",ue.VALIDATION_EDITOR_NUMBER_MAX="Please enter a valid number that is lower than {{maxValue}}",ue.VALIDATION_EDITOR_NUMBER_MAX_INCLUSIVE="Please enter a valid number that is lower than or equal to {{maxValue}}",ue.VALIDATION_EDITOR_NUMBER_MIN="Please enter a valid number that is greater than {{minValue}}",ue.VALIDATION_EDITOR_NUMBER_MIN_INCLUSIVE="Please enter a valid number that is greater than or equal to {{minValue}}",ue.VALIDATION_EDITOR_DECIMAL_BETWEEN="Please enter a valid number with a maximum of {{maxDecimal}} decimals",ue.VALIDATION_EDITOR_TEXT_LENGTH_BETWEEN="Please make sure your text length is between {{minLength}} and {{maxLength}} characters",ue.VALIDATION_EDITOR_TEXT_MAX_LENGTH="Please make sure your text is less than {{maxLength}} characters",ue.VALIDATION_EDITOR_TEXT_MAX_LENGTH_INCLUSIVE="Please make sure your text is less than or equal to {{maxLength}} characters",ue.VALIDATION_EDITOR_TEXT_MIN_LENGTH="Please make sure your text is more than {{minLength}} character(s)",ue.VALIDATION_EDITOR_TEXT_MIN_LENGTH_INCLUSIVE="Please make sure your text is at least {{minLength}} character(s)",function(t){t[t.camelCase=0]="camelCase",t[t.pascalCase=1]="pascalCase",t[t.snakeCase=2]="snakeCase",t[t.kebabCase=3]="kebabCase"}(Fp||(Fp={})),function(t){t.colon=":",t.comma=",",t.equalSign="=",t.pipe="|",t.semicolon=";",t.space=" ",t.tab="\t",t.doubleColon="::",t.doublePipe="||",t.doubleSemicolon=";;"}($r||($r={})),function(t){t.autoTooltip="autoTooltip",t.cellExternalCopyManager="cellExternalCopyManager",t.cellMenu="cellMenu",t.checkboxSelector="checkboxSelector",t.columnPicker="columnPicker",t.contextMenu="contextMenu",t.customTooltip="customTooltip",t.draggableGrouping="draggableGrouping",t.groupItemMetaProvider="groupItemMetaProvider",t.gridMenu="gridMenu",t.headerButton="headerButton",t.headerMenu="headerMenu",t.rowBasedEdit="rowBasedEdit",t.rowDetailView="rowDetailView",t.rowMoveManager="rowMoveManager",t.rowSelection="rowSelection"}(Ea||(Ea={}));const w={unknown:"unknown",string:"string",boolean:"boolean",integer:"integer",float:"float",number:"number",date:"date",dateIso:"dateIso",dateUtc:"dateUtc",dateTime:"dateTime",dateTimeIso:"dateTimeIso",dateTimeIsoAmPm:"dateTimeIsoAmPm",dateTimeIsoAM_PM:"dateTimeIsoAM_PM",dateTimeShortIso:"dateTimeShortIso",dateEuro:"dateEuro",dateEuroShort:"dateEuroShort",dateTimeShortEuro:"dateTimeShortEuro",dateTimeEuro:"dateTimeEuro",dateTimeEuroAmPm:"dateTimeEuroAmPm",dateTimeEuroAM_PM:"dateTimeEuroAM_PM",dateTimeEuroShort:"dateTimeEuroShort",dateTimeEuroShortAmPm:"dateTimeEuroShortAmPm",dateTimeEuroShortAM_PM:"dateTimeEuroShortAM_PM",dateUs:"dateUs",dateUsShort:"dateUsShort",dateTimeShortUs:"dateTimeShortUs",dateTimeUs:"dateTimeUs",dateTimeUsAmPm:"dateTimeUsAmPm",dateTimeUsAM_PM:"dateTimeUsAM_PM",dateTimeUsShort:"dateTimeUsShort",dateTimeUsShortAmPm:"dateTimeUsShortAmPm",dateTimeUsShortAM_PM:"dateTimeUsShortAM_PM",object:"object",password:"password",text:"text",readonly:"readonly"};var yt,L2,Er,te,xi,Gt,Sh;!function(t){t.csv="csv",t.txt="txt",t.xls="xls",t.xlsx="xlsx"}(yt||(yt={})),function(t){t.merge="merge",t.chain="chain"}(L2||(L2={})),function(t){t.columns="columns",t.filter="filter",t.pagination="pagination",t.pinning="pinning",t.rowSelection="rowSelection",t.sorter="sorter",t.treeData="treeData"}(Er||(Er={})),function(t){t.empty="",t.custom="Custom",t.contains="Contains",t.notContains="Not_Contains",t.lessThan="LT",t.lessThanOrEqual="LE",t.greaterThan="GT",t.greaterThanOrEqual="GE",t.notEqual="NE",t.equal="EQ",t.endsWith="EndsWith",t.rangeInclusive="RangeInclusive",t.rangeExclusive="RangeExclusive",t.startsWith="StartsWith",t.startsWithEndsWith="StartsWithEndsWith",t.in="IN",t.notIn="NOT_IN",t.inContains="IN_CONTAINS",t.notInContains="NOT_IN_CONTAINS",t.inCollection="IN_COLLECTION",t.notInCollection="NOT_IN_COLLECTION"}(te||(te={})),function(t){t.asc="asc",t.ASC="ASC",t.desc="desc",t.DESC="DESC"}(xi||(xi={})),function(t){t[t.asc=1]="asc",t[t.desc=-1]="desc",t[t.neutral=0]="neutral"}(Gt||(Gt={})),function(t){t.toggleCollapse="toggle-collapse",t.fullExpand="full-expand",t.fullCollapse="full-collapse",t.toggleExpand="toggle-expand"}(Sh||(Sh={}));class T2 extends Error{constructor(e){super(e),Object.setPrototypeOf(this,T2.prototype)}}function BG(t){let e=!1;return t instanceof Promise?{promise:t.then(a=>{if(e)throw new T2("Cancelled Promise");return a}),cancel:()=>e=!0}:t}function sL(t,e,a=""){let u=e;if(e instanceof Promise)return e;if(t.isObservable(e)&&(u=t.firstValueFrom(e)),!(u instanceof Promise))throw new Error(`Something went wrong, Slickgrid-Universal ${a} is not able to convert the Observable into a Promise.`);return u}function KF(t,e,a=0){const u=e?.childrenPropName??ue.treeDataProperties.CHILDREN_PROP;Array.isArray(t)&&t.forEach(i=>{i&&(Array.isArray(i[u])&&i[u].length>0&&(a++,KF(i[u],e,a),a--),i[e.levelPropName]=a)})}function P2(t,e,a=0,u=null){const i=e?.childrenPropName??ue.treeDataProperties.CHILDREN_PROP,{aggregator:r}=e;Array.isArray(t)&&t.forEach(o=>{if(o){const d=Array.isArray(o[i]);Array.isArray(o[i])&&o[i].length>0&&(r.init(o,!0),a++,P2(o[i],e,a,o),a--),u&&r.isInitialized&&"function"==typeof r.accumulate&&!o?.__filteredOut&&(r.accumulate(o,d),r.storeResult(u.__treeTotals)),o[e.levelPropName]=a}})}function SG(t,e){const a=e?.identifierPropName??"id",u=e?.childrenPropName??ue.treeDataProperties.CHILDREN_PROP,i=e?.hasChildrenPropName??ue.treeDataProperties.HAS_CHILDREN_PROP,r=e?.parentPropName??ue.treeDataProperties.PARENT_PROP,o=e?.levelPropName??ue.treeDataProperties.TREE_LEVEL_PROP;return e?.shouldAddTreeLevelNumber&&(e?.aggregators?e.aggregators.forEach(h=>{P2(t,{childrenPropName:u,levelPropName:o,aggregator:h})}):KF(t,{childrenPropName:u,levelPropName:o})),function zde(t,e,a=Sde,u=(()=>{})){const i=t&&t.length?[{pointer:t,offset:0}]:[],r=[];let o;for(;i.length;)for(o=i.pop();o.offseth[u],(h,m)=>({[a]:h[a],[r]:void 0!==m?m[a]:null,[i]:!!h[u],...LG(h,u)}))}function zG(t,e){const a=e?.identifierPropName??"id",u=e?.childrenPropName??ue.treeDataProperties.CHILDREN_PROP,i=e?.parentPropName??ue.treeDataProperties.PARENT_PROP,r=e?.levelPropName??ue.treeDataProperties.TREE_LEVEL_PROP,o=e?.collapsedPropName??ue.treeDataProperties.COLLAPSED_PROP,h=[],m={};return(t||[]).forEach(g=>m[g[a]]=g),Object.keys(m).forEach(g=>{const v=m[g];if(i in v&&null!==v[i]&&void 0!==v[i]&&""!==v[i]){if(v[i]in m){const k=m[v[i]];u in k||(k[u]=[]),k[u].push(v),void 0===k[o]&&(k[o]=e?.initiallyCollapsed??!1)}}else h.push(v)}),e?.aggregators?e.aggregators.forEach(g=>{P2(h,{childrenPropName:u,levelPropName:r,aggregator:g},0)}):KF(h,{childrenPropName:u,levelPropName:r},0),h}function zh(t,e,a){if(!a)throw new Error('findRecursive requires parameter "childrenPropertyName"');const u=t.find(e),i=t.filter(r=>r?.hasOwnProperty(a)&&r[a]);if(u)return u;if(i.length){const r=[];return i.forEach(o=>{o?.hasOwnProperty(a)&&r.push(...o[a])}),zh(r,e,a)}}function I0(t,e,a,u=".",i=""){if(isNaN(+t))return t;const r=void 0===e?2:e,o=void 0===a?2:a;let d=String(Math.round(+t*Math.pow(10,o))/Math.pow(10,o));for(d.indexOf(".")<0&&r>0&&(d+=".");d.length-d.indexOf(".")<=r;)d+="0";const h=d.split(".");let m,g;m=i?h.length>=1?Sc(h[0],i):void 0:h.length>=1?h[0]:d,h.length>1&&(g=h[1]);let v="";return void 0!==m&&void 0!==g?v=`${m}${u}${g}`:null!=m&&(v=m),v}function Mu(t,e,a,u,i="",r="",o=".",d=""){if(isNaN(+t))return t;const h=Math.round(1e6*parseFloat(t))/1e6;if(h<0){const m=Math.abs(h);if(u){if(!isNaN(e)||!isNaN(a))return`(${i}${I0(m,e,a,o,d)}${r})`;return`(${i}${Sc(`${m}`,d)}${r})`}if(!isNaN(e)||!isNaN(a))return`-${i}${I0(m,e,a,o,d)}${r}`;return`-${i}${Sc(`${m}`,d)}${r}`}if(!isNaN(e)||!isNaN(a))return`${i}${I0(t,e,a,o,d)}${r}`;return`${i}${Sc(`${t}`,d)}${r}`}function N2(t,e,a){if("function"==typeof t.queryFieldNameGetterFn){const u=t.queryFieldNameGetterFn(e);a=u?.indexOf(".")>=0?ti(e,u):e.hasOwnProperty(u)?e[u]:a}return a}function ti(t,e){return t&&e?e.split(".").reduce((a,u)=>a&&a[u],t):t}function Gl(t){return t&&t.translationNamespace?t.translationNamespace+(t.translationNamespaceSeparator||""):""}function I2(t){return t.outputType||t.type||w.string}function dL(t){switch(t){case w.date:case w.dateTime:case w.dateIso:case w.dateTimeIso:case w.dateTimeShortIso:case w.dateTimeIsoAmPm:case w.dateTimeIsoAM_PM:case w.dateEuro:case w.dateEuroShort:case w.dateTimeEuro:case w.dateTimeShortEuro:case w.dateTimeEuroAmPm:case w.dateTimeEuroAM_PM:case w.dateTimeEuroShort:case w.dateTimeEuroShortAmPm:case w.dateTimeEuroShortAM_PM:case w.dateUs:case w.dateUsShort:case w.dateTimeUs:case w.dateTimeShortUs:case w.dateTimeUsAmPm:case w.dateTimeUsAM_PM:case w.dateTimeUsShort:case w.dateTimeUsShortAmPm:case w.dateTimeUsShortAM_PM:case w.dateUtc:return!0;default:return!1}}function MG(t){let e;switch(t){case"<":case"LT":e=te.lessThan;break;case"<=":case"LE":e=te.lessThanOrEqual;break;case">":case"GT":e=te.greaterThan;break;case">=":case"GE":e=te.greaterThanOrEqual;break;case"!=":case"NE":e=te.notEqual;break;case"*":case"a*":case"StartsWith":e=te.startsWith;break;case"*z":case"EndsWith":e=te.endsWith;break;case"=":case"==":case"EQ":e=te.equal;break;case"IN":e=te.in;break;case"NIN":case"NOT_IN":e=te.notIn;break;case"<>":case"Not_Contains":case"NOT_CONTAINS":e=te.notContains;break;default:e=te.contains}return e}function bv(t){let e="";switch(t){case te.greaterThan:case">":e=">";break;case te.greaterThanOrEqual:case">=":e=">=";break;case te.lessThan:case"<":e="<";break;case te.lessThanOrEqual:case"<=":e="<=";break;case te.notEqual:case"<>":e="<>";break;case te.equal:case"=":case"==":case"EQ":e="=";break;case te.startsWith:case"a*":case"*":e="a*";break;case te.endsWith:case"*z":e="*z";break;default:e=t}return e}function R2(t){let e;if(dL(t))e=te.equal;else switch(t){case w.unknown:case w.string:case w.text:case w.password:case w.readonly:e=te.contains;break;case w.float:case w.number:default:e=te.equal}return e}function LG(t,e){return Object.keys(t).reduce((a,u)=>(u!==e&&(a[u]=t[u]),a),{})}function Sc(t,e=","){if(null!=t){const a=`${t}`,u=a.split(".");return 2===u.length?`${u[0].replace(/\B(?=(\d{3})+(?!\d))/g,e)}.${u[1]}`:a.replace(/\B(?=(\d{3})+(?!\d))/g,e)}return t}function zc(t,e,a={}){return Array.isArray(t)?t.find(e)||a:t}function H2(t){if(Array.isArray(t))for(;t.length>0;){const e=t.pop();e?.unsubscribe&&e.unsubscribe()}return t}function V2(t){let e=0,a=0,u=0,i=0;const r=window.innerHeight||0,o=window.innerWidth||0,d=hL(),h=d.top,m=d.left,g=Lu(t);if(g){const v=g.top,k=g.left;a=v-h,u=k-m,e=r-(v-h+t.clientHeight),i=o-(k-m+t.clientWidth)}return{top:a,bottom:e,left:u,right:i}}function T(t,e,a){const u=document.createElement(t);return e&&Object.keys(e).forEach(i=>{"innerHTML"===i&&console.warn(`[Slickgrid-Universal] For better CSP (Content Security Policy) support, do not use "innerHTML" directly in "createDomElement('${t}', { innerHTML: 'some html'})", it is better as separate assignment: "const elm = createDomElement('span'); elm.innerHTML = 'some html';"`);const r=e[i];"object"==typeof r?Object.assign(u[i],r):u[i]=e[i]}),a?.appendChild&&a.appendChild(u),u}function Kt(t=""){return t.split(" ").filter(e=>e)}function cL(t){"object"==typeof t&&Object.keys(t).forEach(e=>{Array.isArray(t[e])&&cL(t[e]),t[e]instanceof HTMLElement&&(t[e]=null)})}function _t(t){for(;t?.firstChild;)t.removeChild(t.firstChild);return t}function ui(t,e="innerHTML"){return t instanceof DocumentFragment?[].map.call(t.childNodes,a=>a[e]).join("")||t.textContent||"":t instanceof HTMLElement?t[e]:String(t??"")}function TG(t,e){if(!t||!e)return;const a=t.getBoundingClientRect(),u=e.getBoundingClientRect();return{top:u.top-a.top,right:u.right-a.right,bottom:u.bottom-a.bottom,left:u.left-a.left}}function Lu(t){let e=0,a=0,u=0,i=0;if(!t||!t.getBoundingClientRect)return{top:e,bottom:u,left:a,right:i};const r=t.getBoundingClientRect(),o=document.documentElement;return void 0!==r?.top&&void 0!==r.left&&(e=r.top+window.pageYOffset-o.clientTop,a=r.left+window.pageXOffset-o.clientLeft,i=r.right,u=r.bottom),{top:e,left:a,bottom:u,right:i}}function WF(t,e){let a=0;if(t){const i="height"===e?["top","bottom"]:["left","right"];a=t["height"===e?"clientHeight":"clientWidth"];for(const r of i){a-=parseFloat(PG(t,`padding-${r}`)||"")||0}}return a}function PG(t,e){return t?window.getComputedStyle(t).getPropertyValue(e):null}function O2(t,e){if(t)for(const a of e){const u=t.getAttribute(a);if(u)return u}return null}function Mc(t,e="auto"){return(/^[0-9]+$/i.test(`${t}`)?+t+"px":t)||e}function NG(t){const e="string"==typeof t?t:String(t),a={"&":"&","<":"<",">":">",'"':""","'":"'"};return(e||"").toString().replace(/[&<>"']/g,u=>a[u])}function IG(t){return t.replace(/&#(\d+);/g,(e,a)=>String.fromCharCode(a))}function RG(t,e){const a=t.length;let u=NG(t);if(a"u"||UF.call(e,i)},WG=function(e,a){OG&&"__proto__"===a.name?OG(e,a.name,{enumerable:!0,configurable:!0,value:a.newValue,writable:!0}):e[a.name]=a.newValue},UG=function(e,a){if("__proto__"===a){if(!UF.call(e,a))return;if(jG)return jG(e,a).value}return e[a]};function cu(...t){let e,a,u,i,r,o,d=t[0],h=1;const m=t.length;let g=!1;for("boolean"==typeof d&&(g=d,d=t[1]||{},h=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});hi[a]===e[a]):t.findIndex(i=>i===e),u<0&&t.push(e)}function kv(t,e=" "){let a="";for(let u=0;ue!==u)}function ZG(t){if(!Array.isArray(t)&&!Mh(t))return t;return cu(!0,Array.isArray(t)?[]:{},t)}function Ap(t,...e){if(!e.length)return t;const a=e.shift();return t=!Mh(t)&&Mh(a)?{}:t,Mh(t)&&Mh(a)&&Object.keys(a).forEach(u=>{a.hasOwnProperty(u)&&(u in t?"object"!=typeof t[u]||"object"!=typeof a[u]?t[u]=a[u]:t[u].concat&&a[u].concat?t[u]=t[u].concat(a[u]):t[u]=Ap(t[u],a[u]):t[u]=a[u])}),Ap(t,...e)}function $G(t){return Mh(t)&&Object.keys(t).forEach(e=>{t.hasOwnProperty(e)&&delete t[e]}),t=null,t={}}function pL(t,e=!0){let a=!1;return{params:(r=>{const h=r.toString().replace(/(\/\/.*$)|(\/\*[\s\S]*?\*\/)|(\s*=[^,)]*(('(?:\\'|[^'\r\n])*')|("(?:\\"|[^"\r\n])*"))|(\s*=[^,)]*))/gm,"");return h.slice(h.indexOf("(")+1,h.indexOf(")")).match(/([^\s,]+)/g)??[]})(t),body:(r=>{const o=r.toString();if(a=o.includes("async "),o.replaceAll(" ","").includes("=>({")){const m=o.match(/(({.*}))/g)||[];return m.length>=1?`return ${m[0].trimStart()}`:o}const d=!o.includes("{")&&o.includes("=>"),h=o.substring(o.indexOf("{")+1||o.indexOf("=>")+2,o.includes("}")?o.lastIndexOf("}"):o.length);return e&&d&&!h.startsWith("return")?"return "+h.trimStart():h})(t),isAsync:a}}function gL(t){return null==t||0===Object.entries(t).length}function xt(t){return null!=t&&""!==t}function wp(t){return null!==t&&!isNaN(t)&&""!==t}function Mh(t){return!(null===t||"object"!=typeof t||Array.isArray(t)||t instanceof Date)}function j2(t){return"boolean"==typeof t||"number"==typeof t||"string"==typeof t||null==t}function Bp(t){return t instanceof HTMLElement||t instanceof DocumentFragment||j2(t)}function Ma(t,e=!1){return e?null!=t&&"string"!=typeof t&&!isNaN(t):null!=t&&""!==t&&!isNaN(+t)}function qG(t){return!t||t&&"object"==typeof t&&0===Object.keys(t).length}function JF(t){return/(true|1)/i.test(t+"")}function xv(t,e=!1){const a="function"==typeof t.normalize?t.normalize("NFD").replace(/[\u0300-\u036f]/g,""):t;return e?a.toLowerCase():a}function vr(t,e,a){if("string"==typeof e&&(e=e.split(".")),e.length>1){const u=e.shift();t&&void 0!==u&&vr(t[u]=xt(t[u])&&(Array.isArray(t[u])||"[object Object]"===Object.prototype.toString.call(t[u]))?t[u]:{},e,a)}else t&&e[0]&&(t[e[0]]=a)}function yo(t,e=!1){return"string"==typeof t?e?t.replace(/\w\S*/g,a=>a.charAt(0).toUpperCase()+a.substring(1).toLowerCase()):t.charAt(0).toUpperCase()+t.slice(1):t}function EL(t){return"string"==typeof t?t.replace(/(?:^\w|[A-Z]|\b\w|[\s+\-_/])/g,(e,a)=>/[\s+\-_/]/.test(e)?"":0===a?e.toLowerCase():e.toUpperCase()):t}function fv(t){return"string"==typeof t?EL(t).replace(/([A-Z])|([-_])/g,"-$1").toLowerCase():t}function Qs(t){if("string"==typeof t){const e=t.replace(/([A-Z])|([-_])/g," $1").replace(/\s+/g," ").trim();return e.charAt(0).toUpperCase()+e.slice(1)}return t}function Tde(t){return"string"==typeof t?EL(t).replace(/([A-Z])/g,"_$1").toLowerCase():t}function YG(t){return Array.isArray(t)&&t.length>0?t.filter((e,a)=>t.indexOf(e)>=a):t}function Pde(t,e="id"){if(Array.isArray(t)&&t.length>0){const a=[],u=new Map;for(const i of t)i&&!u.has(i[e])&&(u.set(i[e],!0),a.push({id:i[e],name:i.name}));return a}return t}const G2=Symbol("plaintext"),QG=Symbol("html"),XG=Symbol("comment"),Nde=/<(\w*)>/g,Ide=/<\/?([^\s/>]+)/;function Tu(t,e,a){function o(h){let m=new Set;if("string"==typeof h){let g;for(;g=Nde.exec(h);)m.add(g[1])}else"function"==typeof h[Symbol.iterator]&&(m=new Set(h));return m}function d(h){const m=Ide.exec(h);return m?m[1].toLowerCase():null}return function u(h,m,g){if("string"!=typeof h&&(Ma(h)||"boolean"==typeof h))return String(h);if(h instanceof HTMLElement&&(h=h.innerHTML),"string"!=typeof h&&null!=h)throw new TypeError("'html' parameter must be a string");return function r(h,m){const g=m.allowable_tags,v=m.tag_replacement;let k=m.state,x=m.tag_buffer,D=m.depth,C=m.in_quote_char,F="";for(let A=0,z=h.length;A":if(C)break;if(D){D--;break}C="",k=G2,x+=">",g.has(d(x))?F+=x:F+=v,x="";break;case'"':case"'":C=M===C?"":C||M,x+=M;break;case"-":""===M)"--"===x.slice(-2)&&(k=G2),x="";else x+=M}return m.state=k,m.tag_buffer=x,m.depth=D,m.in_quote_char=C,F}(h||"",function i(h,m){return{allowable_tags:o(h),tag_replacement:m,state:G2,tag_buffer:"",depth:0,in_quote_char:""}}(m||"",g||""))}(t,e,a)}const eK=(t,e,a=Gt.neutral,u,i)=>{const r=u?.valueCouldBeUndefined??i?.cellValueCouldBeUndefined??!1,o=isNaN(t)||""===t||null===t||r&&void 0===t?-1/0:parseFloat(t),d=isNaN(e)||""===e||null===e||r&&void 0===e?-1/0:parseFloat(e);return a*(o===d?0:o>d?1:-1)};var aK=/^([0-9]{4})-([0-1][0-9])(?:-([0-3][0-9]))?(?:[T ]?([0-2][0-9])(?::([0-5][0-9]))?(?::([0-5][0-9]))?)?(?:\.[0-9]+)?(Z|(?:\+|\-)[0-9]{2}:?[0-9]{2})?$/;function Xs(t){if(t||(t=new Date),t instanceof Date){const e=new Date(t);return e.setMilliseconds(0),e}if(function Hde(t){const e=t.match(aK);if(e){const a=Number(e[2]);if(a<1||a>12)return!1;if(void 0!==typeof e[3]){const u=Number(e[3]);if(u<1||u>31)return!1}if(void 0!==typeof e[4]){const u=Number(e[4]);if(u<0||u>23)return!1}return!0}return!1}(t=t.trim()))return new Date(function Vde(t){const e=t.match(aK);return e&&typeof e[4]>"u"?t+="T00:00:00":t}(t));throw new Error(`Non ISO 8601 compliant date (${t}).`)}function K2(t,e=1){const a=Xs(t);return a.setDate(a.getDate()+e),a}var vL="1999-03-04T02:05:01.000Z",bL=new Map,kL=[["YYYY",{year:"numeric"}],["YY",{year:"2-digit"}],["MMMM",{month:"long"}],["MMM",{month:"short"}],["MM",{month:"2-digit"}],["M",{month:"numeric"}],["DD",{day:"2-digit"}],["D",{day:"numeric"}],["dddd",{weekday:"long"}],["ddd",{weekday:"short"}],["d",{weekday:"narrow"}],["mm",{minute:"2-digit"}],["m",{minute:"numeric"}],["ss",{second:"2-digit"}],["s",{second:"numeric"}],["ZZ",{timeZoneName:"long"}],["Z",{timeZoneName:"short"}]],xL=[["HH",{hour:"2-digit"}],["H",{hour:"numeric"}]],fL=[["hh",{hour:"2-digit"}],["h",{hour:"numeric"}],["a",{dayPeriod:"narrow"}],["A",{dayPeriod:"narrow"}]],ZF={DD:2,HH:2,MM:2,YY:2,YYYY:4,hh:2,mm:2,ss:2};function tK(t){if(/^[+-]\d{2}:\d{2}/.test(t))return 6;if(/^[+-]\d{4}/.test(t))return 5;throw new Error("Invalid offset format")}var Ode=["MMMM","MMM","dddd","ddd"],ii=new Map([...kL,...xL,...fL].map(t=>[t[0],t])),uK=new Map,iK=["full","long","medium","short"],Lh=t=>String(t).padStart(2,"0"),DL=t=>String(t).padStart(2,"0");function Lc(t){return"literal"===t.type&&(t.value=t.value.normalize("NFKC")),t}function jde(t,e,a,u=!1,i=null){const r=function Gde(t,e,a,u=!1){const i=Xs(t),r=e.filter(g=>g.hour12),o=e.filter(g=>!g.hour12),d=[],h=[];function m(g,v=!1){const k=`${a}-u-hc-${v?"h12":"h23"}`;if(d.push(...new Intl.DateTimeFormat(k,g.reduce((x,D)=>"literal"===D.partName?x:(u&&Ode.includes(D.token)&&h.push(D),Object.assign(x,D.option)),{timeZone:"UTC"})).formatToParts(i).map(Lc)),u&&h.length)for(const x of h){let D=[];switch(x.token){case"MMMM":D=new Intl.DateTimeFormat(k,{dateStyle:"long",timeZone:"UTC"}).formatToParts(i).map(Lc);break;case"MMM":D=new Intl.DateTimeFormat(k,{dateStyle:"medium",timeZone:"UTC"}).formatToParts(i).map(Lc)}const C=D.find(A=>A.type===x.partName),F=d.findIndex(A=>A.type===x.partName);C&&F>-1&&(d[F]=C)}}return r.length&&m(r,!0),o.length&&m(o),d.reduce((g,v)=>(g[v.type]=v.value,g),{})}(t,e,a,u),o=Xs(t);function d({partName:h,partValue:m,token:g}){if("literal"===h)return m;const v=r[h];if("hour"===h&&"H"===g)return v.replace(/^0/,"")||"0";if(["mm","ss","MM"].includes(g)&&1===v.length)return`0${v}`;if("dayPeriod"===h){const k=Dv(o.getUTCHours()<12?"am":"pm",a);return"A"===g?k.toUpperCase():k.toLowerCase()}return"timeZoneName"===h?i??nK(-1*o.getTimezoneOffset(),g):v}return e.map(h=>({...h,value:d(h)}))}function nK(t,e="Z"){const a=String(Math.floor(Math.abs(t/60))).padStart(2,"0"),u=String(Math.abs(t%60)).padStart(2,"0"),i=t<0?"-":"+";return"ZZ"===e?`${i}${a}${u}`:`${i}${a}:${u}`}function rK(t,e="Z"){if(!(u=>{switch(u){case"Z":return/^([+-])[0-3][0-9]:[0-6][0-9]$/.test(t);case"ZZ":return/^([+-])[0-3][0-9][0-6][0-9]$/.test(t)}})(e))throw new Error(`Invalid offset: ${t}`);return t}function Ude(t){return["numeric","2-digit"].includes(t.partValue)}function Dv(t,e){const a=uK.get(e);if(a&&a[t])return a[t];const u=new Date(vL);u.setUTCHours("am"===t?5:20);const r=new Intl.DateTimeFormat(e,{timeStyle:"full",timeZone:"UTC",hour12:!0}).formatToParts(u).map(Lc).find(o=>"dayPeriod"===o.type);if(r){const o=a||{};return uK.set(e,Object.assign(o,{[t]:r.value})),r.value}return t}function oK(t,e="+00:00"){const a=Xs(t),u=(()=>{switch(tK(e)){case 5:return"ZZ";case 6:return"Z"}})(),i=function Kde(t,e){rK(t,e);const[a,u,i,r]=t.match(/([+-])([0-3][0-9]):?([0-6][0-9])/),o=60*Number(i)+Number(r);return"+"===u?o:-o}(e,u);return new Date(a.getTime()+1e3*i*60)}function lK(){return Intl.DateTimeFormat().resolvedOptions().timeZone}function sK(t,e){const a=new Intl.DateTimeFormat("en-US",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZone:e,hourCycle:"h23"}).formatToParts(t).map(Lc),u={};return a.forEach(i=>{u[i.type]=i.value}),new Date(`${u.year}-${u.month}-${u.day}T${u.hour}:${u.minute}:${u.second}Z`)}function $F(t,e="UTC",a="device",u="Z"){var i;a="device"===a?null!=(i=lK())?i:"utc":a;const r=Xs(t),o=sK(r,e),d=sK(r,a);return nK(Math.round((d.getTime()-o.getTime())/1e3/60),u)}function dK(t){const e=Xs(t);return e.setHours(0,0,0),e}function CL(t,e){if(iK.includes(t)||"object"==typeof t)return function qde(t,e){const a={timeZone:"UTC"};"string"==typeof t?a.dateStyle=t:("date"in t&&(a.dateStyle=t.date),"time"in t&&(a.timeStyle=t.time));const u=new Intl.DateTimeFormat(e,a),i=u.formatToParts(new Date(vL)).map(Lc),o=u.formatToParts(new Date("1999-04-05T23:05:01.000Z")).map(Lc).find(h=>"hour"===h.type),d=o&&"23"===o.value?24:12;return i.map(h=>{const m=h.type,g=function Yde(t,e,a,u,i){const r=e.length,o=!isNaN(Number(e));let d;switch(t){case"year":return 2===r?ii.get("YY"):ii.get("YYYY");case"month":return o?1===r?ii.get("M"):ii.get("MM"):"long"===(d=cK(a,t,e),d)?ii.get("MMMM"):ii.get("MMM");case"day":return 1===r?ii.get("D"):ii.get("DD");case"weekday":switch(d=cK(a,t,e),d){case"narrow":return ii.get("d");case"short":return ii.get("ddd");default:return ii.get("dddd")}case"hour":return 12===u?1===r?ii.get("h"):ii.get("hh"):1===r?ii.get("H"):ii.get("HH");case"minute":return 1===r?ii.get("m"):ii.get("mm");case"second":return 1===r?ii.get("s"):ii.get("ss");case"dayPeriod":return/^[A-Z]+$/u.test(e)?ii.get("A"):ii.get("a");case"literal":return[e,{literal:e},new RegExp("")];case"timeZoneName":return"full"===i.timeStyle?ii.get("Z"):ii.get("ZZ");default:return}}(h.type,h.value,e,"hour"===h.type?d:void 0,a);if(void 0===g)return;const v=g[1][m];return v?(g[2]||(g[2]=new RegExp(`${g[0]}`,"g")),{option:{[m]:v},partName:m,partValue:v,token:g[0],pattern:g[2],hour12:12===d}):void 0}).filter(h=>!!h)}(t,e);let a=t,u=0;const i=g=>{if(g[2]||(g[2]=new RegExp(`(.)?(${g[0]})`,"g")),g[2].test(a)){let v=0;return a=a.replace(g[2],(k,x,D)=>"\\"===x?D:`${"string"==typeof x?x:""}{!${v++?u:u++}!}`),!!v}return!1};function o(g,[v,k,x]){const D=Object.keys(k)[0];return{option:k,partName:D,partValue:k[D],token:v,pattern:x,hour12:g}}const h=function r(g){const v=g.map(x=>x.partName),k=new Set(v);if(v.length>k.size)throw new Error("Cannot reuse format tokens.");return g}(kL.filter(i).concat(xL.filter(i)).map(o.bind(null,!1)).concat(fL.filter(i).map(o.bind(null,!0)))),m=/^\{!(\d+)!\}$/;return a.split(/(\{!\d+!\})/).map(g=>{const v=g.match(m);return v?h[Number(v[1])]:{option:{literal:g},partName:"literal",partValue:g,token:g,pattern:new RegExp(""),hour12:!1}}).filter(g=>!("literal"===g.partName&&""===g.partValue))}function cK(t,e,a){if(!bL.has(t)){const i=new Date(vL),r=[3,8,9,7,6,4,3],o=["weekday","month","dayPeriod"],d=["long","short","narrow"],h={};for(let m=0;m<12;m++){i.setMonth(0+m),m in r&&i.setDate(r[m]),i.setUTCHours(8+m);for(const g of d){const v=new Intl.DateTimeFormat(t,o.reduce((k,x)=>Object.assign(k,{[x]:g}),{hour12:!0,timeZone:"UTC"})).formatToParts(i).map(Lc);if("long"===g||"short"===g){const x=new Intl.DateTimeFormat(t,{dateStyle:"short"===g?"medium":"long",timeZone:"UTC"}).formatToParts(i).map(Lc).find(C=>"month"===C.type),D=v.findIndex(C=>"month"===C.type);D>-1&&x&&(v[D]=x)}v.forEach(k=>{if("literal"===k.type)return;const x=k.type;h[x]=Object.assign(h[x]||{},{[k.value]:g})})}}bL.set(t,h)}const u=bL.get(t);return u?u[e][a]:void 0}function hK(t,e="+00:00"){const a="+"===e.slice(0,1);return oK(t,e.replace(a?"+":"-",a?"-":"+"))}function Pi(t,e="long",a="device",u=!1,i){let r,o;return"object"==typeof t&&!(t instanceof Date)&&({date:t,format:e,locale:a,genitive:u,partFilter:i,tz:r}=t),"ISO8601"===e?Xs(t).toISOString():(r&&(o=$F(t,"utc",r,function Zde(t){return"string"==typeof t?t.includes("ZZ")?"ZZ":"Z":"time"in t&&"full"===t.time?"Z":"ZZ"}(e))),r??(r=lK()),"utc"!==r?.toLowerCase()&&(t=hK(t,$F(t,r,"utc"))),(!a||"device"===a)&&(a=function Qde(){return Intl.DateTimeFormat().resolvedOptions().locale}()),jde(t,CL(e,a).filter(i??(()=>!0)),a,u,o).map(d=>d.value).join(""))}function Xde(t,e="en",a=!1,u=(()=>!0)){return CL(t,e).filter(u).reduce((i,r)=>i+(a&&"literal"===r.partName?function Wde(t){return kL.concat(xL).concat(fL).sort((e,a)=>e[0].length>a[0].length?1:-1).reduce((e,a)=>e.replace(a[0],`\\${a[0]}`),t)}(r.token):r.token),"").normalize("NFKC")}function mK(t,e="en",a=!1){const u=(i,r)=>Array(i).fill("").map((o,d)=>`${r(d)}`);if("M"===t)return u(12,i=>i+1);if("MM"===t)return u(12,i=>{const r=i+1;return r<10?`0${r}`:r});if(t.startsWith("M"))return mK("MM").map(i=>Pi(`2000-${i}-05`,t,e,a));if(t.startsWith("d"))return u(7,i=>`0${i+2}`).map(i=>Pi(`2022-10-${i}`,t,e));if("a"===t)return[Dv("am",e).toLowerCase(),Dv("pm",e).toLowerCase()];if("A"===t)return[Dv("am",e).toUpperCase(),Dv("pm",e).toUpperCase()];if(t.startsWith("Y")){const i=(new Date).getFullYear();return u(120,r=>r+1).reduce((r,o)=>("120"!==o&&r.push(Pi(`${i+Number(o)}-06-06`,t,e)),r.unshift(Pi(i-Number(o)+"-06-06",t,e)),r),[Pi(`${i}-06-06`,t,e)])}return t.startsWith("D")?u(31,i=>`${"DD"===t&&i<9?"0":""}${i+1}`):t.startsWith("H")?u(24,i=>`${"HH"===t&&i<10?"0":""}${i}`):t.startsWith("h")?u(12,i=>`${"hh"===t&&i<9?"0":""}${i+1}`):t.startsWith("m")||t.startsWith("s")?u(60,i=>`${t.length>1&&i<10?"0":""}${i}`):[]}function tce(t){return function ace(t){const e=Xs(t);return e.setDate(1),e.setMonth(e.getMonth()+1),e.setDate(0),e}(t).getDate()}function qF(t,e="ISO8601",a="device"){let i,u=()=>!0,r="backward";if("object"==typeof t?({date:i,format:e="ISO8601",locale:a="device",dateOverflow:r="backward",partFilter:u=(()=>!0)}=t):i=t,!i)throw new Error("parse() requires a date string.");const o=()=>{throw new Error(`Date (${i}) does not match format (${Xde(e,a)})`)};if("ISO8601"===e)return Xs(i);const d=iK.includes(e)||"object"==typeof e,h=function Jde(t){let e;for(const a of t){if("literal"===a.partName&&!isNaN(parseFloat(a.partValue)))throw new Error(`Numbers in format (${a.partValue}).`);if(e&&"literal"!==e.partName&&"literal"!==a.partName&&!(e.token in ZF)&&!(a.token in ZF)&&(!Ude(e)||"a"!==a.token.toLowerCase()))throw new Error(`Illegal adjacent tokens (${e.token}, ${a.token})`);e=a}return t}(CL(e,a).filter(u));if(!h.length)throw new Error("parse() requires a pattern.");let m;try{m=function uce(t,e){let a=0;const u=d=>[d[a++],d[a]];let i=0;const r=[];let o;do{const[d,h]=u(e);o=h;let m=1;if("literal"===d.partName)m=d.partValue.length;else if("timeZoneName"===d.partName)m=tK(t.substring(i));else if(d.token in ZF)m=ZF[d.token];else if(h)if("literal"===h.partName){if(m=t.indexOf(h.partValue,i)-i,m<0)throw new Error}else if("dayPeriod"===h.partName){for(let g=1;g<=4;g++)if(isNaN(Number(t.charAt(i+g)))){m=g;break}}else{const g=t.substring(i).search(/\d/);-1!==g&&(m=i+g)}else m=t.length;r.push({...d,value:t.substring(i,i+m)}),i+=m}while(o);return r}(i,h)}catch{return o()}const g=new Date,v=new Map([["YYYY",g.getFullYear()],["MM",g.getMonth()+1],["DD",g.getDate()],["HH",0],["mm",0],["ss",0]]);let k=null,x="";m.forEach(Y=>{if("literal"===Y.partName)return;if(Y.token===Y.value)return o();const re=Number(Y.value);if(v.has(Y.token))v.set(Y.token,re);else if("YY"===Y.token)v.set("YYYY",function ece(t){const e=(new Date).getFullYear(),a=e%100,u=Math.floor(e/100),i=Number(t);return 100*(u+(i>a+20?-1:0))+i}(Y.value));else{const He=Y.token;if(He.startsWith("d"))return;if("D"===He)v.set("DD",re);else if("H"===He||He.startsWith("h"))v.set("HH",re);else if("M"===He)v.set("MM",re);else if("a"===He||"A"===He)k=Y.value.toLowerCase()===Dv("am",a).toLowerCase();else if("Z"===He||"ZZ"===He)x=rK(Y.value,He);else{const Be=mK(He,a,d).indexOf(Y.value);if(-1!==Be)switch(He){case"MMM":case"MMMM":v.set("MM",Be+1)}}}});let D=v.get("HH")||0;!1===k?(D+=12===D?0:12,v.set("HH",24===D?0:D)):!0===k&&12===D&&v.set("HH",0),v.set("MM",(v.get("MM")||1)-1);let[C,F,A,z,M,L]=Array.from(v.values());const R=tce(new Date(`${DL(C)}-${Lh(F+1)}-10`));if(RpK(a,u,i,e,void 0!==e)}const ul={boolean:(t,e,a=Gt.neutral)=>{let u=0;return u=t===e?0:null===t?-1:null===e?1:a?t{if(!u||!u.dataKey)throw new Error('Sorting a "FieldType.object" requires you to provide the "dataKey" (object property name) of the object so that we can use it to sort correctly');const r=t?.hasOwnProperty(u.dataKey)?t[u.dataKey]:t,o=e?.hasOwnProperty(u.dataKey)?e[u.dataKey]:e,d=u?.valueCouldBeUndefined??i?.cellValueCouldBeUndefined??!1;let h=0;return h="object"!=typeof t?-1/0:"object"!=typeof e?1/0:null===r||d&&void 0===r?-1:null===o||d&&void 0===o?1:r===o?0:a?r{let r=0;const o=u?.valueCouldBeUndefined??i?.cellValueCouldBeUndefined??!1;return t===e?r=0:null===t||o&&void 0===t?r=-1:null===e||o&&void 0===e?r=1:(i?.ignoreAccentOnStringFilterAndSort&&(t=xv(t,!1),e=xv(e,!1)),r=a?te.name)}constructor(e){this._subscribedEvents=[],this.eventNamingStyle=R0.camelCase,this._elementSource=e||document.createElement("div")}dispose(){this.unsubscribeAll(),this._subscribedEvents=[],clearTimeout(this._timer),this._elementSource?.remove(),this._elementSource=null}dispatchCustomEvent(e,a,u=!0,i=!0,r){const o={bubbles:u,cancelable:i};a&&(o.detail=a);const d=new CustomEvent(e,o);return"function"==typeof r&&r(d),this._elementSource?.dispatchEvent(d)}getEventNameByNamingConvention(e,a){let u="";switch(this.eventNamingStyle){case R0.camelCase:u=""!==a?`${a}${yo(e)}`:e;break;case R0.kebabCase:u=""!==a?`${a}-${fv(e)}`:fv(e);break;case R0.lowerCase:u=`${a}${e}`.toLowerCase();break;case R0.lowerCaseWithoutOnPrefix:u=`${a}${e.replace(/^on/,"")}`.toLowerCase()}return u}publish(e,a,u,i){const r=this.getEventNameByNamingConvention(e,"");return u?new Promise(o=>{clearTimeout(this._timer),this._timer=setTimeout(()=>o(this.dispatchCustomEvent(r,a,!0,!0,i)),u)}):this.dispatchCustomEvent(r,a,!0,!0,i)}subscribe(e,a){const u=this.getEventNameByNamingConvention(e,"");return this._elementSource.addEventListener(u,i=>a.call(null,i.detail)),this._subscribedEvents.push({name:u,listener:a}),{unsubscribe:()=>this.unsubscribe(u,a)}}subscribeEvent(e,a){const u=this.getEventNameByNamingConvention(e,"");return this._elementSource.addEventListener(u,a),this._subscribedEvents.push({name:u,listener:a}),{unsubscribe:()=>this.unsubscribe(u,a)}}unsubscribe(e,a,u=!0){const i=this.getEventNameByNamingConvention(e,"");this._elementSource.removeEventListener(i,a),u&&this.removeSubscribedEventWhenFound(e,a)}unsubscribeAll(e){if(Array.isArray(e)){let a;do{a=e.pop(),a?.dispose?a.dispose():a?.unsubscribe&&a.unsubscribe()}while(a)}else{let a=this._subscribedEvents.pop();for(;a;)this.unsubscribe(a.name,a.listener,!1),a=this._subscribedEvents.pop()}}removeSubscribedEventWhenFound(e,a){const u=this._subscribedEvents.findIndex(i=>i.name===e&&i.listener===a);u>=0&&this._subscribedEvents.splice(u,1)}}const YF=function oce(t){var e=document,a=t.container||e.createElement("div"),u=t.preventSubmit||0;a.id=a.id||"autocomplete-"+z();var k,D,i=a.style,r=t.debounceWaitMs||0,o=t.disableAutoSelect||!1,d=a.parentElement,h=[],m="",g=2,v=t.showOnFocus,x=0,C=!1,F=!1;if(void 0!==t.minLength&&(g=t.minLength),!t.input)throw new Error("input undefined");var A=t.input;function z(){return Date.now().toString(36)+Math.random().toString(36).substring(2)}function M(){var je=a.parentNode;je&&je.removeChild(a)}function L(){D&&window.clearTimeout(D)}function G(){return!!a.parentNode}function $(){x++,h=[],m="",k=void 0,A.setAttribute("aria-activedescendant",""),A.setAttribute("aria-expanded","false"),M()}function re(){a.textContent="",A.setAttribute("aria-activedescendant","");var je=function(hl,Kv,Gc){var wo=e.createElement("div");return wo.textContent=hl.label||"",wo};t.render&&(je=t.render);var tt=function(hl,Kv){var Gc=e.createElement("div");return Gc.textContent=hl,Gc};t.renderGroup&&(tt=t.renderGroup);var oi=e.createDocumentFragment(),Dr=z();if(h.forEach(function(hl,Kv){if(hl.group&&hl.group!==Dr){Dr=hl.group;var Gc=tt(hl.group,m);Gc&&(Gc.className+=" group",oi.appendChild(Gc))}var wo=je(hl,m,Kv);wo&&(wo.id=a.id+"_"+Kv,wo.setAttribute("role","option"),wo.addEventListener("click",function(wf){F=!0;try{t.onSelect(hl,A)}finally{F=!1}$(),wf.preventDefault(),wf.stopPropagation()}),hl===k&&(wo.className+=" selected",wo.setAttribute("aria-selected","true"),A.setAttribute("aria-activedescendant",wo.id)),oi.appendChild(wo))}),a.appendChild(oi),h.length<1){if(!t.emptyMsg)return void $();var cl=e.createElement("div");cl.id=a.id+"_"+z(),cl.className="empty",cl.textContent=t.emptyMsg,a.appendChild(cl),A.setAttribute("aria-activedescendant",cl.id)}(function R(){a.parentNode||(d||e.body).appendChild(a)})(),function Y(){if(G()){A.setAttribute("aria-expanded","true"),i.height="auto",i.width=A.offsetWidth+"px";var tt,je=0;oi(),oi(),t.customize&&tt&&t.customize(A,tt,a,je)}function oi(){var Dr=e.documentElement,cl=Dr.clientTop||e.body.clientTop||0,hl=Dr.clientLeft||e.body.clientLeft||0,Kv=window.pageYOffset||Dr.scrollTop,Gc=window.pageXOffset||Dr.scrollLeft,wo=(tt=A.getBoundingClientRect()).top+A.offsetHeight+Kv-cl,wf=tt.left+Gc-hl;i.top=wo+"px",i.left=wf+"px",(je=window.innerHeight-(tt.top+A.offsetHeight))<0&&(je=0),i.top=wo+"px",i.bottom="",i.left=wf+"px",i.maxHeight=je+"px"}}(),At()}function He(){G()&&re()}function Ve(){He()}function Be(je){je.target!==a?He():je.preventDefault()}function fa(){F||dn(0)}function At(){var je=a.getElementsByClassName("selected");if(je.length>0){var tt=je[0],oi=tt.previousElementSibling;if(oi&&-1!==oi.className.indexOf("group")&&!oi.previousElementSibling&&(tt=oi),tt.offsetTopcl&&(a.scrollTop+=Dr-cl)}}}function Ne(je){h.length>0&&(function nu(je){var tt=e.getElementById(a.id+"_"+je);tt&&(tt.classList.remove("selected"),tt.removeAttribute("aria-selected"),A.removeAttribute("aria-activedescendant"))}(je),function Ua(je){var tt=e.getElementById(a.id+"_"+je);tt&&(tt.classList.add("selected"),tt.setAttribute("aria-selected","true"),A.setAttribute("aria-activedescendant",tt.id))}(h.indexOf(k)),At())}function sl(je,tt){var oi=G();if("Escape"===tt)$();else{if(!oi||h.length<1)return;"ArrowUp"===tt?function vt(){var je=h.indexOf(k);k=-1===je?void 0:h[(je+h.length-1)%h.length],Ne(je)}():function Ya(){var je=h.indexOf(k);k=h.length<1?void 0:-1===je?h[0]:h[(je+1)%h.length],Ne(je)}()}je.preventDefault(),oi&&je.stopPropagation()}function Wn(je){var tt=je.key;switch(tt){case"ArrowUp":case"ArrowDown":case"Escape":sl(je,tt);break;case"Enter":!function Qi(je){if(k){2===u&&je.preventDefault(),F=!0;try{t.onSelect(k,A)}finally{F=!1}$()}1===u&&je.preventDefault()}(je)}}function fr(){v&&dn(1)}function dn(je){A.value.length>=g||1===je?(L(),D=window.setTimeout(function(){return Iu(A.value,je,A.selectionStart||0)},0===je||2===je?r:0)):$()}function Iu(je,tt,oi){if(!C){var Dr=++x;t.fetch(je,function(cl){x===Dr&&cl&&(m=je,k=(h=cl).length<1||o?void 0:h[0],re())},tt,oi)}}function dl(je){t.keyup?t.keyup({event:je,fetch:function(){return dn(0)}}):!G()&&"ArrowDown"===je.key&&dn(0)}function Oc(je){t.click&&t.click({event:je,fetch:function(){return dn(2)}})}function jc(){setTimeout(function(){e.activeElement!==A&&$()},200)}return a.className=[a.className,"autocomplete",t.className||""].join(" ").trim(),a.setAttribute("role","listbox"),A.setAttribute("role","combobox"),A.setAttribute("aria-expanded","false"),A.setAttribute("aria-autocomplete","list"),A.setAttribute("aria-controls",a.id),A.setAttribute("aria-owns",a.id),A.setAttribute("aria-activedescendant",""),A.setAttribute("aria-haspopup","listbox"),i.position="absolute",a.addEventListener("mousedown",function(je){je.stopPropagation(),je.preventDefault()}),a.addEventListener("focus",function(){return A.focus()}),M(),A.addEventListener("keyup",dl),A.addEventListener("click",Oc),A.addEventListener("keydown",Wn),A.addEventListener("input",fa),A.addEventListener("blur",jc),A.addEventListener("focus",fr),window.addEventListener("resize",Ve),e.addEventListener("scroll",Be,!0),{destroy:function Gv(){A.removeEventListener("focus",fr),A.removeEventListener("keyup",dl),A.removeEventListener("click",Oc),A.removeEventListener("keydown",Wn),A.removeEventListener("input",fa),A.removeEventListener("blur",jc),window.removeEventListener("resize",Ve),e.removeEventListener("scroll",Be,!0),A.removeAttribute("role"),A.removeAttribute("aria-expanded"),A.removeAttribute("aria-autocomplete"),A.removeAttribute("aria-controls"),A.removeAttribute("aria-activedescendant"),A.removeAttribute("aria-owns"),A.removeAttribute("aria-haspopup"),L(),$(),C=!0},fetch:function jv(){Iu(A.value,3,A.selectionStart||0)}}};class Ni{constructor(){this._boundedEvents=[]}get boundedEvents(){return this._boundedEvents}dispose(){this.unbindAll(),this._boundedEvents=[]}bind(e,a,u,i,r=""){const o=Array.isArray(a)?a:[a];if(e?.forEach)e.forEach(d=>{for(const h of o)d.addEventListener(h,u,i),this._boundedEvents.push({element:d,eventName:h,listener:u,groupName:r})});else if(e)for(const d of o)e.addEventListener(d,u,i),this._boundedEvents.push({element:e,eventName:d,listener:u,groupName:r})}unbind(e,a,u){const i=Array.isArray(e)?e:[e],r=Array.isArray(a)?a:[a];for(const o of r)for(const d of i)"function"==typeof d?.removeEventListener&&d.removeEventListener(o,u)}unbindByEventName(e,a){const u=this._boundedEvents.find(i=>i.element===e&&i.eventName===a);u&&this.unbind(u.element,u.eventName,u.listener)}unbindAll(e){if(e){const a=Array.isArray(e)?e:[e];for(let u=this._boundedEvents.length-1;u>=0;--u){const i=this._boundedEvents[u];if(a.some(r=>r===i.groupName)){const{element:r,eventName:o,listener:d}=i;this.unbind(r,o,d),this._boundedEvents.splice(u,1)}}}else for(;this._boundedEvents.length>0;){const a=this._boundedEvents.pop(),{element:u,eventName:i,listener:r}=a;this.unbind(u,i,r)}}}var gK=Object.prototype.hasOwnProperty;function H0(t,e){var a,u;if(t===e)return!0;if(t&&e&&(a=t.constructor)===e.constructor){if(a===Date)return t.getTime()===e.getTime();if(a===RegExp)return t.toString()===e.toString();if(a===Array){if((u=t.length)===e.length)for(;u--&&H0(t[u],e[u]););return-1===u}if(!a||"object"==typeof t){for(a in u=0,t)if(gK.call(t,a)&&++u&&!gK.call(e,a)||!(a in e)||!H0(t[a],e[a]))return!1;return Object.keys(e).length===u}}return t!=t&&e!=e}function EK(t,e){const a=e.fetch;a&&(e.fetch=(u,i,r,o)=>{t.classList.add("slick-autocomplete-loading");const d=i;a(u,m=>{d(m),t.classList.remove("slick-autocomplete-loading")},r,o)})}function W2(t,e,a,u){const{oldVal:i,newVal:r,columnDef:o,selectedSettings:d,updatePickerUI:h}=u;if(i!==r){const m=t.type||o.type,g=o.outputType||t.type||o.type||w.dateUtc,v=Array.isArray(r)?r:[r||""],k=[],x=tl(w.dateIso),D=m?tl(m):void 0;for(const F of v){const A=F instanceof Date?F:Tc(F,D);A&&k.push(A)}const C=d??{dates:[k.map(F=>Pi(F,x)).join(":")],month:k[0]?.getMonth(),year:k[0]?.getFullYear(),time:"ISO8601"===D||(D||"").toLowerCase().includes("h")?Pi(k[0],"HH:mm"):void 0};H0(a.settings.selected,C)||(a.settings.selected=C,h&&a?.update&&a.update({dates:!0,month:!0,year:!0,time:!0})),e.value=v.length?k.map(F=>ed(F,void 0,g)).join(" \u2014 "):""}}function yL(t,e){const a=T("select",{className:"form-control"});for(const u of t){const i=document.createElement("option");i.value=u.operator,e.applyHtmlCode(i,`${RG(u.operatorAlt||u.operator,3)}${u.descAlt||u.desc}`),a.appendChild(i)}return a}function vK(t,e,a,u,i){return _L.apply(this,arguments)}function _L(){return _L=Su(function*(t,e,a,u,i){const r=e?.filter??{},o=r?.collectionOptions??{};let d=null;if(t){const h=u?.isObservable(t)??!1;h&&u&&(d=yield sL(u,t));const m=yield t;if(Array.isArray(m)?d=m:m?.status>=200&&m.status<300&&"function"==typeof m.json?d=yield m.json():m&&m.content&&(d=m.content),!Array.isArray(d)&&o?.collectionInsideObjectProperty){d=ti(d||m,o.collectionInsideObjectProperty||"")}if(!Array.isArray(d))throw new Error('Something went wrong while trying to pull the collection from the "collectionAsync" call in the Filter, the collection is not a valid array.');r.collection=d,a(d),h&&function sce(t,e,a,u){const i=t?.filter??{},r=a?.createSubject();i.collectionAsync=r,u&&r&&u.push(r.subscribe(o=>function lce(t,e,a){const u=e?.filter??{},i=u?.collectionOptions??{};i&&i.collectionInsideObjectProperty&&(t=ti(t,i.collectionInsideObjectProperty));if(!Array.isArray(t))throw new Error('Something went wrong while trying to pull the collection from the "collectionAsync" call in the Filter, the collection is not a valid array.');u.collection=t,a(t)}(o,t,e)))}(e,a,u,i)}return d}),_L.apply(this,arguments)}function Kl(t,e,a,u,i){if(u?.enableTranslate&&i?.translate){const o=Gl(u);return i.translate(`${o}${t}`)}return(u.locales||ue.locales)?.[e]??a}function FL(t,e){return[{operator:"",desc:""},{operator:"=",desc:Kl("EQUAL_TO","TEXT_EQUAL_TO","Equal to",t,e)},{operator:"<",desc:Kl("LESS_THAN","TEXT_LESS_THAN","Less than",t,e)},{operator:"<=",desc:Kl("LESS_THAN_OR_EQUAL_TO","TEXT_LESS_THAN_OR_EQUAL_TO","Less than or equal to",t,e)},{operator:">",desc:Kl("GREATER_THAN","TEXT_GREATER_THAN","Greater than",t,e)},{operator:">=",desc:Kl("GREATER_THAN_OR_EQUAL_TO","TEXT_GREATER_THAN_OR_EQUAL_TO","Greater than or equal to",t,e)},{operator:"<>",desc:Kl("NOT_EQUAL_TO","TEXT_NOT_EQUAL_TO","Not equal to",t,e)}]}function AL(t,e,a){if(t.compoundOperatorAltTexts)for(const u of e)if(t.compoundOperatorAltTexts.hasOwnProperty(a)){const i=t.compoundOperatorAltTexts[a][u.operator];u.operatorAlt=i?.operatorAlt||"",u.descAlt=i?.descAlt||""}}var hce=Object.defineProperty,bK=Object.getOwnPropertySymbols,mce=Object.prototype.hasOwnProperty,pce=Object.prototype.propertyIsEnumerable,wL=(t,e,a)=>e in t?hce(t,e,{enumerable:!0,configurable:!0,writable:!0,value:a}):t[e]=a,kK=(t,e)=>{for(var a in e||(e={}))mce.call(e,a)&&wL(t,a,e[a]);if(bK)for(var a of bK(e))pce.call(e,a)&&wL(t,a,e[a]);return t},Ka=(t,e,a)=>(wL(t,"symbol"!=typeof e?e+"":e,a),a);const gce={calendar:"vanilla-calendar",calendarDefault:"vanilla-calendar_default",calendarMultiple:"vanilla-calendar_multiple",calendarMonth:"vanilla-calendar_month",calendarYear:"vanilla-calendar_year",calendarHidden:"vanilla-calendar_hidden",calendarToInput:"vanilla-calendar_to-input",calendarToInputTop:"vanilla-calendar_to-input_top",calendarToInputBottom:"vanilla-calendar_to-input_bottom",controls:"vanilla-calendar-controls",grid:"vanilla-calendar-grid",gridDisabled:"vanilla-calendar-grid_disabled",column:"vanilla-calendar-column",columnMonth:"vanilla-calendar-column_month",columnYear:"vanilla-calendar-column_year",header:"vanilla-calendar-header",headerContent:"vanilla-calendar-header__content",month:"vanilla-calendar-month",monthDisabled:"vanilla-calendar-month_disabled",year:"vanilla-calendar-year",yearDisabled:"vanilla-calendar-year_disabled",arrow:"vanilla-calendar-arrow",arrowPrev:"vanilla-calendar-arrow_prev",arrowNext:"vanilla-calendar-arrow_next",wrapper:"vanilla-calendar-wrapper",content:"vanilla-calendar-content",week:"vanilla-calendar-week",weekDay:"vanilla-calendar-week__day",weekDayWeekend:"vanilla-calendar-week__day_weekend",days:"vanilla-calendar-days",daysSelecting:"vanilla-calendar-days_selecting",months:"vanilla-calendar-months",monthsSelecting:"vanilla-calendar-months_selecting",monthsMonth:"vanilla-calendar-months__month",monthsMonthSelected:"vanilla-calendar-months__month_selected",monthsMonthDisabled:"vanilla-calendar-months__month_disabled",years:"vanilla-calendar-years",yearsSelecting:"vanilla-calendar-years_selecting",yearsYear:"vanilla-calendar-years__year",yearsYearSelected:"vanilla-calendar-years__year_selected",yearsYearDisabled:"vanilla-calendar-years__year_disabled",time:"vanilla-calendar-time",timeContent:"vanilla-calendar-time__content",timeHours:"vanilla-calendar-time__hours",timeMinutes:"vanilla-calendar-time__minutes",timeKeeping:"vanilla-calendar-time__keeping",timeRanges:"vanilla-calendar-time__ranges",timeRange:"vanilla-calendar-time__range",day:"vanilla-calendar-day",dayHoverFirst:"vanilla-calendar-day_hover-first",dayHoverLast:"vanilla-calendar-day_hover-last",dayHoverIntermediate:"vanilla-calendar-day_hover-intermediate",daySelectedFirst:"vanilla-calendar-day_selected-first",daySelectedLast:"vanilla-calendar-day_selected-last",daySelectedIntermediate:"vanilla-calendar-day_selected-intermediate",dayPopup:"vanilla-calendar-day__popup",dayBtn:"vanilla-calendar-day__btn",dayBtnPrev:"vanilla-calendar-day__btn_prev",dayBtnNext:"vanilla-calendar-day__btn_next",dayBtnToday:"vanilla-calendar-day__btn_today",dayBtnSelected:"vanilla-calendar-day__btn_selected",dayBtnHover:"vanilla-calendar-day__btn_hover",dayBtnDisabled:"vanilla-calendar-day__btn_disabled",dayBtnWeekend:"vanilla-calendar-day__btn_weekend",dayBtnHoliday:"vanilla-calendar-day__btn_holiday",weekNumbers:"vanilla-calendar-week-numbers",weekNumbersTitle:"vanilla-calendar-week-numbers__title",weekNumbersContent:"vanilla-calendar-week-numbers__content",weekNumber:"vanilla-calendar-week-number",isFocus:"vanilla-calendar-is-focus"},Ece=t=>`
<#ArrowPrev />
<#Month /><#Year />
<#ArrowNext />
<#WeekNumbers />
<#Week /><#Days />
<#ControlTime />`,vce=t=>`
<#ArrowPrev /><#ArrowNext />
<#Multiple>
<#Month /><#Year />
<#WeekNumbers />
<#Week /><#Days />
<#/Multiple>
<#ControlTime />`,bce=t=>`
<#Month /><#Year />
<#Months />
`,kce=t=>`
<#ArrowPrev />
<#Month /><#Year />
<#ArrowNext />
<#Years />
`;class xce{constructor(){Ka(this,"isInit",!1),Ka(this,"isInputInit",!1),Ka(this,"input",!1),Ka(this,"type","default"),Ka(this,"months",2),Ka(this,"jumpMonths",1),Ka(this,"toggleSelected",!0),Ka(this,"jumpToSelectedDate",!1),Ka(this,"date",{min:"1970-01-01",max:"2470-12-31",today:new Date}),Ka(this,"settings",{lang:"en",iso8601:!0,range:{min:this.date.min,max:this.date.max,disablePast:!1,disableGaps:!1,edgesOnly:!1,disableAllDays:!1,disableWeekday:void 0,disabled:void 0,enabled:void 0},selection:{day:"single",month:!0,year:!0,time:!1,controlTime:"all",stepHours:1,stepMinutes:1,cancelableDay:!0},selected:{dates:void 0,month:void 0,year:void 0,holidays:void 0,time:void 0},visibility:{theme:"system",themeDetect:"html[data-theme]",monthShort:!0,weekNumbers:!1,weekend:!0,today:!0,disabled:!1,daysOutside:!0,positionToInput:"left"}}),Ka(this,"locale",{months:[],weekday:[]}),Ka(this,"sanitizer",e=>e),Ka(this,"actions",{clickDay:null,clickWeekNumber:null,clickMonth:null,clickYear:null,clickArrow:null,changeTime:null,changeToInput:null,getDays:null,getMonths:null,getYears:null,initCalendar:null,updateCalendar:null,destroyCalendar:null,showCalendar:null,hideCalendar:null}),Ka(this,"popups",{}),Ka(this,"CSSClasses",kK({},gce)),Ka(this,"DOMTemplates",{default:Ece(this.CSSClasses),multiple:vce(this.CSSClasses),month:bce(this.CSSClasses),year:kce(this.CSSClasses)}),Ka(this,"HTMLElement"),Ka(this,"HTMLOriginalElement"),Ka(this,"HTMLInputElement"),Ka(this,"rangeMin"),Ka(this,"rangeMax"),Ka(this,"rangeDisabled"),Ka(this,"rangeEnabled"),Ka(this,"selectedDates"),Ka(this,"selectedHolidays"),Ka(this,"selectedMonth"),Ka(this,"selectedYear"),Ka(this,"selectedHours"),Ka(this,"selectedMinutes"),Ka(this,"selectedKeeping"),Ka(this,"selectedTime"),Ka(this,"currentType"),Ka(this,"correctMonths"),Ka(this,"viewYear"),Ka(this,"dateMin"),Ka(this,"dateMax")}}const ad=t=>`${t.getFullYear()}-${String(t.getMonth()+1).padStart(2,"0")}-${String(t.getDate()).padStart(2,"0")}`,Du=t=>new Date(`${t}T00:00:00`),yv=t=>t.reduce((e,a)=>{if(a instanceof Date||"number"==typeof a){const u=a instanceof Date?a:new Date(a);e.push(u.toISOString().substring(0,10))}else a.match(/^(\d{4}-\d{2}-\d{2})$/g)?e.push(a):a.replace(/(\d{4}-\d{2}-\d{2}).*?(\d{4}-\d{2}-\d{2})/g,(u,i,r)=>{const o=Du(i),d=Du(r),h=new Date(o.getTime());for(;h<=d;h.setDate(h.getDate()+1))e.push(ad(h));return u});return e},[]),xK=()=>{const t=new Date;return new Date(t.getTime()-6e4*t.getTimezoneOffset()).toISOString().substring(0,10)},U2=t=>t?{0:"12",13:"01",14:"02",15:"03",16:"04",17:"05",18:"06",19:"07",20:"08",21:"09",22:"10",23:"11"}[Number(t)]||String(t):"",_v_notFoundSelector=t=>`${t} is not found, check the first argument passed to new VanillaCalendar.`,_v_notInit='The calendar has not been initialized, please initialize it using the "init()" method first.',_v_notLocale='You specified "define" for "settings.lang" but did not provide the required values for "locale.weekday" or "locale.months".',_v_incorrectTheme='Incorrect name of theme in "settings.visibility.theme".',_v_incorrectTime="The value of the time property can be: false, true, 12 or 24.",fK=t=>{t.currentType=t.type,(t=>{var e;if(t.jumpToSelectedDate&&null!=(e=t.settings.selected.dates)&&e.length&&void 0===t.settings.selected.month&&void 0===t.settings.selected.year){const i=Du(yv(t.settings.selected.dates)[0]);t.settings.selected.month=i.getMonth(),t.settings.selected.year=i.getFullYear()}const a=void 0!==t.settings.selected.month&&Number(t.settings.selected.month)>=0&&Number(t.settings.selected.month)<12,u=void 0!==t.settings.selected.year&&Number(t.settings.selected.year)>=0&&Number(t.settings.selected.year)<=9999;t.selectedMonth=a?Number(t.settings.selected.month):t.date.today.getMonth(),t.selectedYear=u?Number(t.settings.selected.year):t.date.today.getFullYear(),t.viewYear=t.selectedYear})(t),(t=>{var e,a,u;"today"===t.settings.range.min&&(t.settings.range.min=xK()),"today"===t.settings.range.max&&(t.settings.range.max=xK()),t.settings.range.min=Du(t.date.min)>=Du(t.settings.range.min)?t.date.min:t.settings.range.min,t.settings.range.max=Du(t.date.max)<=Du(t.settings.range.max)?t.date.max:t.settings.range.max;const i=t.settings.range.disablePast&&!t.settings.range.disableAllDays&&Du(t.settings.range.min)1&&t.rangeDisabled.sort((r,o)=>+new Date(r)-+new Date(o)),t.rangeEnabled=t.settings.range.enabled?yv(t.settings.range.enabled):[],null!=(e=t.rangeEnabled)&&e[0]&&null!=(a=t.rangeDisabled)&&a[0]&&(t.rangeDisabled=t.rangeDisabled.filter(r=>!t.rangeEnabled.includes(r))),t.rangeEnabled.length>1&&t.rangeEnabled.sort((r,o)=>+new Date(r)-+new Date(o)),null!=(u=t.rangeEnabled)&&u[0]&&t.settings.range.disableAllDays&&(t.rangeMin=t.rangeEnabled[0],t.rangeMax=t.rangeEnabled[t.rangeEnabled.length-1])})(t),(t=>{var e,a;t.selectedDates=null!=(e=t.settings.selected.dates)&&e[0]?yv(t.settings.selected.dates):[],t.selectedHolidays=null!=(a=t.settings.selected.holidays)&&a[0]?yv(t.settings.selected.holidays):[]})(t),(t=>{t.dateMin=t.settings.visibility.disabled?Du(t.date.min):Du(t.rangeMin),t.dateMax=t.settings.visibility.disabled?Du(t.date.max):Du(t.rangeMax)})(t),(t=>{const e=!0===t.settings.selection.time||12===t.settings.selection.time;if(e||24===t.settings.selection.time){let a=!1;if("string"==typeof t.settings.selected.time){const u=e?/^([0-9]|0[1-9]|1[0-2]):([0-5][0-9])|(AM|PM)/g:/^([0-1]?[0-9]|2[0-3]):([0-5][0-9])/g;t.settings.selected.time.replace(u,(i,r,o,d)=>(r&&o&&(a=!0,t.selectedHours=r,t.selectedMinutes=o),d&&e?t.selectedKeeping=d:e&&(t.selectedKeeping="AM"),""))}!a&&e?(t.selectedHours=U2(String(t.date.today.getHours())),t.selectedMinutes=String(t.date.today.getMinutes()),t.selectedKeeping=Number(t.date.today.getHours())>=12?"PM":"AM"):a||(t.selectedHours=String(t.date.today.getHours()),t.selectedMinutes=String(t.date.today.getMinutes())),t.selectedHours=Number(t.selectedHours)<10?`0${Number(t.selectedHours)}`:`${t.selectedHours}`,t.selectedMinutes=Number(t.selectedMinutes)<10?`0${Number(t.selectedMinutes)}`:`${t.selectedMinutes}`,t.selectedTime=`${t.selectedHours}:${t.selectedMinutes}${t.selectedKeeping?` ${t.selectedKeeping}`:""}`}else if(t.settings.selection.time)throw new Error(_v_incorrectTime)})(t),(t=>{t.correctMonths="multiple"===t.type?1===t.months?2:t.months>12?12:t.months:1})(t)},DK=({arrowPrev:t,arrowNext:e,isPrevHidden:a,isNextHidden:u})=>{t.style.visibility=a?"hidden":"",e.style.visibility=u?"hidden":""},BL=t=>{var e,a;if("month"===t.currentType)return;const u=null==(e=t.HTMLElement)?void 0:e.querySelector(`.${t.CSSClasses.arrowPrev}`),i=null==(a=t.HTMLElement)?void 0:a.querySelector(`.${t.CSSClasses.arrowNext}`);!u||!i||{default:()=>{const r=Du(ad(new Date(t.selectedYear,t.selectedMonth,1))),o=new Date(r.getTime()),d=new Date(r.getTime());o.setMonth(o.getMonth()-t.jumpMonths),d.setMonth(d.getMonth()+t.jumpMonths),t.settings.selection.year||(t.dateMin.setFullYear(r.getFullYear()),t.dateMax.setFullYear(r.getFullYear()));const h=!t.settings.selection.month||o.getFullYear()t.dateMax.getFullYear()||d.getFullYear()===t.dateMax.getFullYear()&&d.getMonth()>t.dateMax.getMonth();DK({arrowPrev:u,arrowNext:i,isPrevHidden:h,isNextHidden:m})},year:()=>{DK({arrowPrev:u,arrowNext:i,isPrevHidden:t.dateMin.getFullYear()&&t.viewYear-7<=t.dateMin.getFullYear(),isNextHidden:t.dateMax.getFullYear()&&t.viewYear+7>=t.dateMax.getFullYear()})}}["multiple"===t.currentType?"default":t.currentType]()},CK=(t,e)=>{if(!t)return null;const a=Du(t),u=e?a.getDay()||7:a.getDay();a.setDate(a.getDate()+4-u);const i=new Date(a.getFullYear(),0,1),r=Math.ceil(((+a-+i)/864e5+1)/7);return{year:a.getFullYear(),week:r}},Bce=(t,e,a,u,i)=>{const r=e[a].querySelector(`.${t.CSSClasses.dayBtn}`),o=CK(r?.dataset.calendarDay,t.settings.iso8601);if(!o)return;const d=u.cloneNode(!0);d.innerText=String(o.week),d.dataset.calendarYearWeek=String(o.year),i.appendChild(d)},SL=(t,e,a,u,i,r,o,d)=>{const h=document.createElement("div");h.className=t.CSSClasses.day;const m=document.createElement("button");m.className=`${t.CSSClasses.dayBtn}${d?` ${d}`:""}`,m.type="button",m.innerText=String(u),m.dataset.calendarDay=r,t.settings.visibility.weekNumbers&&(()=>{const g=CK(r,t.settings.iso8601);g&&(m.dataset.calendarWeekNumber=String(g.week))})(),o?t.settings.visibility.daysOutside&&h.appendChild(m):h.appendChild(m),((t,e,a)=>{var u,i,r,o,d;const h=null==(u=t.settings.range.disableWeekday)?void 0:u.includes(a),m=t.settings.range.disableAllDays&&!(null==(i=t.rangeEnabled)||!i[0]);!h&&!m||null!=(r=t.rangeEnabled)&&r.includes(e)||null!=(o=t.rangeDisabled)&&o.includes(e)||(t.rangeDisabled.push(e),null==(d=t.rangeDisabled)||d.sort((g,v)=>+new Date(g)-+new Date(v)))})(t,r,i),((t,e,a,u,i,r,o)=>{var d,h,m;if((Du(t.rangeMin)>Du(r)||Du(t.rangeMax)1&&"multiple-ranged"===t.settings.selection.day&&(t.selectedDates[0]===r&&a.classList.add(t.CSSClasses.daySelectedFirst),t.selectedDates[t.selectedDates.length-1]===r&&a.classList.add(t.CSSClasses.daySelectedLast),t.selectedDates[0]!==r&&t.selectedDates[t.selectedDates.length-1]!==r&&a.classList.add(t.CSSClasses.daySelectedIntermediate))),t.settings.range.edgesOnly&&t.selectedDates.length>1&&"multiple-ranged"===t.settings.selection.day){const g=+new Date(t.selectedDates[0]),v=+new Date(t.selectedDates[t.selectedDates.length-1]),k=+new Date(r);k>g&&k{const e=t.HTMLElement.querySelectorAll(`.${t.CSSClasses.days}`),a=t.HTMLElement.querySelectorAll(`.${t.CSSClasses.weekNumbers}`),u=new Date(t.selectedYear,t.selectedMonth,1);e.forEach((i,r)=>{const o=new Date(u);o.setMonth(o.getMonth()+r);const d=o.getMonth(),h=o.getFullYear(),m=new Date(h,d,1),g=new Date(h,d+1,0).getDate(),v=t.settings.iso8601?(0!==m.getDay()?m.getDay():7)-1:m.getDay();t.settings.selection.day&&i.classList.add(t.CSSClasses.daysSelecting),i.textContent="",((t,e,a,u,i)=>{let r=new Date(a,u,0).getDate()-(i-1);const o=0===u?a-1:a,d=0===u?12:u<10?`0${u}`:u;for(let h=i;h>0;h--,r++){const m=`${o}-${d}-${r}`,g=Du(m).getDay();SL(t,a,e,r,g,m,!0,t.CSSClasses.dayBtnPrev)}})(t,i,h,d,v),((t,e,a,u,i)=>{for(let r=1;r<=a;r++){const o=new Date(u,i,r),d=ad(o),h=o.getDay();SL(t,u,e,r,h,d,!1,null)}})(t,i,g,h,d),((t,e,a,u,i,r)=>{const o=r+a,d=7*Math.ceil(o/7)-o,h=i+1===12?u+1:u,m=i+1===12?"01":i+2<10?`0${i+2}`:i+2;for(let g=1;g<=d;g++){const v=`${h}-${m}-${g<10?`0${g}`:String(g)}`,k=Du(v).getDay();SL(t,u,e,g,k,v,!0,t.CSSClasses.dayBtnNext)}})(t,i,g,h,d,v),((t,e,a,u,i)=>{if(!t.settings.visibility.weekNumbers)return;u.textContent="";const r=document.createElement("b");r.className=t.CSSClasses.weekNumbersTitle,r.innerText="#",u.appendChild(r);const o=document.createElement("div");o.className=t.CSSClasses.weekNumbersContent,u.appendChild(o);const d=document.createElement("button");d.type="button",d.className=t.CSSClasses.weekNumber;const h=i.querySelectorAll(`.${t.CSSClasses.day}`),m=Math.ceil((e+a)/7);for(let g=0;g{var a;t.popups&&(null==(a=Object.entries(t.popups))||a.forEach(([u,i])=>((t,e,a,u)=>{const i=a.querySelector(`[data-calendar-day="${t}"]`);i&&(e?.modifier&&i.classList.add(...e.modifier.trim().split(" ")),e?.html&&(i.parentElement.innerHTML+=`
${e.html}
`))})(u,i,e,t.CSSClasses.dayPopup)))})(t,i)})},XF=t=>{var e,a;const u=null==(e=t.HTMLElement)?void 0:e.querySelectorAll("[data-calendar-selected-month]"),i=null==(a=t.HTMLElement)?void 0:a.querySelectorAll("[data-calendar-selected-year]");if(!u?.[0]&&i?.[0])return;const r=new Date(t.selectedYear,t.selectedMonth,1);u?.forEach((o,d)=>((t,e,a,u)=>{const i=new Date(u.setMonth(t.selectedMonth+a)).getMonth(),r=!1===t.settings.selection.month||"only-arrows"===t.settings.selection.month;e.tabIndex=r?-1:0,e.classList.toggle(t.CSSClasses.monthDisabled,r),e.setAttribute("data-calendar-selected-month",String(i)),e.innerText=t.locale.months[i]})(t,o,d,r)),i?.forEach((o,d)=>((t,e,a,u)=>{const i=new Date(u.setFullYear(t.selectedYear,t.selectedMonth+a)).getFullYear(),r=!1===t.settings.selection.year||"only-arrows"===t.settings.selection.year;e.tabIndex=r?-1:0,e.classList.toggle(t.CSSClasses.yearDisabled,r),e.setAttribute("data-calendar-selected-year",String(i)),e.innerText=String(i)})(t,o,d,r))},zL=(t,e)=>{const a=Du(ad(new Date(t.selectedYear,t.selectedMonth,1)));({prev:()=>a.setMonth(a.getMonth()-t.jumpMonths),next:()=>a.setMonth(a.getMonth()+t.jumpMonths)})[e](),[t.selectedMonth,t.selectedYear]=[a.getMonth(),a.getFullYear()],XF(t),BL(t),QF(t)},Zce=Object.freeze(Object.defineProperty({__proto__:null,ArrowNext:t=>``,ArrowPrev:t=>``,ControlTime:t=>t.settings.selection.time?`
`:"",Days:t=>`
`,Month:t=>``,Months:t=>`
`,Week:t=>`
`,WeekNumbers:t=>t.settings.visibility.weekNumbers?`
`:"",Year:t=>``,Years:t=>`
`},Symbol.toStringTag,{value:"Module"})),J2=(t,e)=>e.replace(/[\n\t]/g,"").replace(/<#(?!\/?Multiple)(.*?)>/g,(a,u)=>{const i=(t=>Zce[t])(u.replace(/[/\s\n\t]/g,"")),r=i?i(t):"";return t.sanitizer(r)}).replace(/[\n\t]/g,""),ML=(t,e)=>{const{HTMLElement:a,CSSClasses:u,DOMTemplates:i,type:r,currentType:o,correctMonths:d}=t,h=(g,v)=>{if(!e)return;const k=a.querySelector(`.${u.controls}`);k&&a.removeChild(k),a.querySelector(`.${u.grid}`).classList.add(u.gridDisabled);const x=e.closest(`.${u.column}`);x.classList.add(g),x.innerHTML=J2(t,v)},m={default:()=>{a.classList.add(u.calendarDefault),a.classList.remove(u.calendarMonth,u.calendarYear),a.innerHTML=J2(t,i.default)},multiple:()=>{d&&(a.classList.add(u.calendarMultiple),a.classList.remove(u.calendarMonth,u.calendarYear),a.innerHTML=((t,e)=>e.replace(/<#Multiple>(.*?)<#\/Multiple>/g,(a,u)=>{let i="";for(let r=0;r{"multiple"!==r?(a.classList.add(u.calendarMonth),a.classList.remove(u.calendarDefault,u.calendarYear),a.innerHTML=J2(t,i.month)):h(u.columnMonth,i.month)},year:()=>{"multiple"!==r?(a.classList.add(u.calendarYear),a.classList.remove(u.calendarDefault,u.calendarMonth),a.innerHTML=J2(t,i.year)):h(u.columnYear,i.year)}};a.classList.add(u.calendar),m[o]()},Yce=(t,e,a,u,i)=>{const r=e.cloneNode(!1);return r.className=`${t.CSSClasses.yearsYear}${a===i?` ${t.CSSClasses.yearsYearSelected}`:u?` ${t.CSSClasses.yearsYearDisabled}`:""}`,r.dataset.calendarYear=String(i),r.title=String(i),r.innerText=String(i),u&&(r.tabIndex=-1),r},LL=(t,e)=>{const a=e?.dataset.calendarSelectedYear?Number(e?.dataset.calendarSelectedYear):t.selectedYear;t.currentType="year",ML(t,e),XF(t),BL(t);const u=t.HTMLElement.querySelector(`.${t.CSSClasses.years}`);if(!t.settings.selection.year||!u)return;u.classList.add(t.CSSClasses.yearsSelecting);const i="multiple"!==t.type||t.selectedYear===a?0:1,r=document.createElement("button");r.type="button";for(let o=t.viewYear-7;ot.dateMax.getFullYear(),h=Yce(t,r,a,d,o);u.appendChild(h),t.actions.getYears&&t.actions.getYears(o,h,t)}},yK=t=>`${t.charAt(0).toUpperCase()}${t.substring(1,t.length)}`.replace(/\./,""),e1e=(t,e)=>{const a=new Date(`1978-01-0${e+1}T00:00:00.000Z`).toLocaleString(t.settings.lang,{weekday:"short",timeZone:"UTC"});t.locale.weekday.push(yK(a))},a1e=(t,e)=>{const a=new Date(`1978-${e+1<=9?`0${e+1}`:e+1}-01T00:00:00.000Z`).toLocaleString(t.settings.lang,{month:"long",timeZone:"UTC"});t.locale.months.push(yK(a))},_K=t=>{if("multiple"!==t.type)return 0;const e=t.HTMLElement.querySelectorAll(`.${t.CSSClasses.column}`),a=Array.from(e).findIndex(u=>u.classList.contains(`${t.CSSClasses.columnMonth}`));return a>0?a:0},u1e=(t,e,a,u,i,r)=>{const o=e.cloneNode(!1);return o.className=`${t.CSSClasses.monthsMonth}${a===r?` ${t.CSSClasses.monthsMonthSelected}`:i?` ${t.CSSClasses.monthsMonthDisabled}`:""}`,o.title=u,o.innerText=`${t.settings.visibility.monthShort?u.substring(0,3):u}`,o.dataset.calendarMonth=String(r),i&&(o.tabIndex=-1),o},FK=(t,e)=>{var a,u;const i=e?.dataset.calendarSelectedMonth?Number(e.dataset.calendarSelectedMonth):t.selectedMonth,r=null==(a=e?.closest(`.${t.CSSClasses.column}`))?void 0:a.querySelector(`.${t.CSSClasses.year}`),o=r?Number(r.dataset.calendarSelectedYear):t.selectedYear;t.currentType="month",ML(t,e),XF(t);const d=null==(u=t.HTMLElement)?void 0:u.querySelector(`.${t.CSSClasses.months}`);if(!t.settings.selection.month||!d)return;d.classList.add(t.CSSClasses.monthsSelecting);const h=t.jumpMonths>1?t.locale.months.map((g,v)=>i-t.jumpMonths*v).concat(t.locale.months.map((g,v)=>i+t.jumpMonths*v)).filter(g=>g>=0&&g<=12):Array.from(Array(12).keys()),m=document.createElement("button");m.type="button";for(let g=0;g<12;g++){const v=t.locale.months[g],k=gt.dateMax.getMonth()+_K(t)&&o>=t.dateMax.getFullYear()||g!==i&&!h.includes(g),x=u1e(t,m,i,v,k,g);d.appendChild(x),t.actions.getMonths&&t.actions.getMonths(g,x,t)}},TL=(t,e)=>t&&e?{0:{AM:"00",PM:"12"},1:{AM:"01",PM:"13"},2:{AM:"02",PM:"14"},3:{AM:"03",PM:"15"},4:{AM:"04",PM:"16"},5:{AM:"05",PM:"17"},6:{AM:"06",PM:"18"},7:{AM:"07",PM:"19"},8:{AM:"08",PM:"20"},9:{AM:"09",PM:"21"},10:{AM:"10",PM:"22"},11:{AM:"11",PM:"23"},12:{AM:"12",PM:"12"}}[Number(t)][e]:"",e7=(t,e,a)=>t.querySelector(`.${e}${a?` input[name="${a}"]`:""}`),AK=(t,e,a)=>{t.addEventListener("mouseover",()=>e.classList.add(a)),t.addEventListener("mouseout",()=>e.classList.remove(a))},Sp=(t,e,a,u)=>{({hours:()=>{t.selectedHours=a},minutes:()=>{t.selectedMinutes=a}})[u](),t.selectedTime=`${t.selectedHours}:${t.selectedMinutes}${t.selectedKeeping?` ${t.selectedKeeping}`:""}`,t.actions.changeTime&&t.actions.changeTime(e,t),t.input&&t.HTMLInputElement&&t.actions.changeToInput&&t.actions.changeToInput(e,t)},wK=(t,e,a,u,i,r)=>{e.addEventListener("input",o=>{const d=o.target,h=Number(d.value),m=h<10?`0${h}`:`${h}`;if("hours"!==i||12!==r)return a.value=m,void Sp(t,o,m,i);h0?(a.value=m,t.selectedKeeping="AM",u.innerText=t.selectedKeeping,Sp(t,o,m,i)):(0===h?(t.selectedKeeping="AM",u.innerText="AM"):(t.selectedKeeping="PM",u.innerText="PM"),a.value=U2(d.value),Sp(t,o,U2(d.value),i))})},BK=(t,e,a,u,i,r)=>{a.addEventListener("change",o=>{const d=o.target,h=Number(d.value),m=h<10?`0${h}`:`${h}`;"hours"===i&&12===r?d.value&&h<=r&&h>0?(d.value=m,e.value=TL(m,t.selectedKeeping),Sp(t,o,m,i)):d.value&&h<24&&(h>r||0===h)?(0===h?(t.selectedKeeping="AM",u.innerText="AM"):(t.selectedKeeping="PM",u.innerText="PM"),d.value=U2(d.value),e.value=m,Sp(t,o,U2(d.value),i)):d.value=t.selectedHours:d.value&&h<=r&&h>=0?(d.value=m,e.value=m,Sp(t,o,m,i)):"hours"===i?d.value=t.selectedHours:"minutes"===i&&(d.value=t.selectedMinutes)})},n1e=(t,e,a)=>{const u=24===a?23:a||12,i=e7(e,t.CSSClasses.timeRange,"hours"),r=e7(e,t.CSSClasses.timeRange,"minutes"),o=e7(e,t.CSSClasses.timeHours,"hours"),d=e7(e,t.CSSClasses.timeMinutes,"minutes"),h=e.querySelector(`.${t.CSSClasses.timeKeeping}`);AK(i,o,t.CSSClasses.isFocus),AK(r,d,t.CSSClasses.isFocus),wK(t,i,o,h,"hours",u),wK(t,r,d,h,"minutes",0),BK(t,i,o,h,"hours",u),BK(t,r,d,h,"minutes",59),h&&((t,e,a)=>{e.addEventListener("click",u=>{t.selectedKeeping=e.innerText.includes("AM")?"PM":"AM",e.innerText=t.selectedKeeping,a.value=TL(t.selectedHours,t.selectedKeeping),Sp(t,u,t.selectedHours,"hours")})})(t,h,i)},SK=(t,e,a,u)=>``,zK=(t,e,a,u,i,r)=>``,MK=t=>{const e=[...t.locale.weekday];e[0]&&(t.settings.iso8601&&e.push(e.shift()),t.HTMLElement.querySelectorAll(`.${t.CSSClasses.week}`).forEach(a=>((t,e,a)=>{const u=document.createElement("b");e.textContent="";for(let i=0;i{a7.value=!0},check:()=>a7.value},TK=(t,e)=>LK.find(a=>{var u;return"system"!==a&&(null==(u=t.getAttribute(e))?void 0:u.includes(a))}),zp=(t,e)=>{t.dataset.calendarTheme=e},PK=(t,e)=>{var a;if(a=e,zp(t.HTMLElement,a.matches?"dark":"light"),"system"!==t.settings.visibility.theme||a7.check())return;const u=i=>{const r=document.querySelectorAll(`.${t.CSSClasses.calendar}`);r?.forEach(o=>zp(o,i.matches?"dark":"light"))};e.addEventListener?e.addEventListener("change",u):e.addListener(u),a7.set()},s1e=(t,e)=>{const a=t.settings.visibility.themeDetect?document.querySelector(t.settings.visibility.themeDetect):null;if(!a)return void PK(t,e);const u=t.settings.visibility.themeDetect.replace(/^.*\[(.+)\]/g,(r,o)=>o),i=TK(a,u);i?(zp(t.HTMLElement,i),((t,e,a)=>{new MutationObserver(u=>{for(let i=0;i{const e={default:()=>{MK(t),QF(t)},multiple:()=>{MK(t),QF(t)},month:()=>FK(t),year:()=>LL(t)};(t=>{if(!LK.includes(t.settings.visibility.theme))throw new Error(_v_incorrectTheme);"not all"!==window.matchMedia("(prefers-color-scheme)").media?{light:()=>zp(t.HTMLElement,"light"),dark:()=>zp(t.HTMLElement,"dark"),system:()=>s1e(t,window.matchMedia("(prefers-color-scheme: dark)"))}[t.settings.visibility.theme]():zp(t.HTMLElement,"light")})(t),(t=>{if("define"!==t.settings.lang||!t.locale.weekday[6]||!t.locale.months[11]){if("define"===t.settings.lang)throw new Error(_v_notLocale);t.locale.weekday=[],t.locale.months=[];for(let e=0;e<7;e++)e1e(t,e);for(let e=0;e<12;e++)a1e(t,e)}})(t),ML(t),XF(t),BL(t),(t=>{const e=t.HTMLElement.querySelector(`.${t.CSSClasses.time}`);if(!e)return;const a=!0===t.settings.selection.time?12:t.settings.selection.time,u="range"===t.settings.selection.controlTime,[i,r]=[0,23],[o,d]=[0,59];e.innerHTML=t.sanitizer(`
${SK("hours",t.CSSClasses.timeHours,t.selectedHours,u)}${SK("minutes",t.CSSClasses.timeMinutes,t.selectedMinutes,u)}${12===a?``:""}
${zK("hours",t.CSSClasses.timeRange,i,r,t.settings.selection.stepHours,t.selectedKeeping?TL(t.selectedHours,t.selectedKeeping):t.selectedHours)}${zK("minutes",t.CSSClasses.timeRange,o,d,t.settings.selection.stepMinutes,t.selectedMinutes)}
`),n1e(t,e,a)})(t),e[t.currentType]()},ot={self:null,rangeMin:void 0,rangeMax:void 0},NK=()=>{var t;if(null==(t=ot.self)||!t.HTMLElement)return;const{CSSClasses:e}=ot.self;ot.self.HTMLElement.querySelectorAll(`.${ot.self.CSSClasses.dayBtnHover}`).forEach(a=>{var u;a.classList.remove(ot.self.CSSClasses.dayBtnHover),null==(u=a.parentElement)||u.classList.remove(e.dayHoverIntermediate,e.dayHoverFirst,e.dayHoverLast)})},c1e=(t,e,a)=>{var u,i,r;if(null==(u=ot.self)||!u.selectedDates)return;const o=ad(t),{CSSClasses:d}=ot.self;if(null!=(i=ot.self.rangeDisabled)&&i.includes(o))return;const h=null==(r=ot.self.HTMLElement)?void 0:r.querySelectorAll(`[data-calendar-day="${o}"]`);h?.forEach(m=>{var g;m.classList.add(d.dayBtnHover),null==(g=m.parentElement)||g.classList.add(d.dayHoverIntermediate)}),e?.forEach(m=>{var g;return null==(g=m.parentElement)?void 0:g.classList.add(d.dayHoverFirst)}),a?.forEach(m=>{var g;return null==(g=m.parentElement)?void 0:g.classList.add(d.dayHoverLast)})},PL=t=>{var e;if(!t.target||null==(e=ot.self)||!e.selectedDates)return;if(!t.target.closest(`.${ot.self.CSSClasses.days}`))return void NK();const a=t.target.closest("[data-calendar-day]");if(!a)return;const u=a.dataset.calendarDay,i=Du(ot.self.selectedDates[0]),r=Du(u),o=ot.self.HTMLElement.querySelectorAll(`[data-calendar-day="${ot.self.selectedDates[0]}"]`),d=ot.self.HTMLElement.querySelectorAll(`[data-calendar-day="${u}"]`),[h,m]=i{ot.self&&"Escape"===t.key&&(ot.self.selectedDates=[],ot.self.HTMLElement.removeEventListener("mousemove",PL),document.removeEventListener("keydown",NL),Z2(ot.self))},IK=(t,e)=>{var a;if(e){const u=1===t.selectedDates.length&&t.selectedDates[0].includes(e);t.selectedDates=u&&!t.settings.selection.cancelableDay?[e,e]:u&&t.settings.selection.cancelableDay?[]:t.selectedDates.length>1?[e]:[...t.selectedDates,e],null==(a=t.selectedDates)||a.sort((i,r)=>+new Date(i)-+new Date(r))}t.settings.range.disableGaps&&(ot.rangeMin=ot.rangeMin?ot.rangeMin:t.rangeMin,ot.rangeMax=ot.rangeMax?ot.rangeMax:t.rangeMax),ot.self=t,{set:()=>{t.HTMLElement.addEventListener("mousemove",PL),document.addEventListener("keydown",NL),t.settings.range.disableGaps&&(()=>{var t,e,a;if(null==(e=null==(t=ot.self)?void 0:t.selectedDates)||!e[0]||!ot.self.rangeDisabled||(null==(a=ot.self.rangeDisabled)?void 0:a.length)<2)return;const u=Du(ot.self.selectedDates[0]),[i,r]=ot.self.rangeDisabled.map(o=>Du(o)).reduce(([o,d],h)=>[u>=h?h:o,u{const[u,i]=[t.selectedDates[0],t.selectedDates[t.selectedDates.length-1]];t.selectedDates=t.selectedDates[0]!==t.selectedDates[t.selectedDates.length-1]?t.settings.range.edgesOnly?[u,i]:yv([`${u}:${i}`]):[t.selectedDates[0],t.selectedDates[0]],t.HTMLElement.removeEventListener("mousemove",PL),document.removeEventListener("keydown",NL),t.settings.range.disableGaps&&ot.self&&(ot.self.rangeMin=ot.rangeMin,ot.self.rangeMax=ot.rangeMax)}}[1===t.selectedDates.length?"set":"reset"]()},RK=(t,e,a)=>{if(!e.dataset.calendarDay)return;const u=e.dataset.calendarDay,i=e.classList.contains(t.CSSClasses.dayBtnSelected);if(i&&!t.settings.selection.cancelableDay)return;let r=!0;void 0!==t.toggleSelected&&(r="function"==typeof t.toggleSelected?t.toggleSelected(t):t.toggleSelected),i&&!r||(t.selectedDates=i?t.selectedDates.filter(o=>o!==u):a?[...t.selectedDates,u]:[u])},HK=(t,e,a,u,i)=>{const r=t.HTMLElement.querySelectorAll(`.${t.CSSClasses.column}`),o=Array.from(r).findIndex(h=>h.classList.contains(e)),d=Number(r[o].querySelector(`.${a}`).getAttribute(i));return"month"===t.currentType&&o>=0?u-o:"year"===t.currentType&&t.selectedYear!==d?u-1:u},VK=(t,e,a,u)=>{if(!t.settings.selection[a])return;const i=e.target,r=g=>i.closest(`.${g}`),o=r(u.header),d=r(u.item),h=r(t.CSSClasses.grid),m=r(t.CSSClasses.column);t.currentType!==a&&o?{year:()=>LL(t,i),month:()=>FK(t,i)}[a]():d?((t,e,a,u,i)=>{const r={year:()=>{var o,d;return null==(d=(o=t.actions).clickYear)?void 0:d.call(o,e,t)},month:()=>{var o,d;return null==(d=(o=t.actions).clickMonth)?void 0:d.call(o,e,t)}};({year:()=>{if("multiple"===t.type){const o=HK(t,t.CSSClasses.columnYear,t.CSSClasses.year,Number(i.dataset.calendarYear),"data-calendar-selected-year"),d=t.selectedMontht.dateMax.getMonth()&&o>=t.dateMax.getFullYear(),m=ot.dateMax.getFullYear();d||m?(t.selectedYear=t.dateMin.getFullYear(),t.selectedMonth=t.dateMin.getMonth()):h||g?(t.selectedYear=t.dateMax.getFullYear(),t.selectedMonth=t.dateMax.getMonth()):t.selectedYear=o}else t.selectedYear=Number(i.dataset.calendarYear)},month:()=>{if("multiple"===t.type){const o=HK(t,t.CSSClasses.columnMonth,t.CSSClasses.month,Number(i.dataset.calendarMonth),"data-calendar-selected-month"),d=i.closest(`.${u.column}`).querySelector(`.${t.CSSClasses.year}`);t.selectedYear=Number(d.dataset.calendarSelectedYear);const h=ot.dateMax.getMonth()&&t.selectedYear>=t.dateMax.getFullYear();t.selectedMonth=h?t.dateMin.getMonth():m?t.dateMax.getMonth():o}else t.selectedMonth=Number(i.dataset.calendarMonth)}})[a](),r[a](),t.currentType=t.type,Z2(t)})(t,e,a,u,d):(t.currentType===a&&o||"multiple"===t.type&&t.currentType===a&&h&&!m)&&(t.currentType=t.type,Z2(t))},OK=t=>{const e=a=>{((t,e)=>{const a=e.target.closest(`.${t.CSSClasses.arrow}`);a&&(["default","multiple"].includes(t.currentType)?zL(t,a.dataset.calendarArrow):"year"===t.currentType&&void 0!==t.viewYear&&(t.viewYear+={prev:-15,next:15}[a.dataset.calendarArrow],LL(t,e.target)),t.actions.clickArrow&&t.actions.clickArrow(e,t))})(t,a),((t,e)=>{var a;if(!t.settings.visibility.weekNumbers||!t.actions.clickWeekNumber)return;const u=e.target.closest(`.${t.CSSClasses.weekNumber}`),i=null==(a=t.HTMLElement)?void 0:a.querySelectorAll("[data-calendar-week-number]");if(!u||!i)return;const r=Number(u.innerText),o=Number(u.dataset.calendarYearWeek),d=Array.from(i).filter(h=>Number(h.dataset.calendarWeekNumber)===r);t.actions.clickWeekNumber(e,r,d,o,t)})(t,a),((t,e)=>{var a;const u=e.target,i=h=>u.closest(`.${h}`),r=i(t.CSSClasses.dayBtn);if(!t.settings.selection.day||!["single","multiple","multiple-ranged"].includes(t.settings.selection.day)||!r)return;({single:()=>RK(t,r,!1),multiple:()=>RK(t,r,!0),"multiple-ranged":()=>IK(t,r.dataset.calendarDay)})[t.settings.selection.day](),null==(a=t.selectedDates)||a.sort((h,m)=>+new Date(h)-+new Date(m)),t.actions.clickDay&&t.actions.clickDay(e,t),t.input&&t.HTMLInputElement&&t.HTMLElement&&t.actions.changeToInput&&t.actions.changeToInput(e,t);const o=i(t.CSSClasses.dayBtnPrev),d=i(t.CSSClasses.dayBtnNext);({prev:()=>zL(t,"prev"),next:()=>zL(t,"next"),default:()=>QF(t)})[o?"prev":d?"next":"default"]()})(t,a),VK(t,a,"month",{header:t.CSSClasses.month,item:t.CSSClasses.monthsMonth,column:t.CSSClasses.columnMonth}),VK(t,a,"year",{header:t.CSSClasses.year,item:t.CSSClasses.yearsYear,column:t.CSSClasses.columnYear})};return t.HTMLElement.addEventListener("click",e),()=>t.HTMLElement.removeEventListener("click",e)};function IL(t){if(!t||!t.getBoundingClientRect)return{top:0,bottom:0,left:0,right:0};const e=t.getBoundingClientRect(),a=document.documentElement;return{bottom:e.bottom,right:e.right,top:e.top+window.pageYOffset-a.clientTop,left:e.left+window.pageXOffset-a.clientLeft}}function jK(){return{vw:Math.max(document.documentElement.clientWidth||0,window.innerWidth||0),vh:Math.max(document.documentElement.clientHeight||0,window.innerHeight||0)}}function v1e(t){var e,a;let u=0,i=0,r=0,o=0;const d=function E1e(){return{left:window.pageXOffset||document.documentElement.scrollLeft||0,top:window.pageYOffset||document.documentElement.scrollTop||0}}(),h=IL(t),{vh:m,vw:g}=jK(),v=d.top,k=d.left;if(h){const x=null!=(e=h.top)?e:0,D=null!=(a=h.left)?a:0;i=x-v,r=D-k,u=m-(x-v+t.clientHeight),o=g-(D-k+t.clientWidth)}return{top:i,bottom:u,left:r,right:o}}function k1e(t,e){let a="left";if(e&&t){const{canShow:u,parentPositions:i}=function b1e(t,e,a=5){const u={top:!0,bottom:!0,left:!0,right:!0},i=[];if(e&&t){const{bottom:r,top:o}=v1e(t),{top:d,left:h}=IL(t),{height:m,width:g}=e.getBoundingClientRect(),{vh:v,vw:k}=jK(),x={x:k/2,y:v/2};dx.y&&i.push("bottom"),hx.x&&i.push("right"),m>o-a&&(u.top=!1),m>r-a&&(u.bottom=!1),g>h&&(u.left=!1),k-h{if(t){const i="auto"===a?k1e(t,e):a,r={top:-e.offsetHeight,bottom:t.offsetHeight,left:0,center:t.offsetWidth/2-e.offsetWidth/2,right:t.offsetWidth-e.offsetWidth},o=Array.isArray(i)?i[0]:"bottom",d=Array.isArray(i)?i[1]:i;"bottom"===o?(e.classList.remove(u.calendarToInputTop),e.classList.add(u.calendarToInputBottom)):(e.classList.remove(u.calendarToInputBottom),e.classList.add(u.calendarToInputTop));const{top:h,left:m}=IL(t),g=h+r[o],v=m+r[d];Object.assign(e.style,{left:`${v}px`,top:`${g}px`})}},GK=(t,{year:e,month:a,dates:u,holidays:i,time:r}={})=>{var o;const d=kK({},t.settings.selected);t.settings.selected.year=e?d.year:t.selectedYear,t.settings.selected.month=a?d.month:t.selectedMonth,t.settings.selected.holidays=i?d.holidays:t.selectedHolidays,t.settings.selected.time=r?d.time:t.selectedTime,t.settings.selected.dates="only-first"===u&&null!=(o=t.selectedDates)&&o[0]?[t.selectedDates[0]]:!0===u?d.dates:t.selectedDates,fK(t),Z2(t),t.settings.selected=d,"multiple-ranged"===t.settings.selection.day&&u&&IK(t)},KK=(t,e=!0)=>{t.isInputInit=!0;const a=document.createElement("div");return a.className=`${t.CSSClasses.calendar} ${t.CSSClasses.calendarToInput} ${t.CSSClasses.calendarHidden}`,t.HTMLElement=a,document.body.appendChild(t.HTMLElement),t.HTMLElement.style.visibility="hidden",e&&queueMicrotask(()=>{RL(t.HTMLInputElement,a,t.settings.visibility.positionToInput,t.CSSClasses),t.HTMLElement.style.visibility="visible",t.show()}),GK(t,{year:!0,month:!0,dates:!0,holidays:!0,time:!0}),t.actions.initCalendar&&t.actions.initCalendar(t),OK(t)},f1e=t=>(t.HTMLOriginalElement=t.HTMLElement.cloneNode(!0),t.isInit=!0,t.input?(t=>{const e=[];t.HTMLInputElement=t.HTMLElement;const a=()=>RL(t.HTMLInputElement,t.HTMLElement,t.settings.visibility.positionToInput,t.CSSClasses),u=i=>{var r;t&&i.target!==t.HTMLInputElement&&(null==(r=t.HTMLElement)||!r.contains(i.target))&&(t.HTMLInputElement&&t.HTMLElement&&t.hide(),window.removeEventListener("resize",a),document.removeEventListener("click",u,{capture:!0}))};return t.HTMLInputElement.addEventListener("click",()=>{t.isInputInit?(RL(t.HTMLInputElement,t.HTMLElement,t.settings.visibility.positionToInput,t.CSSClasses),t.HTMLElement.style.visibility="visible",t.show()):e.push(KK(t)),window.addEventListener("resize",a),document.addEventListener("click",u,{capture:!0})}),()=>{e.forEach(i=>i())}})(t):(fK(t),Z2(t),t.actions.initCalendar&&t.actions.initCalendar(t),OK(t)));function HL(t,...e){const a=i=>i&&"object"==typeof i&&!Array.isArray(i);if(!e.length)return t;const u=e.shift();return a(t)&&a(u)&&Object.keys(u).forEach(i=>{a(u[i])?(t[i]||Object.assign(t,{[i]:{}}),HL(t[i],u[i])):Object.assign(t,{[i]:u[i]})}),HL(t,...e)}function F1e(t,e,a){t.settings=HL(t.settings,{[e]:a})}class WK extends xce{constructor(e,a){if(super(),Ka(this,"init",()=>f1e(this)),Ka(this,"update",i=>((t,{year:e,month:a,dates:u,holidays:i,time:r}={})=>{if(!t.isInit)throw new Error(_v_notInit);t.input&&!t.isInputInit&&KK(t,!1),GK(t,{year:e,month:a,dates:u,holidays:i,time:r}),t.actions.updateCalendar&&t.actions.updateCalendar(t)})(this,i)),Ka(this,"destroy",()=>(t=>{var e,a,u,i,r,o;if(!t.isInit)throw new Error(_v_notInit);t.input?(null==(a=null==(e=t.HTMLElement)?void 0:e.parentElement)||a.removeChild(t.HTMLElement),null==(i=null==(u=t.HTMLInputElement)?void 0:u.replaceWith)||i.call(u,t.HTMLOriginalElement),t.HTMLInputElement=void 0):null==(o=null==(r=t.HTMLElement)?void 0:r.replaceWith)||o.call(r,t.HTMLOriginalElement),t.HTMLElement=t.HTMLOriginalElement,t.actions.destroyCalendar&&t.actions.destroyCalendar(t)})(this)),Ka(this,"show",()=>(t=>{t.currentType?(t.HTMLElement.classList.remove(t.CSSClasses.calendarHidden),t.actions.showCalendar&&t.actions.showCalendar(t)):t.HTMLElement.click()})(this)),Ka(this,"hide",()=>(t=>{t.currentType&&(t.HTMLElement.classList.add(t.CSSClasses.calendarHidden),t.actions.hideCalendar&&t.actions.hideCalendar(t))})(this)),Ka(this,"changeSetting",(i,r)=>F1e(this,i,r)),this.HTMLElement="string"==typeof e?document.querySelector(e):e,!this.HTMLElement)throw new Error(_v_notFoundSelector(e));if(!a)return;const u=(i,r)=>{Object.keys(r).forEach(o=>{"object"!=typeof i[o]||"object"!=typeof r[o]||r[o]instanceof Date?i[o]=r[o]:u(i[o],r[o])})};u(this,a)}}class UK{constructor(e){this.translaterService=e,this._clearFilterTriggered=!1,this._lastClickIsDate=!1,this._shouldTriggerQuery=!0,this.hasTimePicker=!1,this.inputFilterType="range",this.searchTerms=[],this._bindEventService=new Ni}get gridOptions(){return this.grid?.getOptions()??{}}get columnFilter(){return this.columnDef?.filter||{}}get currentDateOrDates(){return this._currentDateOrDates}get defaultOperator(){return"compound"===this.inputFilterType?te.empty:this.gridOptions.defaultFilterRangeOperator||te.rangeInclusive}get pickerOptions(){return this._pickerOptions||{}}get filterOptions(){return{...this.gridOptions.defaultFilterOptions?.date,...this.columnFilter?.filterOptions}}get operator(){return"compound"===this.inputFilterType?this._operator||this.columnFilter.operator||this.defaultOperator:this.columnFilter?.operator??this.defaultOperator}set operator(e){"compound"===this.inputFilterType?this._operator=e:this.columnFilter&&(this.columnFilter.operator=e)}init(e){if(!e)throw new Error('[Slickgrid-Universal] A filter must always have an "init()" with valid arguments.');this.grid=e.grid,this.callback=e.callback,this.columnDef=e.columnDef,"compound"===this.inputFilterType&&(this.operator=e.operator||""),this.searchTerms=e?.searchTerms??[],this.filterContainerElm=e.filterContainerElm;const a="compound"===this.inputFilterType?Array.isArray(this.searchTerms)&&this.searchTerms.length>=0?this.searchTerms[0]:"":this.searchTerms;this._filterElm=this.createDomFilterElement(a),this.updateFilterStyle(this.searchTerms.length>0),this._selectOperatorElm&&this._bindEventService.bind(this._selectOperatorElm,"change",this.onTriggerEvent.bind(this)),this._bindEventService.bind(document.body,"keydown",u=>{("Escape"===u.key||"Tab"===u.key)&&this.hide()}),this._bindEventService.bind(this._dateInputElm,"keydown",u=>{"Backspace"===u.key&&this.clear(!0,!1)})}clear(e=!0,a=!0){if(this.calendarInstance&&(this._clearFilterTriggered=a,this._shouldTriggerQuery=e,this._currentValue="",this.searchTerms=[],this._currentDateStrings=[],this._selectOperatorElm&&(this._selectOperatorElm.selectedIndex=0),this.calendarInstance)){const u=new Date;W2(this.columnFilter,this._dateInputElm,this.calendarInstance,{columnDef:this.columnDef,oldVal:this._currentDateOrDates,newVal:"",updatePickerUI:!0,selectedSettings:{dates:[],month:u.getMonth(),year:u.getFullYear()}})}this.onTriggerEvent(new Event("keyup")),this.updateFilterStyle(!1)}destroy(){this._bindEventService.unbindAll(),this.calendarInstance?.destroy(),_t(this.filterContainerElm),this.filterContainerElm?.remove(),this._selectOperatorElm?.remove(),this._filterElm?.remove()}hide(){"function"==typeof this.calendarInstance?.hide&&this.calendarInstance.hide()}show(){"function"==typeof this.calendarInstance?.show&&this.calendarInstance.show()}getValues(){return this._currentDateOrDates}setValues(e,a,u=!1){let i;"compound"===this.inputFilterType?i=Array.isArray(e)?e[0]:e:"string"==typeof e||Array.isArray(e)&&"string"==typeof e[0]&&e[0].indexOf("..")>0?i="string"==typeof e?[e]:e[0].split(".."):Array.isArray(e)&&(i=e),this.calendarInstance&&void 0!==i&&(W2(this.columnFilter,this._dateInputElm,this.calendarInstance,{columnDef:this.columnDef,newVal:i,updatePickerUI:!0}),this._currentDateOrDates=e&&i?i:void 0);const r=this.getValues()||[],o=Array.isArray(r)?r:[r];if(this.updateFilterStyle(o.length>0),this.operator=a||this.defaultOperator,a&&this._selectOperatorElm){const d=bv(this.operator);this._selectOperatorElm.value=d}u&&this.callback(void 0,{columnDef:this.columnDef,searchTerms:o,operator:this.operator,shouldTriggerQuery:!0})}buildDatePickerInput(e){const a=this.columnDef?.id??"",u=this.columnFilter.type||this.columnDef.type||w.dateIso,i=this.columnDef.outputType||this.columnFilter.type||this.columnDef.type||w.dateUtc,r=tl(i),o=this.columnFilter.type||this.columnDef.type||w.dateIso;r&&"range"!==this.inputFilterType&&("ISO8601"===r||r.toLowerCase().includes("h"))&&(this.hasTimePicker=!0);const d=tl(this.hasTimePicker?w.dateTimeIsoAM_PM:w.dateIso),h=(this.filterOptions?.locale??this.translaterService?.getCurrentLanguage?.())||this.gridOptions.locale||"en";let m;"compound"===this.inputFilterType?e&&(m=e,this._currentDateOrDates=e):("string"==typeof e||Array.isArray(e)&&"string"==typeof e[0]&&e[0].indexOf("..")>0?m="string"==typeof e?[e]:e[0].split(".."):Array.isArray(e)&&(m=e),Array.isArray(m)&&(this._currentDateOrDates=m,this._currentDateStrings=m.map(k=>ed(k,void 0,o))));const g={input:!0,jumpToSelectedDate:!0,type:"range"===this.inputFilterType?"multiple":"default",sanitizer:k=>this.grid.sanitizeHtmlString(k),toggleSelected:!1,actions:{clickDay:k=>{this._lastClickIsDate=!0},changeToInput:(k,x)=>{if(x.HTMLInputElement){let D=[],C="",F="";if(x.selectedDates[1]){x.selectedDates.sort((M,L)=>+new Date(M)-+new Date(L)),C=x.selectedDates[0],F=x.selectedDates[x.selectedDates.length-1];const A=Pi(x.selectedDates[0],r,"en-US"),z=Pi(F,r,"en-US");x.HTMLInputElement.value=`${A} \u2014 ${z}`,D=[C,F]}else x.selectedDates[0]?(C=x.selectedDates[0],x.HTMLInputElement.value=ed(C,w.dateIso,i),D=x.selectedDates):x.HTMLInputElement.value="";if(this.hasTimePicker&&C){const A=qF(C,d);A.setHours(+(x.selectedHours||0)),A.setMinutes(+(x.selectedMinutes||0)),x.HTMLInputElement.value=ed(A,void 0,i),D=[A]}if("compound"===this.inputFilterType?this._currentValue=ed(D[0],void 0,u):Array.isArray(D)&&(this._currentDateStrings=D.map(A=>ed(A,void 0,u)),this._currentValue=this._currentDateStrings.join("..")),this._currentDateOrDates=D.map(A=>A instanceof Date?A:qF(A,d)),this._currentValue){const A=this.hasTimePicker?new Event("keyup"):void 0;this.onTriggerEvent(A)}"range"===this.inputFilterType&&x.selectedDates.length<2&&(this._lastClickIsDate=!1),this._lastClickIsDate&&(x.hide(),this._lastClickIsDate=!1)}}},settings:{lang:h,iso8601:!1,visibility:{theme:this.gridOptions?.darkMode?"dark":"light",positionToInput:"auto",weekend:!1}}};"range"===this.inputFilterType&&(g.type="multiple",g.months=2,g.jumpMonths=2,g.settings={...g.settings,range:{edgesOnly:!0},selection:{day:"multiple-ranged"},visibility:{...g.settings?.visibility,daysOutside:!1}}),this.hasTimePicker&&(g.settings.selection??={},g.settings.selection.time=24),this._pickerOptions=cu(!0,{},g,{settings:this.filterOptions});let v=this.gridOptions?.defaultFilterPlaceholder??"";this.columnFilter?.placeholder&&(v=this.columnFilter.placeholder),this._dateInputElm=T("input",{type:"text",className:"form-control date-picker",placeholder:v,readOnly:!0,dataset:{input:"",columnid:`${a}`}}),this.calendarInstance=new WK(this._dateInputElm,this._pickerOptions),this.calendarInstance.init(),this._pickerOptions.settings?.selected?.dates&&(m=this._pickerOptions.settings.selected.dates),m&&W2(this.columnFilter,this._dateInputElm,this.calendarInstance,{columnDef:this.columnDef,oldVal:void 0,newVal:m,updatePickerUI:!1})}getOperatorOptionValues(){let e;return e=this.columnFilter?.compoundOperatorList?this.columnFilter.compoundOperatorList:FL(this.gridOptions,this.translaterService),AL(this.gridOptions,e,"numeric"),e}createDomFilterElement(e){const a=this.columnDef?.id??"";if(_t(this.filterContainerElm),this.buildDatePickerInput(e),"range"===this.inputFilterType){const u=T("div",{className:`date-picker form-group search-filter filter-${a}`});return Array.isArray(e)&&e.length>0&&""!==e[0]&&(this._currentDateOrDates=e,this._currentValue=e[0]),u.appendChild(this._dateInputElm),u&&this.filterContainerElm.appendChild(u),u}{this._selectOperatorElm=yL(this.getOperatorOptionValues(),this.grid);const u=T("div",{className:`date-picker form-group search-filter filter-${a}`}),i=T("div",{className:"input-group date-picker"},u);if(T("div",{className:"input-group-addon input-group-prepend operator"},i).appendChild(this._selectOperatorElm),i.appendChild(this._dateInputElm),this.operator){const o=bv(this.operator);this._selectOperatorElm.value=o}return this._currentDateOrDates=e,this._currentValue=e,u&&this.filterContainerElm.appendChild(u),u}}onTriggerEvent(e){if(this._clearFilterTriggered)this.callback(e,{columnDef:this.columnDef,clearFilterTriggered:this._clearFilterTriggered,shouldTriggerQuery:this._shouldTriggerQuery}),this.updateFilterStyle(!1);else if("range"===this.inputFilterType){const a=this._currentDateStrings?this._currentDateStrings:[this._currentValue];this.updateFilterStyle(a.length>0),this.callback(e,{columnDef:this.columnDef,searchTerms:a,operator:this.operator||"",shouldTriggerQuery:this._shouldTriggerQuery})}else if("compound"===this.inputFilterType&&this._selectOperatorElm){const a=this._selectOperatorElm.value;this.updateFilterStyle(!!this._currentValue);const u=this.columnFilter.skipCompoundOperatorFilterWithNullInput??this.gridOptions.skipCompoundOperatorFilterWithNullInput??void 0===this.gridOptions.skipCompoundOperatorFilterWithNullInput,i=u&&xt(this._currentDateOrDates)||""===this._currentDateOrDates&&xt(this._lastSearchValue);(!u||!u||i)&&this.callback(e,{columnDef:this.columnDef,searchTerms:this._currentValue?[this._currentValue]:null,operator:a||"",shouldTriggerQuery:this._shouldTriggerQuery})}this._clearFilterTriggered=!1,this._shouldTriggerQuery=!0,this._lastSearchValue=this._currentValue}updateFilterStyle(e){e?this._filterElm.classList.add("filled"):this._filterElm.classList.remove("filled")}}class JK{constructor(e){this.translaterService=e}filterCollection(e,a,u=L2.chain){let i=[];return Array.isArray(a)?(i=u===L2.merge?[]:[...e],a.forEach(r=>{if(u===L2.merge){const o=this.singleFilterCollection(e,r);i=YG([...i,...o])}else i=this.singleFilterCollection(i,r)})):i=this.singleFilterCollection(e,a),i}singleFilterCollection(e,a){let u=[];if(a){const i=a.property,r=a.operator||te.equal,o=typeof a.value>"u"?"":a.value;switch(r){case te.equal:u=i?e.filter(d=>d[i]===o):e.filter(d=>d===o);break;case te.contains:u=i?e.filter(d=>-1!==d[i]?.toString().indexOf(o.toString())):e.filter(d=>null!=d&&-1!==d.toString().indexOf(o.toString()));break;case te.notContains:u=i?e.filter(d=>-1===d[i]?.toString().indexOf(o.toString())):e.filter(d=>null!=d&&-1===d.toString().indexOf(o.toString()));break;case te.notEqual:default:u=i?e.filter(d=>d[i]!==o):e.filter(d=>d!==o)}}return u}sortCollection(e,a,u,i){if(i&&(!this.translaterService||!this.translaterService.translate))throw new Error('[Slickgrid-Universal] requires a Translate Service to be installed and configured when the grid option "enableTranslate" is enabled.');let r=[];if(u)if(Array.isArray(u))r=a.sort((o,d)=>{for(let h=0,m=u.length;h{const v=i?this.translaterService?.translate&&this.translaterService.translate(m[o]||" "):m[o],k=i?this.translaterService?.translate&&this.translaterService.translate(g[o]||" "):g[o],x=Cv(h,v,k,d,e);return x!==Gt.neutral?x:Gt.neutral})}else if(u&&!u.property){const o=u.sortDesc?Gt.desc:Gt.asc,d=u?.fieldType??e?.type??w.string;r=a.sort((h,m)=>{const g=i?this.translaterService?.translate&&this.translaterService.translate(h||" "):h,v=i?this.translaterService?.translate&&this.translaterService.translate(m||" "):m,k=Cv(d,g,v,o,e);return k!==Gt.neutral?k:Gt.neutral})}return r}}function ZK(t,e,a,u,i=!1,r,o){const d=a?.id??"",h=u.getOptions(),m=("editor"===t?a?.editor:a?.filter)??{},v=(m?.collectionOptions??{})?.separatorBetweenTextLabels??"",k=m?.enableTranslateLabel??!1,x=h?.enableTranslate??!1,D=m?.enableRenderHtml??!1,C=m?.customStructure?.label??"label",F=m?.customStructure?.labelPrefix??"labelPrefix",A=m?.customStructure?.labelSuffix??"labelSuffix",z=m?.customStructure?.optionLabel??"value",M=m?.customStructure?.value??"value",L=T("select",{className:"ms-filter search-filter"}),R="filter"===t?["search-filter",`filter-${d}`]:["select-editor",`editor-${d}`];L.classList.add(...R),L.multiple=i;const G=[];let $=!1;return Array.isArray(e)&&(e.every(Y=>"number"==typeof Y||"string"==typeof Y)?e.forEach(Y=>{const re={text:String(Y),value:Y};"filter"===t&&Array.isArray(o)&&(re.selected=o.findIndex(He=>He===Y)>=0),G.push(re),(re.selected&&i||re.selected&&!i&&""!==Y)&&($=!0)}):e.forEach(Y=>{if(void 0===Y||"object"==typeof Y&&void 0===Y[C]&&void 0===Y.labelKey)throw new Error("[Slickgrid-Universal] Select Filter/Editor collection with value/label (or value/labelKey when using Locale) is required to populate the Select list, for example:: { filter: model: Filters.multipleSelect, collection: [ { value: '1', label: 'One' } ]')");const re=Y.labelKey||Y[C],He=(Y.labelKey||k&&r)&&re&&x?r?.translate(re||" "):re;let Ve=Y[F]||"",Be=Y[A]||"",fa=Y.hasOwnProperty(z)?Y[z]:"";fa?.toString&&(fa=fa.toString().replace(/"/g,"'")),Ve=k&&r&&Ve&&"string"==typeof Ve?r.translate(Ve||" "):Ve,Be=k&&r&&Be&&"string"==typeof Be?r.translate(Be||" "):Be,fa=k&&r&&fa&&"string"==typeof fa?r.translate(fa||" "):fa;let vt=[Ve,"string"==typeof He||"number"==typeof He?He.toString():He,Be].filter(Ua=>Ua).join(v);const Ya={text:"",value:""};D&&(vt=u.sanitizeHtmlString(vt)),Ya.text=vt;let Ne=Y[M];null==Ne&&(Ne=""),"filter"===t&&Array.isArray(o)&&(Ya.selected=o.findIndex(Ua=>`${Ua}`==`${Y[M]}`)>=0),Ya.value=`${Ne??""}`,G.push(Ya),(Ya.selected&&i||Ya.selected&&!i&&""!==Y[M])&&($=!0)})),{selectElement:L,dataCollection:G,hasFoundSearchTerm:$}}class w1e{constructor(e,a,u){this.sharedService=e,this.backendUtilities=a,this.translaterService=u}getPickerTitleOutputString(e,a){if(this.sharedService.gridOptions?.enableTranslate&&!this.translaterService?.translate)throw new Error('[Slickgrid-Universal] requires a Translate Service to be installed and configured when the grid option "enableTranslate" is enabled.');let u="";const i=this.sharedService.gridOptions?.[a]??{},r=this.sharedService.gridOptions?.enableTranslate??!1,o=this.sharedService.gridOptions?.locales??ue.locales,d=i?.[e],h=i?.[`${e}Key`],g=Gl(this.sharedService.gridOptions);if(h&&this.translaterService?.translate)u=this.translaterService.translate(h||" ");else switch(e){case"commandTitle":u=d||r&&this.translaterService?.getCurrentLanguage&&this.translaterService?.translate(`${g}COMMANDS`)||o?.TEXT_COMMANDS;break;case"columnTitle":u=d||r&&this.translaterService?.getCurrentLanguage&&this.translaterService?.translate(`${g}COLUMNS`)||o?.TEXT_COLUMNS;break;case"forceFitTitle":u=d||r&&this.translaterService?.getCurrentLanguage&&this.translaterService?.translate(`${g}FORCE_FIT_COLUMNS`)||o?.TEXT_FORCE_FIT_COLUMNS;break;case"syncResizeTitle":u=d||r&&this.translaterService?.getCurrentLanguage&&this.translaterService?.translate(`${g}SYNCHRONOUS_RESIZE`)||o?.TEXT_SYNCHRONOUS_RESIZE;break;default:u=d}return u}readjustFrozenColumnIndexWhenNeeded(e,a,u){if(e>=0){const i=u.findIndex(r=>r.id===this.sharedService.frozenVisibleColumnId);i>=0&&i!==e&&(this.sharedService.gridOptions.frozenColumn=i,this.sharedService.slickGrid.setOptions({frozenColumn:i})),Array.isArray(u)&&Array.isArray(a)&&u.length!==a.length&&this.sharedService.slickGrid.setColumns(u)}}refreshBackendDataset(e){let a=this.sharedService.gridOptions;e&&(a={...this.sharedService.gridOptions,...e},this.sharedService.gridOptions=a),this.backendUtilities?.refreshBackendDataset(a)}runOverrideFunctionWhenExists(e,a){return"function"!=typeof e||!!e.call(this,a)}sortItems(e,a){Array.isArray(e)&&e.sort((u,i)=>u&&i&&u.hasOwnProperty(a)&&i.hasOwnProperty(a)?u[a]-i[a]:0)}translateItems(e,a,u){if(Array.isArray(e))for(const i of e)i.hasOwnProperty(a)&&(i[u]=this.translaterService?.translate?.(i[a]))}translateMenuItemsFromTitleKey(e,a="commandItems"){for(const u of e)"object"==typeof u&&(u.titleKey&&(u.title=this.translateWhenEnabledAndServiceExist(`${u.titleKey}`,`TEXT_${u.titleKey}`)),u.subMenuTitleKey&&(u.subMenuTitle=this.translateWhenEnabledAndServiceExist(`${u.subMenuTitleKey}`,`TEXT_${u.subMenuTitleKey}`))),Array.isArray(u?.[a])&&this.translateMenuItemsFromTitleKey(u?.[a])}translateWhenEnabledAndServiceExist(e,a,u){let i="";const r=this.sharedService?.gridOptions,o=r?.locales??ue.locales;return i=u||(r.enableTranslate&&this.translaterService?.translate?this.translaterService.translate(e||" "):a in o?o[a]:a),i}}class Wt{get defaultPrevented(){return this._isDefaultPrevented}constructor(e,a){this.event=e,this.args=a,this._isPropagationStopped=!1,this._isImmediatePropagationStopped=!1,this._isDefaultPrevented=!1,this.returnValue=void 0,this.nativeEvent=e,this._arguments=a,e&&["altKey","ctrlKey","metaKey","shiftKey","key","keyCode","clientX","clientY","offsetX","offsetY","pageX","pageY","bubbles","target","type","which","x","y"].forEach(u=>this[u]=e[u]),this._eventTarget=this.nativeEvent?this.nativeEvent.target:void 0}stopPropagation(){this._isPropagationStopped=!0,this.nativeEvent?.stopPropagation()}isPropagationStopped(){return this._isPropagationStopped}stopImmediatePropagation(){this._isImmediatePropagationStopped=!0,this.nativeEvent&&this.nativeEvent.stopImmediatePropagation()}isImmediatePropagationStopped(){return this._isImmediatePropagationStopped}getNativeEvent(){return this.nativeEvent}preventDefault(){this.nativeEvent&&this.nativeEvent.preventDefault(),this._isDefaultPrevented=!0}isDefaultPrevented(){return this.nativeEvent?this.nativeEvent.defaultPrevented:this._isDefaultPrevented}addReturnValue(e){void 0===this.returnValue&&void 0!==e&&(this.returnValue=e)}getReturnValue(){return this.returnValue}getArguments(){return this._arguments}resetReturnValue(){this.returnValue=void 0}}class be{get subscriberCount(){return this._handlers.length}constructor(e,a){this.eventName=e,this.pubSub=a,this._handlers=[],this._pubSubService=a}subscribe(e){this._handlers.push(e)}unsubscribe(e){for(let a=this._handlers.length-1;a>=0;a--)this._handlers[a]===e&&this._handlers.splice(a,1)}notify(e,a,u,i=!1){const r=a instanceof Wt?a:new Wt(a,e);i&&r.resetReturnValue(),u=u||this;for(let o=0;or.nativeEvent??=d);r.addReturnValue(o)}return r}setPubSubService(e){this._pubSubService=e}}class Ut{constructor(){this.handlers=[]}get subscriberCount(){return this.handlers.length}subscribe(e,a){return this.handlers.push({event:e,handler:a}),e.subscribe(a),this}unsubscribe(e,a){let u=this.handlers.length;for(;u--;)if(this.handlers[u].event===e&&this.handlers[u].handler===a)return this.handlers.splice(u,1),void e.unsubscribe(a);return this}unsubscribeAll(){let e=this.handlers.length;for(;e--;)this.handlers[e].event.unsubscribe(this.handlers[e].handler);return this.handlers=[],this}}class il{constructor(e,a,u,i){void 0===u&&void 0===i&&(u=e,i=a),this.fromRow=Math.min(e,u),this.fromCell=Math.min(a,i),this.toRow=Math.max(e,u),this.toCell=Math.max(a,i)}isSingleCell(){return this.fromRow===this.toRow&&this.fromCell===this.toCell}isSingleRow(){return this.fromRow===this.toRow}contains(e,a){return e>=this.fromRow&&e<=this.toRow&&a>=this.fromCell&&a<=this.toCell}toString(){return this.isSingleCell()?`(${this.fromRow}:${this.fromCell})`:`(${this.fromRow}:${this.fromCell} - ${this.toRow}:${this.toCell})`}}class $K{constructor(){this.__nonDataRow=!0}}class t7 extends $K{constructor(){super(),this.__group=!0,this.level=0,this.count=0,this.value=null,this.title=null,this.collapsed=!1,this.selectChecked=!1,this.totals=null,this.rows=[],this.groups=null,this.groupingKey=""}equals(e){return this.value===e.value&&this.count===e.count&&this.collapsed===e.collapsed&&this.title===e.title}}class B1e extends $K{constructor(){super(),this.__groupTotals=!0,this.group=null,this.initialized=!1}}class W{static height(e,a){if(e){if(void 0===a)return e.getBoundingClientRect().height;W.setStyleSize(e,"height",a)}}static width(e,a){if(e&&e.getBoundingClientRect){if(void 0===a)return e.getBoundingClientRect().width;W.setStyleSize(e,"width",a)}}static setStyleSize(e,a,u){"function"==typeof u&&(u=u()),e.style[a]="string"==typeof u?u:`${u}px`}static isHidden(e){return 0===e.offsetWidth&&0===e.offsetHeight}static parents(e,a){const u=[],i=":visible"===a,r=":hidden"===a;for(;(e=e.parentNode)&&e!==document&&e&&e.parentNode;)r?W.isHidden(e)&&u.push(e):i?W.isHidden(e)||u.push(e):(!a||e.matches(a))&&u.push(e);return u}static toFloat(e){const a=parseFloat(e);return isNaN(a)?0:a}static show(e,a=""){Array.isArray(e)?e.forEach(u=>u.style.display=a):e.style.display=a}static hide(e){Array.isArray(e)?e.forEach(a=>a.style.display="none"):e.style.display="none"}static applyDefaults(e,a){"object"==typeof a&&Object.keys(a).forEach(u=>{a.hasOwnProperty(u)&&!e.hasOwnProperty(u)&&(e[u]=a[u])})}static addSlickEventPubSubWhenDefined(e,a){if(e)for(const u in a)a[u]instanceof be&&"function"==typeof a[u].setPubSubService&&a[u].setPubSubService(e)}}W.storage={_storage:new WeakMap,put:function(t,e,a){this._storage.has(t)||this._storage.set(t,new Map),this._storage.get(t).set(e,a)},get:function(t,e){const a=this._storage.get(t);return a?a.get(e):null},remove:function(t,e){const a=this._storage.get(t).delete(e);return 0!==this._storage.get(t).size&&this._storage.delete(t),a}};const td=new class S1e{constructor(){this.activeEditController=null}isActive(e){return e?this.activeEditController===e:null!==this.activeEditController}activate(e){if(e!==this.activeEditController){if(null!==this.activeEditController)throw new Error("SlickEditorLock.activate: an editController is still active, can't activate another editController");if(!e.commitCurrentEdit)throw new Error("SlickEditorLock.activate: editController must implement .commitCurrentEdit()");if(!e.cancelCurrentEdit)throw new Error("SlickEditorLock.activate: editController must implement .cancelCurrentEdit()");this.activeEditController=e}}deactivate(e){if(this.activeEditController){if(this.activeEditController!==e)throw new Error("SlickEditorLock.deactivate: specified editController is not the currently active one");this.activeEditController=null}}commitCurrentEdit(){return!this.activeEditController||this.activeEditController.commitCurrentEdit()}cancelCurrentEdit(){return!this.activeEditController||this.activeEditController.cancelCurrentEdit()}};class qK{constructor(e){this.pluginName="GroupItemMetadataProvider",this._defaults={groupCssClass:"slick-group",groupTitleCssClass:"slick-group-title",totalsCssClass:"slick-group-totals",groupFocusable:!0,indentation:15,totalsFocusable:!1,toggleCssClass:"slick-group-toggle",toggleExpandedCssClass:"expanded",toggleCollapsedCssClass:"collapsed",enableExpandCollapse:!0,groupFormatter:this.defaultGroupCellFormatter.bind(this),totalsFormatter:this.defaultTotalsCellFormatter.bind(this),includeHeaderTotals:!1},this._eventHandler=new Ut,this._options=cu(!0,{},this._defaults,e)}get eventHandler(){return this._eventHandler}get dataView(){return this._grid?.getData()??{}}get gridOptions(){return this._grid?.getOptions()||{}}init(e,a){this._grid=e,this._options={...this._defaults,...a},this._eventHandler.subscribe(e.onClick,this.handleGridClick.bind(this)),this._eventHandler.subscribe(e.onKeyDown,this.handleGridKeyDown.bind(this))}destroy(){this.dispose()}dispose(){this._eventHandler?.unsubscribeAll()}getOptions(){return this._options}setOptions(e){this._options={...this._options,...e}}getGroupRowMetadata(e){return{selectable:!1,focusable:this._options.groupFocusable,cssClasses:`${this._options.groupCssClass} slick-group-level-${e?.level||0}`,formatter:this._options.includeHeaderTotals&&this._options.totalsFormatter||void 0,columns:{0:{colspan:this._options.includeHeaderTotals?"1":"*",formatter:this._options.groupFormatter,editorClass:null}}}}getTotalsRowMetadata(e){return{selectable:!1,focusable:this._options.totalsFocusable,cssClasses:`${this._options.totalsCssClass} slick-group-level-${e?.group?.level||0}`,formatter:this._options.totalsFormatter,editorClass:null}}defaultGroupCellFormatter(e,a,u,i,r){if(!this._options.enableExpandCollapse)return r.title;const o=r.level||0,h=o*(this._options?.indentation??15)+"px",m=r.collapsed?this._options.toggleCollapsedCssClass:this._options.toggleExpandedCssClass,g=this.gridOptions?.preventDocumentFragmentUsage?document.createElement("span"):new DocumentFragment;g.appendChild(T("span",{className:`${this._options.toggleCssClass} ${m}`,ariaExpanded:String(!r.collapsed),style:{marginLeft:h}}));const v=T("span",{className:this._options.groupTitleCssClass||""});return v.setAttribute("level",o),r.title instanceof HTMLElement||r.title instanceof DocumentFragment?v.appendChild(r.title):this._grid.applyHtmlCode(v,r.title??""),g.appendChild(v),g}defaultTotalsCellFormatter(e,a,u,i,r,o){return i?.groupTotalsFormatter?.(r,i,o)??""}handleGridClick(e,a){const u=e.target,i=this._grid?.getDataItem(a.row);i instanceof t7&&u.classList.contains(this._options.toggleCssClass||"")&&(this.handleDataViewExpandOrCollapse(i),e.stopImmediatePropagation(),e.preventDefault())}handleGridKeyDown(e){if(this._options.enableExpandCollapse&&" "===e.key){const a=this._grid?.getActiveCell();if(a){const u=this._grid.getDataItem(a.row);u instanceof t7&&(this.handleDataViewExpandOrCollapse(u),e.stopImmediatePropagation(),e.preventDefault())}}}handleDataViewExpandOrCollapse(e){const a=this._grid?.getRenderedRange();this.dataView.setRefreshHints({ignoreDiffsBefore:a.top,ignoreDiffsAfter:a.bottom+1}),e.collapsed?this.dataView.expandGroup(e.groupingKey):this.dataView.collapseGroup(e.groupingKey)}}class M1e{constructor(e,a){this.externalPubSub=a,this.defaults={groupItemMetadataProvider:null,inlineFilters:!1,useCSPSafeFilter:!1},this.idProperty="id",this.items=[],this.rows=[],this.idxById=new Map,this.rowsById=void 0,this.filter=null,this.filterCSPSafe=null,this.updated=null,this.suspend=!1,this.isBulkSuspend=!1,this.bulkDeleteIds=new Map,this.sortAsc=!0,this.refreshHints={},this.prevRefreshHints={},this.filteredItems=[],this.filterCache=[],this.groupingInfoDefaults={getter:void 0,formatter:void 0,comparer:(u,i)=>u.value===i.value?0:u.value>i.value?1:-1,predefinedValues:[],aggregators:[],aggregateEmpty:!1,aggregateCollapsed:!1,aggregateChildGroups:!1,collapsed:!1,displayTotalsRow:!0,lazyTotalsCalculation:!1},this.groupingInfos=[],this.groups=[],this.toggledGroupsByLevel=[],this.groupingDelimiter=":|:",this.selectedRowIds=[],this.pagesize=0,this.pagenum=0,this.totalRows=0,this.onBeforePagingInfoChanged=new be("onBeforePagingInfoChanged",a),this.onGroupExpanded=new be("onGroupExpanded",a),this.onGroupCollapsed=new be("onGroupCollapsed",a),this.onPagingInfoChanged=new be("onPagingInfoChanged",a),this.onRowCountChanged=new be("onRowCountChanged",a),this.onRowsChanged=new be("onRowsChanged",a),this.onRowsOrCountChanged=new be("onRowsOrCountChanged",a),this.onSelectedRowIdsChanged=new be("onSelectedRowIdsChanged",a),this.onSetItemsCalled=new be("onSetItemsCalled",a),this._options=cu(!0,{},this.defaults,e)}beginUpdate(e){this.suspend=!0,this.isBulkSuspend=!0===e}endUpdate(){const e=this.isBulkSuspend;this.isBulkSuspend=!1,this.suspend=!1,e&&(this.processBulkDelete(),this.ensureIdUniqueness()),this.refresh()}destroy(){this.items=[],this.idProperty="id",this.idxById=null,this.rowsById=null,this.filter=null,this.filterCSPSafe=null,this.updated=null,this.sortComparer=null,this.filterCache=[],this.filteredItems=[],this.compiledFilter=null,this.compiledFilterCSPSafe=null,this.compiledFilterWithCaching=null,this.compiledFilterWithCachingCSPSafe=null,this._grid&&(this._grid.onSelectedRowsChanged?.unsubscribe(),this._grid.onCellCssStylesChanged?.unsubscribe()),this.onRowsOrCountChanged?.unsubscribe()}setRefreshHints(e){this.refreshHints=e}getFilterArgs(){return this.filterArgs}setFilterArgs(e){this.filterArgs=e}processBulkDelete(){if(!this.idxById)return;let e,a,u=0;for(let i=0,r=this.items.length;i=0;--u)this.items.splice(a[u],1);this.updateIdxById(a[0]),this.refresh()}}sortedAddItem(e){if(!this.sortComparer)throw new Error("[SlickGrid DataView] sortedAddItem() requires a sort comparer, use sort()");this.insertItem(this.sortedIndex(e),e)}sortedUpdateItem(e,a){if(!this.idxById)return;if(!this.idxById.has(e)||e!==a[this.idProperty])throw new Error(`[SlickGrid DataView] Invalid or non-matching id ${e}`);if(!this.sortComparer)throw new Error("[SlickGrid DataView] sortedUpdateItem() requires a sort comparer, use sort()");const u=this.getItemById(e);0!==this.sortComparer(u,a)?(this.deleteItem(e),this.sortedAddItem(a)):this.updateItem(e,a)}sortedIndex(e){let a=0,u=this.items.length;for(;a>>1;-1===this.sortComparer(this.items[i],e)?a=i+1:u=i}return a}getItemCount(){return this.items.length}getLength(){return this.rows.length}getItem(e){const a=this.rows[e];if(a?.__group&&a.totals&&!a.totals?.initialized){const u=this.groupingInfos[a.level];u.displayTotalsRow||(this.calculateTotals(a.totals),a.title=u.formatter?u.formatter(a):a.value)}else a?.__groupTotals&&!a.initialized&&this.calculateTotals(a);return a}getItemMetadata(e){const a=this.rows[e];return void 0===a?null:a.__group?this._options.groupItemMetadataProvider.getGroupRowMetadata(a):a.__groupTotals?this._options.groupItemMetadataProvider.getTotalsRowMetadata(a):null}expandCollapseAllGroups(e,a){if(xt(e))this.toggledGroupsByLevel[e]={},this.groupingInfos[e].collapsed=a,!0===a?this.onGroupCollapsed.notify({level:e,groupingKey:null}):this.onGroupExpanded.notify({level:e,groupingKey:null});else for(let u=0;u=g?o[o.length]=m:(u=a[m],i=e[m],(!u||this.groupingInfos.length&&(r=u.__nonDataRow||i.__nonDataRow)&&u.__group!==i.__group||u.__group&&!u.equals(i)||r&&(u.__groupTotals||i.__groupTotals)||u[this.idProperty]!==i[this.idProperty]||this.updated?.[u[this.idProperty]])&&(o[o.length]=m));return o}recalc(e){this.rowsById=void 0,(this.refreshHints.isFilterNarrowing!==this.prevRefreshHints.isFilterNarrowing||this.refreshHints.isFilterExpanding!==this.prevRefreshHints.isFilterExpanding)&&(this.filterCache=[]);const a=this.getFilteredAndPagedItems(e);this.totalRows=a.totalRows;let u=a.rows;this.groups=[],this.groupingInfos.length&&(this.groups=this.extractGroups(u),this.groups.length&&(u=this.flattenGroupedRows(this.groups)));const i=this.getRowDiffs(this.rows,u);return this.rows=u,i}refresh(){if(this.suspend)return;const e=cu(!0,{},this.getPagingInfo()),a=this.rows.length,u=this.totalRows;let i=this.recalc(this.items);this.pagesize&&this.totalRows0},null,this),i.length>0&&this.onRowsChanged.notify({rows:i,itemCount:this.items.length,dataView:this,calledOnRowCountChanged:a!==this.rows.length},null,this),(a!==this.rows.length||i.length>0)&&this.onRowsOrCountChanged.notify({rowsDiff:i,previousRowCount:a,currentRowCount:this.rows.length,itemCount:this.items.length,rowCountChanged:a!==this.rows.length,rowsChanged:i.length>0,dataView:this},null,this)}syncGridSelection(e,a,u){let i;this._grid=e,this.selectedRowIds=this.mapRowsToIds(e.getSelectedRows());const r=e.getOptions(),o=h=>{!1===h?this.selectedRowIds=[]:this.selectedRowIds.sort().join(",")!==h.sort().join(",")&&(this.selectedRowIds=h)};return e.onSelectedRowsChanged.subscribe((h,m)=>{if(!i){const g=this.mapRowsToIds(m.rows),v={grid:this._grid,ids:g,rows:m.rows,added:!0,dataView:this};this.preSelectedRowIdsChangeFn(v),this.onSelectedRowIdsChanged.notify(Object.assign(v,{selectedRowIds:this.selectedRowIds,filteredIds:this.getAllSelectedFilteredIds()}),new Wt,this)}}),this.preSelectedRowIdsChangeFn=h=>{if(!i){if(i=!0,typeof h.added>"u")o(h.ids);else{let g;g=h.added?u&&r.multiSelect?(this.selectedRowIds?.filter(k=>void 0===this.getRowById(k))).concat(h.ids):h.ids:u&&r.multiSelect?this.selectedRowIds?.filter(v=>-1===h.ids.indexOf(v)):[],o(g)}i=!1}},this.onRowsOrCountChanged.subscribe((()=>{if((this.selectedRowIds||[]).length>0&&!i){i=!0;const h=this.mapIdsToRows(this.selectedRowIds||[]);if(!a){const m={grid:this._grid,ids:this.mapRowsToIds(h),rows:h,dataView:this};this.preSelectedRowIdsChangeFn(m),this.onSelectedRowIdsChanged.notify(Object.assign(m,{selectedRowIds:this.selectedRowIds,filteredIds:this.getAllSelectedFilteredIds()}),new Wt,this)}e.setSelectedRows(h),i=!1}}).bind(this)),this.onSelectedRowIdsChanged}getAllSelectedIds(){return this.selectedRowIds}getAllSelectedFilteredIds(){return this.getAllSelectedFilteredItems().map(e=>e[this.idProperty])}setSelectedIds(e,a){let u=a?.isRowBeingAdded;const i=a?.shouldTriggerEvent,r=a?.applyRowSelectionToGrid;!1!==u&&(u=!0);const o=this.mapIdsToRows(e),d={grid:this._grid,ids:e,rows:o,added:u,dataView:this};this.preSelectedRowIdsChangeFn?.(d),!1!==i&&this.onSelectedRowIdsChanged.notify(Object.assign(d,{selectedRowIds:this.selectedRowIds,filteredIds:this.getAllSelectedFilteredIds()}),new Wt,this),!1!==r&&this._grid&&this._grid.setSelectedRows(o)}getAllSelectedItems(){const e=[];return this.getAllSelectedIds().forEach(u=>{e.push(this.getItemById(u))}),e}getAllSelectedFilteredItems(){return Array.isArray(this.selectedRowIds)&&this.filteredItems.filter(a=>this.selectedRowIds.some(u=>a[this.idProperty]===u))||[]}syncGridCellCssStyles(e,a){let u,i;const r=d=>{u={},"object"==typeof d&&Object.keys(d).forEach(h=>{if(d&&this.rows[h]){const m=this.rows[h][this.idProperty];u[m]=d[h]}})};r(e.getCellCssStyles(a));const o=()=>{if("object"==typeof u){i=!0,this.ensureRowsByIdCache();const d={};Object.keys(u).forEach(h=>{const m=this.rowsById?.[h];xt(m)&&(d[m]=u[h])}),e.setCellCssStyles(a,d),i=!1}};e.onCellCssStylesChanged.subscribe((d,h)=>{i||a!==h.key||(h.hash?r(h.hash):(e.onCellCssStylesChanged.unsubscribe(),this.onRowsOrCountChanged.unsubscribe(o)))}),this.onRowsOrCountChanged.subscribe(o.bind(this))}}function YK(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(t);e&&(u=u.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),a.push.apply(a,u)}return a}function ud(t){for(var e=1;e=0)&&(a[i]=t[i]);return a}(t,e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(t,u)&&(a[u]=t[u])}return a}function Pc(t){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(t)}var Nc=Pc(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),$2=Pc(/Edge/i),QK=Pc(/firefox/i),q2=Pc(/safari/i)&&!Pc(/chrome/i)&&!Pc(/android/i),XK=Pc(/iP(ad|od|hone)/i),eW=Pc(/chrome/i)&&Pc(/android/i),aW={capture:!1,passive:!1};function Et(t,e,a){t.addEventListener(e,a,!Nc&&aW)}function lt(t,e,a){t.removeEventListener(e,a,!Nc&&aW)}function i7(t,e){if(e){if(">"===e[0]&&(e=e.substring(1)),t)try{if(t.matches)return t.matches(e);if(t.msMatchesSelector)return t.msMatchesSelector(e);if(t.webkitMatchesSelector)return t.webkitMatchesSelector(e)}catch{return!1}return!1}}function j1e(t){return t.host&&t!==document&&t.host.nodeType?t.host:t.parentNode}function Ul(t,e,a,u){if(t){a=a||document;do{if(null!=e&&(">"===e[0]?t.parentNode===a&&i7(t,e):i7(t,e))||u&&t===a)return t;if(t===a)break}while(t=j1e(t))}return null}var Y2,tW=/\s+/g;function ni(t,e,a){if(t&&e)if(t.classList)t.classList[a?"add":"remove"](e);else{var u=(" "+t.className+" ").replace(tW," ").replace(" "+e+" "," ");t.className=(u+(a?" "+e:"")).replace(tW," ")}}function Ke(t,e,a){var u=t&&t.style;if(u){if(void 0===a)return document.defaultView&&document.defaultView.getComputedStyle?a=document.defaultView.getComputedStyle(t,""):t.currentStyle&&(a=t.currentStyle),void 0===e?a:a[e];!(e in u)&&-1===e.indexOf("webkit")&&(e="-webkit-"+e),u[e]=a+("string"==typeof a?"":"px")}}function Mp(t,e){var a="";if("string"==typeof t)a=t;else do{var u=Ke(t,"transform");u&&"none"!==u&&(a=u+" "+a)}while(!e&&(t=t.parentNode));var i=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return i&&new i(a)}function uW(t,e,a){if(t){var u=t.getElementsByTagName(e),i=0,r=u.length;if(a)for(;i=r:i<=r))return u;if(u===id())break;u=Th(u,!1)}return!1}function Fv(t,e,a,u){for(var i=0,r=0,o=t.children;r2&&void 0!==arguments[2]?arguments[2]:{},i=u.evt,r=P1e(u,$1e);Q2.pluginEvent.bind(xa)(e,a,ud({dragEl:De,parentEl:Di,ghostEl:Pa,rootEl:Ou,nextEl:Lp,lastDownEl:n7,cloneEl:ri,cloneHidden:Ph,dragStarted:af,putSortable:Gn,activeSortable:xa.active,originalEvent:i,oldIndex:wv,oldDraggableIndex:ef,newIndex:nl,newDraggableIndex:Nh,hideGhostForTarget:EW,unhideGhostForTarget:vW,cloneNowHidden:function(){Ph=!0},cloneNowShown:function(){Ph=!1},dispatchSortableEvent:function(d){qr({sortable:a,name:d,originalEvent:i})}},r))};function qr(t){X2(ud({putSortable:Gn,cloneEl:ri,targetEl:De,rootEl:Ou,oldIndex:wv,oldDraggableIndex:ef,newIndex:nl,newDraggableIndex:Nh},t))}var De,Di,Pa,Ou,Lp,n7,ri,Ph,wv,nl,ef,Nh,r7,Gn,Tp,V0,UL,JL,dW,cW,af,Sv,tf,d7,kr,Bv=!1,o7=!1,l7=[],uf=!1,s7=!1,ZL=[],$L=!1,c7=[],h7=typeof document<"u",m7=XK,hW=$2||Nc?"cssFloat":"float",q1e=h7&&!eW&&!XK&&"draggable"in document.createElement("div"),mW=function(){if(h7){if(Nc)return!1;var t=document.createElement("x");return t.style.cssText="pointer-events:auto","auto"===t.style.pointerEvents}}(),pW=function(e,a){var u=Ke(e),i=parseInt(u.width)-parseInt(u.paddingLeft)-parseInt(u.paddingRight)-parseInt(u.borderLeftWidth)-parseInt(u.borderRightWidth),r=Fv(e,0,a),o=Fv(e,1,a),d=r&&Ke(r),h=o&&Ke(o),m=d&&parseInt(d.marginLeft)+parseInt(d.marginRight)+Pu(r).width,g=h&&parseInt(h.marginLeft)+parseInt(h.marginRight)+Pu(o).width;if("flex"===u.display)return"column"===u.flexDirection||"column-reverse"===u.flexDirection?"vertical":"horizontal";if("grid"===u.display)return u.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(r&&d.float&&"none"!==d.float){var v="left"===d.float?"left":"right";return!o||"both"!==h.clear&&h.clear!==v?"horizontal":"vertical"}return r&&("block"===d.display||"flex"===d.display||"table"===d.display||"grid"===d.display||m>=i&&"none"===u[hW]||o&&"none"===u[hW]&&m+g>i)?"vertical":"horizontal"},gW=function(e){function a(r,o){return function(d,h,m,g){var v=d.options.group.name&&h.options.group.name&&d.options.group.name===h.options.group.name;if(null==r&&(o||v))return!0;if(null==r||!1===r)return!1;if(o&&"clone"===r)return r;if("function"==typeof r)return a(r(d,h,m,g),o)(d,h,m,g);var k=(o?d:h).options.group.name;return!0===r||"string"==typeof r&&r===k||r.join&&r.indexOf(k)>-1}}var u={},i=e.group;(!i||"object"!=u7(i))&&(i={name:i}),u.name=i.name,u.checkPull=a(i.pull,!0),u.checkPut=a(i.put),u.revertClone=i.revertClone,e.group=u},EW=function(){!mW&&Pa&&Ke(Pa,"display","none")},vW=function(){!mW&&Pa&&Ke(Pa,"display","")};h7&&!eW&&document.addEventListener("click",function(t){if(o7)return t.preventDefault(),t.stopPropagation&&t.stopPropagation(),t.stopImmediatePropagation&&t.stopImmediatePropagation(),o7=!1,!1},!0);var Pp=function(e){if(De){var a=function(e,a){var u;return l7.some(function(i){var r=i[br].options.emptyInsertThreshold;if(r&&!OL(i)){var o=Pu(i),d=e>=o.left-r&&e<=o.right+r,h=a>=o.top-r&&a<=o.bottom+r;if(d&&h)return u=i}}),u}((e=e.touches?e.touches[0]:e).clientX,e.clientY);if(a){var u={};for(var i in e)e.hasOwnProperty(i)&&(u[i]=e[i]);u.target=u.rootEl=a,u.preventDefault=void 0,u.stopPropagation=void 0,a[br]._onDragOver(u)}}},X1e=function(e){De&&De.parentNode[br]._isOutsideThisEl(e.target)};function xa(t,e){if(!t||!t.nodeType||1!==t.nodeType)throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(t));this.el=t,this.options=e=Wl({},e),t[br]=this;var a={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(t.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return pW(t,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(o,d){o.setData("Text",d.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:!1!==xa.supportPointer&&"PointerEvent"in window&&!q2,emptyInsertThreshold:5};for(var u in Q2.initializePlugins(this,t,a),a)!(u in e)&&(e[u]=a[u]);for(var i in gW(e),this)"_"===i.charAt(0)&&"function"==typeof this[i]&&(this[i]=this[i].bind(this));this.nativeDraggable=!e.forceFallback&&q1e,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?Et(t,"pointerdown",this._onTapStart):(Et(t,"mousedown",this._onTapStart),Et(t,"touchstart",this._onTapStart)),this.nativeDraggable&&(Et(t,"dragover",this),Et(t,"dragenter",this)),l7.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),Wl(this,U1e())}function p7(t,e,a,u,i,r,o,d){var h,v,m=t[br],g=m.options.onMove;return!window.CustomEvent||Nc||$2?(h=document.createEvent("Event")).initEvent("move",!0,!0):h=new CustomEvent("move",{bubbles:!0,cancelable:!0}),h.to=e,h.from=t,h.dragged=a,h.draggedRect=u,h.related=i||e,h.relatedRect=r||Pu(e),h.willInsertAfter=d,h.originalEvent=o,t.dispatchEvent(h),g&&(v=g.call(m,h,o)),v}function qL(t){t.draggable=!1}function ahe(){$L=!1}function rhe(t){for(var e=t.tagName+t.className+t.src+t.href+t.textContent,a=e.length,u=0;a--;)u+=e.charCodeAt(a);return u.toString(36)}function g7(t){return setTimeout(t,0)}function YL(t){return clearTimeout(t)}xa.prototype={constructor:xa,_isOutsideThisEl:function(e){!this.el.contains(e)&&e!==this.el&&(Sv=null)},_getDirection:function(e,a){return"function"==typeof this.options.direction?this.options.direction.call(this,e,a,De):this.options.direction},_onTapStart:function(e){if(e.cancelable){var a=this,u=this.el,i=this.options,r=i.preventOnFilter,o=e.type,d=e.touches&&e.touches[0]||e.pointerType&&"touch"===e.pointerType&&e,h=(d||e).target,m=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||h,g=i.filter;if(function ohe(t){c7.length=0;for(var e=t.getElementsByTagName("input"),a=e.length;a--;){var u=e[a];u.checked&&c7.push(u)}}(u),!De&&!(/mousedown|pointerdown/.test(o)&&0!==e.button||i.disabled)&&!m.isContentEditable&&(this.nativeDraggable||!q2||!h||"SELECT"!==h.tagName.toUpperCase())&&!((h=Ul(h,i.draggable,u,!1))&&h.animated||n7===h)){if(wv=fi(h),ef=fi(h,i.draggable),"function"==typeof g){if(g.call(this,e,h,this))return qr({sortable:a,rootEl:m,name:"filter",targetEl:h,toEl:u,fromEl:u}),_o("filter",a,{evt:e}),void(r&&e.cancelable&&e.preventDefault())}else if(g&&(g=g.split(",").some(function(v){if(v=Ul(m,v.trim(),u,!1))return qr({sortable:a,rootEl:v,name:"filter",targetEl:h,fromEl:u,toEl:u}),_o("filter",a,{evt:e}),!0})))return void(r&&e.cancelable&&e.preventDefault());i.handle&&!Ul(m,i.handle,u,!1)||this._prepareDragStart(e,d,h)}}},_prepareDragStart:function(e,a,u){var h,i=this,r=i.el,o=i.options,d=r.ownerDocument;if(u&&!De&&u.parentNode===r){var m=Pu(u);if(Ou=r,Di=(De=u).parentNode,Lp=De.nextSibling,n7=u,r7=o.group,xa.dragged=De,Tp={target:De,clientX:(a||e).clientX,clientY:(a||e).clientY},dW=Tp.clientX-m.left,cW=Tp.clientY-m.top,this._lastX=(a||e).clientX,this._lastY=(a||e).clientY,De.style["will-change"]="all",h=function(){_o("delayEnded",i,{evt:e}),xa.eventCanceled?i._onDrop():(i._disableDelayedDragEvents(),!QK&&i.nativeDraggable&&(De.draggable=!0),i._triggerDragStart(e,a),qr({sortable:i,name:"choose",originalEvent:e}),ni(De,o.chosenClass,!0))},o.ignore.split(",").forEach(function(g){uW(De,g.trim(),qL)}),Et(d,"dragover",Pp),Et(d,"mousemove",Pp),Et(d,"touchmove",Pp),Et(d,"mouseup",i._onDrop),Et(d,"touchend",i._onDrop),Et(d,"touchcancel",i._onDrop),QK&&this.nativeDraggable&&(this.options.touchStartThreshold=4,De.draggable=!0),_o("delayStart",this,{evt:e}),!o.delay||o.delayOnTouchOnly&&!a||this.nativeDraggable&&($2||Nc))h();else{if(xa.eventCanceled)return void this._onDrop();Et(d,"mouseup",i._disableDelayedDrag),Et(d,"touchend",i._disableDelayedDrag),Et(d,"touchcancel",i._disableDelayedDrag),Et(d,"mousemove",i._delayedDragTouchMoveHandler),Et(d,"touchmove",i._delayedDragTouchMoveHandler),o.supportPointer&&Et(d,"pointermove",i._delayedDragTouchMoveHandler),i._dragStartTimer=setTimeout(h,o.delay)}}},_delayedDragTouchMoveHandler:function(e){var a=e.touches?e.touches[0]:e;Math.max(Math.abs(a.clientX-this._lastX),Math.abs(a.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){De&&qL(De),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var e=this.el.ownerDocument;lt(e,"mouseup",this._disableDelayedDrag),lt(e,"touchend",this._disableDelayedDrag),lt(e,"touchcancel",this._disableDelayedDrag),lt(e,"mousemove",this._delayedDragTouchMoveHandler),lt(e,"touchmove",this._delayedDragTouchMoveHandler),lt(e,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(e,a){a=a||"touch"==e.pointerType&&e,!this.nativeDraggable||a?this.options.supportPointer?Et(document,"pointermove",this._onTouchMove):Et(document,a?"touchmove":"mousemove",this._onTouchMove):(Et(De,"dragend",this),Et(Ou,"dragstart",this._onDragStart));try{document.selection?g7(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(e,a){if(Bv=!1,Ou&&De){_o("dragStarted",this,{evt:a}),this.nativeDraggable&&Et(document,"dragover",X1e);var u=this.options;!e&&ni(De,u.dragClass,!1),ni(De,u.ghostClass,!0),xa.active=this,e&&this._appendGhost(),qr({sortable:this,name:"start",originalEvent:a})}else this._nulling()},_emulateDragOver:function(){if(V0){this._lastX=V0.clientX,this._lastY=V0.clientY,EW();for(var e=document.elementFromPoint(V0.clientX,V0.clientY),a=e;e&&e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(V0.clientX,V0.clientY))!==a;)a=e;if(De.parentNode[br]._isOutsideThisEl(e),a)do{if(a[br]){if(a[br]._onDragOver({clientX:V0.clientX,clientY:V0.clientY,target:e,rootEl:a})&&!this.options.dragoverBubble)break}e=a}while(a=a.parentNode);vW()}},_onTouchMove:function(e){if(Tp){var a=this.options,u=a.fallbackTolerance,i=a.fallbackOffset,r=e.touches?e.touches[0]:e,o=Pa&&Mp(Pa,!0),d=Pa&&o&&o.a,h=Pa&&o&&o.d,m=m7&&kr&&nW(kr),g=(r.clientX-Tp.clientX+i.x)/(d||1)+(m?m[0]-ZL[0]:0)/(d||1),v=(r.clientY-Tp.clientY+i.y)/(h||1)+(m?m[1]-ZL[1]:0)/(h||1);if(!xa.active&&!Bv){if(u&&Math.max(Math.abs(r.clientX-this._lastX),Math.abs(r.clientY-this._lastY))i.right+r||t.clientY>u.bottom&&t.clientX>u.left:t.clientY>i.bottom+r||t.clientX>u.right&&t.clientY>u.top}(e,x,this)&&!L.animated){if(L===De)return z(!1);if(L&&a===e.target&&(u=L),u&&(r=Pu(u)),!1!==p7(Ou,a,De,i,u,r,e,!!u))return A(),L&&L.nextSibling?a.insertBefore(De,L.nextSibling):a.appendChild(De),Di=a,M(),z(!0)}else if(L&&function the(t,e,a){var u=Pu(Fv(a.el,0,a.options,!0)),i=sW(a.el,a.options,Pa),r=10;return e?t.clientXg+m*r/2:hv-d7)return-tf}else if(h>g+m*(1-i)/2&&hv-m*r/2)?h>g+m/2?1:-1:0}(e,u,r,x,re?1:d.swapThreshold,null==d.invertedSwapThreshold?d.swapThreshold:d.invertedSwapThreshold,s7,Sv===u),0!==G){var At=fi(De);do{At-=G,fa=Di.children[At]}while(fa&&("none"===Ke(fa,"display")||fa===Pa))}if(0===G||fa===u)return z(!1);Sv=u,tf=G;var vt=u.nextElementSibling,Ya=!1,Ne=p7(Ou,a,De,i,u,r,e,Ya=1===G);if(!1!==Ne)return(1===Ne||-1===Ne)&&(Ya=1===Ne),$L=!0,setTimeout(ahe,30),A(),Ya&&!vt?a.appendChild(De):u.parentNode.insertBefore(De,Ya?vt:u),Ve&&oW(Ve,0,Be-Ve.scrollTop),Di=De.parentNode,void 0!==$&&!s7&&(d7=Math.abs($-Pu(u)[He])),M(),z(!0)}if(a.contains(De))return z(!1)}return!1}function F(Ua,nu){_o(Ua,D,ud({evt:e,isOwner:g,axis:x?"vertical":"horizontal",revert:o,dragRect:i,targetRect:r,canSort:v,fromSortable:k,target:u,completed:z,onMove:function(Qi,Wn){return p7(Ou,a,De,i,Qi,Pu(Qi),e,Wn)},changed:M},nu))}function A(){F("dragOverAnimationCapture"),D.captureAnimationState(),D!==k&&k.captureAnimationState()}function z(Ua){return F("dragOverCompleted",{insertion:Ua}),Ua&&(g?m._hideClone():m._showClone(D),D!==k&&(ni(De,Gn?Gn.options.ghostClass:m.options.ghostClass,!1),ni(De,d.ghostClass,!0)),Gn!==D&&D!==xa.active?Gn=D:D===xa.active&&Gn&&(Gn=null),k===D&&(D._ignoreWhileAnimating=u),D.animateAll(function(){F("dragOverAnimationComplete"),D._ignoreWhileAnimating=null}),D!==k&&(k.animateAll(),k._ignoreWhileAnimating=null)),(u===De&&!De.animated||u===a&&!u.animated)&&(Sv=null),!d.dragoverBubble&&!e.rootEl&&u!==document&&(De.parentNode[br]._isOutsideThisEl(e.target),!Ua&&Pp(e)),!d.dragoverBubble&&e.stopPropagation&&e.stopPropagation(),C=!0}function M(){nl=fi(De),Nh=fi(De,d.draggable),qr({sortable:D,name:"change",toEl:a,newIndex:nl,newDraggableIndex:Nh,originalEvent:e})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){lt(document,"mousemove",this._onTouchMove),lt(document,"touchmove",this._onTouchMove),lt(document,"pointermove",this._onTouchMove),lt(document,"dragover",Pp),lt(document,"mousemove",Pp),lt(document,"touchmove",Pp)},_offUpEvents:function(){var e=this.el.ownerDocument;lt(e,"mouseup",this._onDrop),lt(e,"touchend",this._onDrop),lt(e,"pointerup",this._onDrop),lt(e,"touchcancel",this._onDrop),lt(document,"selectstart",this)},_onDrop:function(e){var a=this.el,u=this.options;nl=fi(De),Nh=fi(De,u.draggable),_o("drop",this,{evt:e}),Di=De&&De.parentNode,nl=fi(De),Nh=fi(De,u.draggable),xa.eventCanceled||(Bv=!1,s7=!1,uf=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),YL(this.cloneId),YL(this._dragStartId),this.nativeDraggable&&(lt(document,"drop",this),lt(a,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),q2&&Ke(document.body,"user-select",""),Ke(De,"transform",""),e&&(af&&(e.cancelable&&e.preventDefault(),!u.dropBubble&&e.stopPropagation()),Pa&&Pa.parentNode&&Pa.parentNode.removeChild(Pa),(Ou===Di||Gn&&"clone"!==Gn.lastPutMode)&&ri&&ri.parentNode&&ri.parentNode.removeChild(ri),De&&(this.nativeDraggable&<(De,"dragend",this),qL(De),De.style["will-change"]="",af&&!Bv&&ni(De,Gn?Gn.options.ghostClass:this.options.ghostClass,!1),ni(De,this.options.chosenClass,!1),qr({sortable:this,name:"unchoose",toEl:Di,newIndex:null,newDraggableIndex:null,originalEvent:e}),Ou!==Di?(nl>=0&&(qr({rootEl:Di,name:"add",toEl:Di,fromEl:Ou,originalEvent:e}),qr({sortable:this,name:"remove",toEl:Di,originalEvent:e}),qr({rootEl:Di,name:"sort",toEl:Di,fromEl:Ou,originalEvent:e}),qr({sortable:this,name:"sort",toEl:Di,originalEvent:e})),Gn&&Gn.save()):nl!==wv&&nl>=0&&(qr({sortable:this,name:"update",toEl:Di,originalEvent:e}),qr({sortable:this,name:"sort",toEl:Di,originalEvent:e})),xa.active&&((null==nl||-1===nl)&&(nl=wv,Nh=ef),qr({sortable:this,name:"end",toEl:Di,originalEvent:e}),this.save())))),this._nulling()},_nulling:function(){_o("nulling",this),Ou=De=Di=Pa=Lp=ri=n7=Ph=Tp=V0=af=nl=Nh=wv=ef=Sv=tf=Gn=r7=xa.dragged=xa.ghost=xa.clone=xa.active=null,c7.forEach(function(e){e.checked=!0}),c7.length=UL=JL=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":De&&(this._onDragOver(e),function ehe(t){t.dataTransfer&&(t.dataTransfer.dropEffect="move"),t.cancelable&&t.preventDefault()}(e));break;case"selectstart":e.preventDefault()}},toArray:function(){for(var a,e=[],u=this.el.children,i=0,r=u.length,o=this.options;i{R[$]&&(G=!0)}),G}function z(R){if(d=R.target,!A(R)){const G=R?.touches?.[0]??R,{target:$}=G;if(!t.allowDragFrom||t.allowDragFrom&&d.matches(t.allowDragFrom)||t.allowDragFromClosest&&d.closest(t.allowDragFromClosest)){x.dragHandle=d;const Y=hL();h=Y.left+G.clientX,m=Y.top+G.clientY,g=G.clientX-G.clientX,v=G.clientY-G.clientY,x=Object.assign(x,{deltaX:g,deltaY:v,startX:h,startY:m,target:$}),!1!==C(a,R,x)&&(document.body.addEventListener("mousemove",M),document.body.addEventListener("touchmove",M),document.body.addEventListener("mouseup",L),document.body.addEventListener("touchend",L),document.body.addEventListener("touchcancel",L))}}}function M(R){const G=R?.touches?.[0]??R;if(!A(R)){g=G.clientX-h,v=G.clientY-m;const{target:$}=G;k||(x=Object.assign(x,{deltaX:g,deltaY:v,startX:h,startY:m,target:$}),C(u,R,x),k=!0),x=Object.assign(x,{deltaX:g,deltaY:v,startX:h,startY:m,target:$}),C(i,R,x)}}function L(R){if(document.body.removeEventListener("mousemove",M),document.body.removeEventListener("touchmove",M),document.body.removeEventListener("mouseup",L),document.body.removeEventListener("touchend",L),document.body.removeEventListener("touchcancel",L),k){const{target:G}=R;x=Object.assign(x,{target:G}),C(r,R,x),k=!1}}return function D(){e&&(e.addEventListener("mousedown",z),e.addEventListener("touchstart",z))}(),{destroy:function F(){e&&(e.removeEventListener("mousedown",z),e.removeEventListener("touchstart",z))}}}function DW(t){const{element:e,onMouseWheel:a}=t;function r(o){const d=o||window.event;let h=0,m=0,g=0;d.wheelDelta&&(h=d.wheelDelta/120),d.detail&&(h=-d.detail/3),g=h,void 0!==d.axis&&d.axis===d.HORIZONTAL_AXIS&&(g=0,m=-1*h),void 0!==d.wheelDeltaY&&(g=d.wheelDeltaY/120),void 0!==d.wheelDeltaX&&(m=-1*d.wheelDeltaX/120),"function"==typeof a&&a(o,h,m,g)}return function i(){e.addEventListener("wheel",r),e.addEventListener("mousewheel",r)}(),{destroy:function u(){e.removeEventListener("wheel",r),e.removeEventListener("mousewheel",r)}}}function CW(t){const{resizeableElement:e,resizeableHandleElement:a,onResizeStart:u,onResize:i,onResizeEnd:r}=t;if(!a||"function"!=typeof a.addEventListener)throw new Error("[SlickResizable] You did not provide a valid html element that will be used for the handle to resize.");function h(k,x){if("function"==typeof k)return k(x,{resizeableElement:e,resizeableHandleElement:a})}function m(k){k.preventDefault();const x=k.touches?k.changedTouches[0]:k;!1!==h(u,x)&&(document.body.addEventListener("mousemove",g),document.body.addEventListener("mouseup",v),document.body.addEventListener("touchmove",g),document.body.addEventListener("touchend",v))}function g(k){k.preventDefault&&"touchmove"!==k.type&&k.preventDefault();const x=k.touches?k.changedTouches[0]:k;"function"==typeof i&&i(x,{resizeableElement:e,resizeableHandleElement:a})}function v(k){const x=k.touches?k.changedTouches[0]:k;h(r,x),document.body.removeEventListener("mousemove",g),document.body.removeEventListener("mouseup",v),document.body.removeEventListener("touchmove",g),document.body.removeEventListener("touchend",v)}return function o(){a.addEventListener("mousedown",m),a.addEventListener("touchstart",m)}(),{destroy:function d(){"function"==typeof a?.removeEventListener&&(a.removeEventListener("mousedown",m),a.removeEventListener("touchstart",m))}}}class che{constructor(e,a,u,i,r){if(this.container=e,this.data=a,this.columns=u,this.externalPubSub=r,this.cid="",this.canvas=null,this.canvas_context=null,this._defaults={alwaysShowVerticalScroll:!1,alwaysAllowHorizontalScroll:!1,explicitInitialization:!1,rowHeight:25,defaultColumnWidth:80,enableHtmlRendering:!0,enableAddRow:!1,leaveSpaceForNewRows:!1,editable:!1,autoEdit:!0,autoEditNewRow:!0,autoCommitEdit:!1,suppressActiveCellChangeOnEdit:!1,enableCellNavigation:!0,enableColumnReorder:!0,unorderableColumnCssClass:"unorderable",asyncEditorLoading:!1,asyncEditorLoadDelay:100,forceFitColumns:!1,enableAsyncPostRender:!1,asyncPostRenderDelay:50,enableAsyncPostRenderCleanup:!1,asyncPostRenderCleanupDelay:40,columnResizingDelay:300,nonce:"",editorLock:td,showColumnHeader:!0,showHeaderRow:!1,headerRowHeight:25,createFooterRow:!1,showFooterRow:!1,footerRowHeight:25,createPreHeaderPanel:!1,createTopHeaderPanel:!1,showPreHeaderPanel:!1,showTopHeaderPanel:!1,preHeaderPanelHeight:25,preHeaderPanelWidth:"auto",topHeaderPanelHeight:25,topHeaderPanelWidth:"auto",showTopPanel:!1,topPanelHeight:25,formatterFactory:null,editorFactory:null,cellFlashingCssClass:"flashing",rowHighlightCssClass:"highlight-animate",rowHighlightDuration:400,selectedCellCssClass:"selected",multiSelect:!0,enableTextSelectionOnCells:!1,dataItemColumnValueExtractor:null,frozenBottom:!1,frozenColumn:-1,frozenRow:-1,frozenRightViewportMinWidth:100,throwWhenFrozenNotAllViewable:!1,fullWidthRows:!1,multiColumnSort:!1,numberedMultiColumnSort:!1,tristateMultiColumnSort:!1,sortColNumberInSeparateSpan:!1,defaultFormatter:this.defaultFormatter,forceSyncScrolling:!1,addNewRowCssClass:"new-row",preserveCopiedSelectionOnPaste:!1,preventDragFromKeys:["ctrlKey","metaKey"],showCellSelection:!0,viewportClass:void 0,minRowBuffer:3,emulatePagingWhenScrolling:!0,editorCellNavOnLRKeys:!1,enableMouseWheelScrollHandler:!0,doPaging:!0,scrollRenderThrottling:50,suppressCssChangesOnHiddenInit:!1,ffMaxSupportedCssHeight:6e6,maxSupportedCssHeight:1e9,sanitizer:void 0,mixinDefaults:!1,shadowRoot:void 0},this._columnDefaults={name:"",headerCssClass:null,defaultSortAsc:!0,focusable:!0,hidden:!1,minWidth:30,maxWidth:void 0,rerenderOnResize:!1,reorderable:!0,resizable:!0,sortable:!1,selectable:!0},this.page=0,this.offset=0,this.vScrollDir=1,this._bindingEventService=new Ni,this.initialized=!1,this.uid=`slickgrid_${Math.round(1e6*Math.random())}`,this._groupHeaders=[],this._headerScroller=[],this._headers=[],this._boundAncestors=[],this.viewportH=0,this.viewportW=0,this.canvasWidth=0,this.canvasWidthL=0,this.canvasWidthR=0,this.headersWidth=0,this.headersWidthL=0,this.headersWidthR=0,this.viewportHasHScroll=!1,this.viewportHasVScroll=!1,this.headerColumnWidthDiff=0,this.headerColumnHeightDiff=0,this.cellWidthDiff=0,this.cellHeightDiff=0,this.hasFrozenRows=!1,this.frozenRowsHeight=0,this.actualFrozenRow=-1,this.paneTopH=0,this.paneBottomH=0,this.viewportTopH=0,this.viewportBottomH=0,this.topPanelH=0,this.headerRowH=0,this.footerRowH=0,this.tabbingDirection=1,this.activeCellNode=null,this.currentEditor=null,this.rowsCache={},this.renderedRows=0,this.numVisibleRows=0,this.prevScrollTop=0,this.scrollHeight=0,this.scrollTop=0,this.lastRenderedScrollTop=0,this.lastRenderedScrollLeft=0,this.prevScrollLeft=0,this.scrollLeft=0,this.selectedRows=[],this.plugins=[],this.cellCssClasses={},this.columnsById={},this.sortColumns=[],this.columnPosLeft=[],this.columnPosRight=[],this.pagingActive=!1,this.pagingIsLastPage=!1,this.h_editorLoader=null,this.h_render=null,this.h_postrenderCleanup=null,this.postProcessedRows={},this.postProcessToRow=null,this.postProcessFromRow=null,this.postProcessedCleanupQueue=[],this.postProcessgroupId=0,this.counter_rows_rendered=0,this.counter_rows_removed=0,this.cssShow={position:"absolute",visibility:"hidden",display:"block"},this._hiddenParents=[],this.oldProps=[],this.enforceFrozenRowHeightRecalc=!1,this.columnResizeDragging=!1,this.slickDraggableInstance=null,this.slickMouseWheelInstances=[],this.slickResizableInstances=[],this.logMessageMaxCount=30,this._container="string"==typeof this.container?document.querySelector(this.container):this.container,!this._container)throw new Error(`SlickGrid requires a valid container, ${this.container} does not exist in the DOM.`);this._pubSubService=r,this.onActiveCellChanged=new be("onActiveCellChanged",r),this.onActiveCellPositionChanged=new be("onActiveCellPositionChanged",r),this.onAddNewRow=new be("onAddNewRow",r),this.onAfterSetColumns=new be("onAfterSetColumns",r),this.onAutosizeColumns=new be("onAutosizeColumns",r),this.onBeforeAppendCell=new be("onBeforeAppendCell",r),this.onBeforeCellEditorDestroy=new be("onBeforeCellEditorDestroy",r),this.onBeforeColumnsResize=new be("onBeforeColumnsResize",r),this.onBeforeDestroy=new be("onBeforeDestroy",r),this.onBeforeEditCell=new be("onBeforeEditCell",r),this.onBeforeFooterRowCellDestroy=new be("onBeforeFooterRowCellDestroy",r),this.onBeforeHeaderCellDestroy=new be("onBeforeHeaderCellDestroy",r),this.onBeforeHeaderRowCellDestroy=new be("onBeforeHeaderRowCellDestroy",r),this.onBeforeSetColumns=new be("onBeforeSetColumns",r),this.onBeforeSort=new be("onBeforeSort",r),this.onBeforeUpdateColumns=new be("onBeforeUpdateColumns",r),this.onCellChange=new be("onCellChange",r),this.onCellCssStylesChanged=new be("onCellCssStylesChanged",r),this.onClick=new be("onClick",r),this.onColumnsReordered=new be("onColumnsReordered",r),this.onColumnsDrag=new be("onColumnsDrag",r),this.onColumnsResized=new be("onColumnsResized",r),this.onColumnsResizeDblClick=new be("onColumnsResizeDblClick",r),this.onCompositeEditorChange=new be("onCompositeEditorChange",r),this.onContextMenu=new be("onContextMenu",r),this.onDrag=new be("onDrag",r),this.onDblClick=new be("onDblClick",r),this.onDragInit=new be("onDragInit",r),this.onDragStart=new be("onDragStart",r),this.onDragEnd=new be("onDragEnd",r),this.onFooterClick=new be("onFooterClick",r),this.onFooterContextMenu=new be("onFooterContextMenu",r),this.onFooterRowCellRendered=new be("onFooterRowCellRendered",r),this.onHeaderCellRendered=new be("onHeaderCellRendered",r),this.onHeaderClick=new be("onHeaderClick",r),this.onHeaderContextMenu=new be("onHeaderContextMenu",r),this.onHeaderMouseEnter=new be("onHeaderMouseEnter",r),this.onHeaderMouseOver=new be("onHeaderMouseOver",r),this.onHeaderMouseOut=new be("onHeaderMouseOut",r),this.onHeaderMouseLeave=new be("onHeaderMouseLeave",r),this.onHeaderRowMouseOver=new be("onHeaderRowMouseOver",r),this.onHeaderRowMouseOut=new be("onHeaderRowMouseOut",r),this.onHeaderRowCellRendered=new be("onHeaderRowCellRendered",r),this.onHeaderRowMouseEnter=new be("onHeaderRowMouseEnter",r),this.onHeaderRowMouseLeave=new be("onHeaderRowMouseLeave",r),this.onKeyDown=new be("onKeyDown",r),this.onMouseEnter=new be("onMouseEnter",r),this.onMouseLeave=new be("onMouseLeave",r),this.onPreHeaderClick=new be("onPreHeaderClick",r),this.onPreHeaderContextMenu=new be("onPreHeaderContextMenu",r),this.onRendered=new be("onRendered",r),this.onScroll=new be("onScroll",r),this.onSelectedRowsChanged=new be("onSelectedRowsChanged",r),this.onSetOptions=new be("onSetOptions",r),this.onActivateChangedOptions=new be("onActivateChangedOptions",r),this.onSort=new be("onSort",r),this.onValidationError=new be("onValidationError",r),this.onViewportChanged=new be("onViewportChanged",r),this.initialize(i)}init(){this.finishInitialization()}applyHtmlCode(e,a="",u){if(e)if(a instanceof HTMLElement||a instanceof DocumentFragment)!1!==u?.emptyTarget&&_t(e),e.appendChild(a);else{if(!1!==u?.skipEmptyReassignment&&!xt(a)&&!e.innerHTML)return;if("number"==typeof a||"boolean"==typeof a)e.textContent=String(a);else{const r=this.sanitizeHtmlString(a);this._options.enableHtmlRendering&&r?e.innerHTML=r:e.textContent=r}}}initialize(e){if(e?.mixinDefaults?(this._options||(this._options=e),W.applyDefaults(this._options,this._defaults)):this._options=cu(!0,{},this._defaults,e),this.scrollThrottle=this.actionThrottle(this.render.bind(this),this._options.scrollRenderThrottling),this.maxSupportedCssHeight=this.maxSupportedCssHeight||this.getMaxSupportedCssHeight(),this.validateAndEnforceOptions(),this._columnDefaults.width=this._options.defaultColumnWidth,this._options.suppressCssChangesOnHiddenInit||this.cacheCssForHiddenInit(),this.updateColumnProps(),this._options.enableColumnReorder&&(!Ih||!Ih.create))throw new Error("SlickGrid requires Sortable.js module to be loaded");this.editController={commitCurrentEdit:this.commitCurrentEdit.bind(this),cancelCurrentEdit:this.cancelCurrentEdit.bind(this)},_t(this._container),this._container.style.outline=String(0),this._container.classList.add(this.uid),this._container.classList.add("slick-widget"),this._container.setAttribute("role","grid");const a=window.getComputedStyle(this._container);/relative|absolute|fixed/.test(a.position)||(this._container.style.position="relative"),this._focusSink=T("div",{tabIndex:0,style:{position:"fixed",width:"0px",height:"0px",top:"0px",left:"0px",outline:"0px"}},this._container),this._options.createTopHeaderPanel&&(this._topHeaderPanelScroller=T("div",{className:"slick-topheader-panel slick-state-default",style:{overflow:"hidden",position:"relative"}},this._container),this._topHeaderPanelScroller.appendChild(document.createElement("div")),this._topHeaderPanel=T("div",null,this._topHeaderPanelScroller),this._topHeaderPanelSpacer=T("div",{style:{display:"block",height:"1px",position:"absolute",top:"0px",left:"0px"}},this._topHeaderPanelScroller),this._options.showTopHeaderPanel||W.hide(this._topHeaderPanelScroller)),this._paneHeaderL=T("div",{className:"slick-pane slick-pane-header slick-pane-left",tabIndex:0},this._container),this._paneHeaderR=T("div",{className:"slick-pane slick-pane-header slick-pane-right",tabIndex:0},this._container),this._paneTopL=T("div",{className:"slick-pane slick-pane-top slick-pane-left",tabIndex:0},this._container),this._paneTopR=T("div",{className:"slick-pane slick-pane-top slick-pane-right",tabIndex:0},this._container),this._paneBottomL=T("div",{className:"slick-pane slick-pane-bottom slick-pane-left",tabIndex:0},this._container),this._paneBottomR=T("div",{className:"slick-pane slick-pane-bottom slick-pane-right",tabIndex:0},this._container),this._options.createPreHeaderPanel&&(this._preHeaderPanelScroller=T("div",{className:"slick-preheader-panel slick-state-default",style:{overflow:"hidden",position:"relative"}},this._paneHeaderL),this._preHeaderPanelScroller.appendChild(document.createElement("div")),this._preHeaderPanel=T("div",null,this._preHeaderPanelScroller),this._preHeaderPanelSpacer=T("div",{style:{display:"block",height:"1px",position:"absolute",top:"0px",left:"0px"}},this._preHeaderPanelScroller),this._preHeaderPanelScrollerR=T("div",{className:"slick-preheader-panel slick-state-default",style:{overflow:"hidden",position:"relative"}},this._paneHeaderR),this._preHeaderPanelR=T("div",null,this._preHeaderPanelScrollerR),this._preHeaderPanelSpacerR=T("div",{style:{display:"block",height:"1px",position:"absolute",top:"0px",left:"0px"}},this._preHeaderPanelScrollerR),this._options.showPreHeaderPanel||(W.hide(this._preHeaderPanelScroller),W.hide(this._preHeaderPanelScrollerR))),this._headerScrollerL=T("div",{className:"slick-header slick-state-default slick-header-left"},this._paneHeaderL),this._headerScrollerR=T("div",{className:"slick-header slick-state-default slick-header-right"},this._paneHeaderR),this._headerScroller.push(this._headerScrollerL),this._headerScroller.push(this._headerScrollerR),this._headerL=T("div",{className:"slick-header-columns slick-header-columns-left",style:{left:"-1000px"}},this._headerScrollerL),this._headerR=T("div",{className:"slick-header-columns slick-header-columns-right",style:{left:"-1000px"}},this._headerScrollerR),this._headers=[this._headerL,this._headerR],this._headerRowScrollerL=T("div",{className:"slick-headerrow slick-state-default"},this._paneTopL),this._headerRowScrollerR=T("div",{className:"slick-headerrow slick-state-default"},this._paneTopR),this._headerRowScroller=[this._headerRowScrollerL,this._headerRowScrollerR],this._headerRowSpacerL=T("div",{style:{display:"block",height:"1px",position:"absolute",top:"0px",left:"0px"}},this._headerRowScrollerL),this._headerRowSpacerR=T("div",{style:{display:"block",height:"1px",position:"absolute",top:"0px",left:"0px"}},this._headerRowScrollerR),this._headerRowL=T("div",{className:"slick-headerrow-columns slick-headerrow-columns-left"},this._headerRowScrollerL),this._headerRowR=T("div",{className:"slick-headerrow-columns slick-headerrow-columns-right"},this._headerRowScrollerR),this._headerRows=[this._headerRowL,this._headerRowR],this._topPanelScrollerL=T("div",{className:"slick-top-panel-scroller slick-state-default"},this._paneTopL),this._topPanelScrollerR=T("div",{className:"slick-top-panel-scroller slick-state-default"},this._paneTopR),this._topPanelScrollers=[this._topPanelScrollerL,this._topPanelScrollerR],this._topPanelL=T("div",{className:"slick-top-panel",style:{width:"10000px"}},this._topPanelScrollerL),this._topPanelR=T("div",{className:"slick-top-panel",style:{width:"10000px"}},this._topPanelScrollerR),this._topPanels=[this._topPanelL,this._topPanelR],this._options.showColumnHeader||this._headerScroller.forEach(u=>{W.hide(u)}),this._options.showTopPanel||this._topPanelScrollers.forEach(u=>{W.hide(u)}),this._options.showHeaderRow||this._headerRowScroller.forEach(u=>{W.hide(u)}),this._viewportTopL=T("div",{className:"slick-viewport slick-viewport-top slick-viewport-left",tabIndex:0},this._paneTopL),this._viewportTopR=T("div",{className:"slick-viewport slick-viewport-top slick-viewport-right",tabIndex:0},this._paneTopR),this._viewportBottomL=T("div",{className:"slick-viewport slick-viewport-bottom slick-viewport-left",tabIndex:0},this._paneBottomL),this._viewportBottomR=T("div",{className:"slick-viewport slick-viewport-bottom slick-viewport-right",tabIndex:0},this._paneBottomR),this._viewport=[this._viewportTopL,this._viewportTopR,this._viewportBottomL,this._viewportBottomR],this._options.viewportClass&&this._viewport.forEach(u=>{u.classList.add(...Kt(this._options.viewportClass))}),this._activeViewportNode=this._viewportTopL,this._canvasTopL=T("div",{className:"grid-canvas grid-canvas-top grid-canvas-left",tabIndex:0},this._viewportTopL),this._canvasTopR=T("div",{className:"grid-canvas grid-canvas-top grid-canvas-right",tabIndex:0},this._viewportTopR),this._canvasBottomL=T("div",{className:"grid-canvas grid-canvas-bottom grid-canvas-left",tabIndex:0},this._viewportBottomL),this._canvasBottomR=T("div",{className:"grid-canvas grid-canvas-bottom grid-canvas-right",tabIndex:0},this._viewportBottomR),this._canvas=[this._canvasTopL,this._canvasTopR,this._canvasBottomL,this._canvasBottomR],this.scrollbarDimensions=this.scrollbarDimensions||this.measureScrollbar(),this._activeCanvasNode=this._canvasTopL,this._topHeaderPanelSpacer&&W.width(this._topHeaderPanelSpacer,this.getCanvasWidth()+this.scrollbarDimensions.width),this._preHeaderPanelSpacer&&W.width(this._preHeaderPanelSpacer,this.getCanvasWidth()+this.scrollbarDimensions.width),this._headers.forEach(u=>{W.width(u,this.getHeadersWidth())}),W.width(this._headerRowSpacerL,this.getCanvasWidth()+this.scrollbarDimensions.width),W.width(this._headerRowSpacerR,this.getCanvasWidth()+this.scrollbarDimensions.width),this._options.createFooterRow&&(this._footerRowScrollerR=T("div",{className:"slick-footerrow slick-state-default"},this._paneTopR),this._footerRowScrollerL=T("div",{className:"slick-footerrow slick-state-default"},this._paneTopL),this._footerRowScroller=[this._footerRowScrollerL,this._footerRowScrollerR],this._footerRowSpacerL=T("div",{style:{display:"block",height:"1px",position:"absolute",top:"0px",left:"0px"}},this._footerRowScrollerL),W.width(this._footerRowSpacerL,this.getCanvasWidth()+this.scrollbarDimensions.width),this._footerRowSpacerR=T("div",{style:{display:"block",height:"1px",position:"absolute",top:"0px",left:"0px"}},this._footerRowScrollerR),W.width(this._footerRowSpacerR,this.getCanvasWidth()+this.scrollbarDimensions.width),this._footerRowL=T("div",{className:"slick-footerrow-columns slick-footerrow-columns-left"},this._footerRowScrollerL),this._footerRowR=T("div",{className:"slick-footerrow-columns slick-footerrow-columns-right"},this._footerRowScrollerR),this._footerRow=[this._footerRowL,this._footerRowR],this._options.showFooterRow||this._footerRowScroller.forEach(u=>{W.hide(u)})),this._focusSink2=this._focusSink.cloneNode(!0),this._container.appendChild(this._focusSink2),this._options.explicitInitialization||this.finishInitialization()}finishInitialization(){this.initialized||(this.initialized=!0,this.getViewportWidth(),this.getViewportHeight(),this.measureCellPaddingAndBorder(),this.disableSelection(this._headers),this._options.enableTextSelectionOnCells||this._viewport.forEach(e=>{this._bindingEventService.bind(e,"selectstart",a=>{a.target instanceof HTMLInputElement||(a.target,HTMLTextAreaElement)})}),this.setFrozenOptions(),this.setPaneVisibility(),this.setScroller(),this.setOverflow(),this.updateColumnCaches(),this.createColumnHeaders(),this.createColumnFooter(),this.setupColumnSort(),this.createCssRules(),this.resizeCanvas(),this.bindAncestorScrollEvents(),this._bindingEventService.bind(this._container,"resize",this.resizeCanvas.bind(this)),this._viewport.forEach(e=>{this._bindingEventService.bind(e,"scroll",this.handleScroll.bind(this))}),this._options.enableMouseWheelScrollHandler&&this._viewport.forEach(e=>{this.slickMouseWheelInstances.push(DW({element:e,onMouseWheel:this.handleMouseWheel.bind(this)}))}),this._headerScroller.forEach(e=>{this._bindingEventService.bind(e,"contextmenu",this.handleHeaderContextMenu.bind(this)),this._bindingEventService.bind(e,"click",this.handleHeaderClick.bind(this))}),this._headerRowScroller.forEach(e=>{this._bindingEventService.bind(e,"scroll",this.handleHeaderRowScroll.bind(this))}),this._options.createFooterRow&&(this._footerRow.forEach(e=>{this._bindingEventService.bind(e,"contextmenu",this.handleFooterContextMenu.bind(this)),this._bindingEventService.bind(e,"click",this.handleFooterClick.bind(this))}),this._footerRowScroller.forEach(e=>{this._bindingEventService.bind(e,"scroll",this.handleFooterRowScroll.bind(this))})),this._options.createTopHeaderPanel&&this._bindingEventService.bind(this._topHeaderPanelScroller,"scroll",this.handleTopHeaderPanelScroll.bind(this)),this._options.createPreHeaderPanel&&(this._bindingEventService.bind(this._preHeaderPanelScroller,"scroll",this.handlePreHeaderPanelScroll.bind(this)),this._bindingEventService.bind([this._preHeaderPanelScroller,this._preHeaderPanelScrollerR],"contextmenu",this.handlePreHeaderContextMenu.bind(this)),this._bindingEventService.bind([this._preHeaderPanelScroller,this._preHeaderPanelScrollerR],"click",this.handlePreHeaderClick.bind(this))),this._bindingEventService.bind(this._focusSink,"keydown",this.handleKeyDown.bind(this)),this._bindingEventService.bind(this._focusSink2,"keydown",this.handleKeyDown.bind(this)),this._canvas.forEach(e=>{this._bindingEventService.bind(e,"keydown",this.handleKeyDown.bind(this)),this._bindingEventService.bind(e,"click",this.handleClick.bind(this)),this._bindingEventService.bind(e,"dblclick",this.handleDblClick.bind(this)),this._bindingEventService.bind(e,"contextmenu",this.handleContextMenu.bind(this)),this._bindingEventService.bind(e,"mouseover",this.handleCellMouseOver.bind(this)),this._bindingEventService.bind(e,"mouseout",this.handleCellMouseOut.bind(this))}),fW&&(this.slickDraggableInstance=fW({containerElement:this._container,allowDragFrom:"div.slick-cell",allowDragFromClosest:"div.slick-cell.dnd, div.slick-cell.cell-reorder",preventDragFromKeys:this._options.preventDragFromKeys,onDragInit:this.handleDragInit.bind(this),onDragStart:this.handleDragStart.bind(this),onDrag:this.handleDrag.bind(this),onDragEnd:this.handleDragEnd.bind(this)})),this._options.suppressCssChangesOnHiddenInit||this.restoreCssFromHiddenInit())}cacheCssForHiddenInit(){this._hiddenParents=W.parents(this._container,":hidden"),this._hiddenParents.forEach(e=>{const a={};Object.keys(this.cssShow).forEach(u=>{this.cssShow&&(a[u]=e.style[u],e.style[u]=this.cssShow[u])}),this.oldProps.push(a)})}restoreCssFromHiddenInit(){let e=0;this._hiddenParents&&this._hiddenParents.forEach(a=>{const u=this.oldProps[e++];Object.keys(this.cssShow).forEach(i=>{this.cssShow&&(a.style[i]=u[i])})})}hasFrozenColumns(){return this._options.frozenColumn>-1}registerPlugin(e){this.plugins.unshift(e),e.init(this)}unregisterPlugin(e){for(let a=this.plugins.length;a>=0;a--)if(this.plugins[a]===e){this.plugins[a]?.destroy(),this.plugins.splice(a,1);break}}getPluginByName(e){for(let a=this.plugins.length-1;a>=0;a--)if(this.plugins[a]?.pluginName===e)return this.plugins[a]}getPubSubService(){return this._pubSubService}setSelectionModel(e){this.selectionModel&&(this.selectionModel.onSelectedRangesChanged.unsubscribe(this.handleSelectedRangesChanged.bind(this)),this.selectionModel.destroy&&this.selectionModel.destroy()),this.selectionModel=e,this.selectionModel&&(this.selectionModel.init(this),this.selectionModel.onSelectedRangesChanged.subscribe(this.handleSelectedRangesChanged.bind(this)))}getSelectionModel(){return this.selectionModel}getCanvasNode(e,a){return this._getContainerElement(this.getCanvases(),e,a)}getActiveCanvasNode(e){return void 0===e||(e instanceof Wt&&(e=e.getNativeEvent()),this._activeCanvasNode=e?.target?.closest(".grid-canvas")),this._activeCanvasNode}getCanvases(){return this._canvas}getViewportNode(e,a){return this._getContainerElement(this.getViewports(),e,a)}getViewports(){return this._viewport}getActiveViewportNode(e){return this.setActiveViewportNode(e),this._activeViewportNode}setActiveViewportNode(e){return e instanceof Wt&&(e=e.getNativeEvent()),this._activeViewportNode=e?.target?.closest(".slick-viewport"),this._activeViewportNode}_getContainerElement(e,a,u){if(!e)return;a||(a=0),u||(u=0);const i="number"==typeof a?a:this.getColumnIndex(a);return e[(this.hasFrozenRows&&u>=this.actualFrozenRow+(this._options.frozenBottom?0:1)?2:0)+(this.hasFrozenColumns()&&i>this._options.frozenColumn?1:0)]}measureScrollbar(){let e="";this._viewport.forEach(r=>e+=r.className);const a=T("div",{className:e,style:{position:"absolute",top:"-10000px",left:"-10000px",overflow:"auto",width:"100px",height:"100px"}},document.body),u=T("div",{style:{width:"200px",height:"200px",overflow:"auto"}},a),i={width:a.offsetWidth-a.clientWidth,height:a.offsetHeight-a.clientHeight};return u.remove(),a.remove(),i}getHeadersWidth(){this.headersWidth=this.headersWidthL=this.headersWidthR=0;const e=!this._options.autoHeight;let a=0;const u=this.columns.length;for(a=0;a-1&&a>this._options.frozenColumn?this.headersWidthR+=i||0:this.headersWidthL+=i||0}return e&&(this._options.frozenColumn>-1&&a>this._options.frozenColumn?this.headersWidthR+=this.scrollbarDimensions?.width||0:this.headersWidthL+=this.scrollbarDimensions?.width||0),this.hasFrozenColumns()?(this.headersWidthL=this.headersWidthL+1e3,this.headersWidthR=Math.max(this.headersWidthR,this.viewportW)+this.headersWidthL,this.headersWidthR+=this.scrollbarDimensions?.width||0):(this.headersWidthL+=this.scrollbarDimensions?.width||0,this.headersWidthL=Math.max(this.headersWidthL,this.viewportW)+1e3),this.headersWidth=this.headersWidthL+this.headersWidthR,Math.max(this.headersWidth,this.viewportW)+1e3}getCanvasWidth(){const e=this.viewportHasVScroll?this.viewportW-(this.scrollbarDimensions?.width||0):this.viewportW;let a=this.columns.length;for(this.canvasWidthL=this.canvasWidthR=0;a--;)!this.columns[a]||this.columns[a].hidden||(this.hasFrozenColumns()&&a>this._options.frozenColumn?this.canvasWidthR+=this.columns[a].width||0:this.canvasWidthL+=this.columns[a].width||0);let u=this.canvasWidthL+this.canvasWidthR;if(this._options.fullWidthRows){const i=Math.max(u,e)-u;i>0&&(u+=i,this.hasFrozenColumns()?this.canvasWidthR+=i:this.canvasWidthL+=i)}return u}updateCanvasWidth(e){const a=this.canvasWidth,u=this.canvasWidthL,i=this.canvasWidthR;this.canvasWidth=this.getCanvasWidth(),this._options.createTopHeaderPanel&&W.width(this._topHeaderPanel,this._options.topHeaderPanelWidth??this.canvasWidth);const r=this.canvasWidth!==a||this.canvasWidthL!==u||this.canvasWidthR!==i;if(r||this.hasFrozenColumns()||this.hasFrozenRows)if(W.width(this._canvasTopL,this.canvasWidthL),this.getHeadersWidth(),W.width(this._headerL,this.headersWidthL),W.width(this._headerR,this.headersWidthR),this.hasFrozenColumns()){const o=W.width(this._container)||0;if(o>0&&this.canvasWidthL>o&&this._options.throwWhenFrozenNotAllViewable)throw new Error("[SlickGrid] Frozen columns cannot be wider than the actual grid container width. Make sure to have less columns freezed or make your grid container wider");W.width(this._canvasTopR,this.canvasWidthR),W.width(this._paneHeaderL,this.canvasWidthL),W.setStyleSize(this._paneHeaderR,"left",this.canvasWidthL),W.setStyleSize(this._paneHeaderR,"width",this.viewportW-this.canvasWidthL),W.width(this._paneTopL,this.canvasWidthL),W.setStyleSize(this._paneTopR,"left",this.canvasWidthL),W.width(this._paneTopR,this.viewportW-this.canvasWidthL),W.width(this._headerRowScrollerL,this.canvasWidthL),W.width(this._headerRowScrollerR,this.viewportW-this.canvasWidthL),W.width(this._headerRowL,this.canvasWidthL),W.width(this._headerRowR,this.canvasWidthR),this._options.createFooterRow&&(W.width(this._footerRowScrollerL,this.canvasWidthL),W.width(this._footerRowScrollerR,this.viewportW-this.canvasWidthL),W.width(this._footerRowL,this.canvasWidthL),W.width(this._footerRowR,this.canvasWidthR)),this._options.createPreHeaderPanel&&W.width(this._preHeaderPanel,this._options.preHeaderPanelWidth??this.canvasWidth),W.width(this._viewportTopL,this.canvasWidthL),W.width(this._viewportTopR,this.viewportW-this.canvasWidthL),this.hasFrozenRows&&(W.width(this._paneBottomL,this.canvasWidthL),W.setStyleSize(this._paneBottomR,"left",this.canvasWidthL),W.width(this._viewportBottomL,this.canvasWidthL),W.width(this._viewportBottomR,this.viewportW-this.canvasWidthL),W.width(this._canvasBottomL,this.canvasWidthL),W.width(this._canvasBottomR,this.canvasWidthR))}else W.width(this._paneHeaderL,"100%"),W.width(this._paneTopL,"100%"),W.width(this._headerRowScrollerL,"100%"),W.width(this._headerRowL,this.canvasWidth),this._options.createFooterRow&&(W.width(this._footerRowScrollerL,"100%"),W.width(this._footerRowL,this.canvasWidth)),this._options.createPreHeaderPanel&&W.width(this._preHeaderPanel,this._options.preHeaderPanelWidth??this.canvasWidth),W.width(this._viewportTopL,"100%"),this.hasFrozenRows&&(W.width(this._viewportBottomL,"100%"),W.width(this._canvasBottomL,this.canvasWidthL));this.viewportHasHScroll=this.canvasWidth>=this.viewportW-(this.scrollbarDimensions?.width||0),W.width(this._headerRowSpacerL,this.canvasWidth+(this.viewportHasVScroll&&this.scrollbarDimensions?.width||0)),W.width(this._headerRowSpacerR,this.canvasWidth+(this.viewportHasVScroll&&this.scrollbarDimensions?.width||0)),this._options.createFooterRow&&(W.width(this._footerRowSpacerL,this.canvasWidth+(this.viewportHasVScroll&&this.scrollbarDimensions?.width||0)),W.width(this._footerRowSpacerR,this.canvasWidth+(this.viewportHasVScroll&&this.scrollbarDimensions?.width||0))),(r||e)&&this.applyColumnWidths()}disableSelection(e){e.forEach(a=>{a.setAttribute("unselectable","on"),a.style.mozUserSelect="none",this._bindingEventService.bind(a,"selectstart",()=>!1)})}getMaxSupportedCssHeight(){let e=1e6;const a=navigator.userAgent.toLowerCase().match(/firefox/)?this._options.ffMaxSupportedCssHeight:this._options.maxSupportedCssHeight,u=T("div",{style:{display:"hidden"}},document.body);let i=!0;for(;i;){const r=2*e;W.height(u,r);const o=W.height(u);if(r>a||o!==r){i=!1;break}e=r}return u.remove(),e}getUID(){return this.uid}getHeaderColumnWidthDiff(){return this.headerColumnWidthDiff}getScrollbarDimensions(){return this.scrollbarDimensions}getDisplayedScrollbarDimensions(){return{width:this.viewportHasVScroll&&this.scrollbarDimensions?.width||0,height:this.viewportHasHScroll&&this.scrollbarDimensions?.height||0}}getAbsoluteColumnMinWidth(){return this.absoluteColumnMinWidth}bindAncestorScrollEvents(){let e=this.hasFrozenRows&&!this._options.frozenBottom?this._canvasBottomL:this._canvasTopL;for(;(e=e.parentNode)!==document.body&&e;)(e===this._viewportTopL||e.scrollWidth!==e.clientWidth||e.scrollHeight!==e.clientHeight)&&(this._boundAncestors.push(e),this._bindingEventService.bind(e,"scroll",this.handleActiveCellPositionChange.bind(this)))}unbindAncestorScrollEvents(){this._boundAncestors.forEach(e=>{this._bindingEventService.unbindByEventName(e,"scroll")}),this._boundAncestors=[]}updateColumnHeader(e,a,u){if(this.initialized){const i=this.getColumnIndex(e);if(!xt(i))return;const r=this.columns[i],o=this.getColumnByIndex(i);return o&&(void 0!==a&&(this.columns[i].name=a),void 0!==u&&(this.columns[i].toolTip=u),this.triggerEvent(this.onBeforeHeaderCellDestroy,{node:o,column:r,grid:this}),o.setAttribute("title",u||""),void 0!==a&&this.applyHtmlCode(o.children[0],a),this.triggerEvent(this.onHeaderCellRendered,{node:o,column:r,grid:this})),o}}getHeader(e){if(!e)return this.hasFrozenColumns()?this._headers:this._headerL;const a=this.getColumnIndex(e.id);return this.hasFrozenColumns()?a<=this._options.frozenColumn?this._headerL:this._headerR:this._headerL}getHeaderColumn(e){const a="number"==typeof e?e:this.getColumnIndex(e),u=this.hasFrozenColumns()?a<=this._options.frozenColumn?this._headerL:this._headerR:this._headerL,i=this.hasFrozenColumns()?a<=this._options.frozenColumn?a:a-this._options.frozenColumn-1:a;return u.children[i]}getHeaderRow(){return this.hasFrozenColumns()?this._headerRows:this._headerRows?.[0]}getFooterRow(){return this.hasFrozenColumns()?this._footerRow:this._footerRow?.[0]}getPreHeaderPanel(){return this._preHeaderPanel}getPreHeaderPanelLeft(){return this._preHeaderPanel}getPreHeaderPanelRight(){return this._preHeaderPanelR}getTopHeaderPanel(){return this._topHeaderPanel}getHeaderRowColumn(e){let u,a="number"==typeof e?e:this.getColumnIndex(e);return this.hasFrozenColumns()?a<=this._options.frozenColumn?u=this._headerRowL:(u=this._headerRowR,a-=this._options.frozenColumn+1):u=this._headerRowL,u.children[a]}getFooterRowColumn(e){let u,a="number"==typeof e?e:this.getColumnIndex(e);return this.hasFrozenColumns()?a<=this._options.frozenColumn?u=this._footerRowL:(u=this._footerRowR,a-=this._options.frozenColumn+1):u=this._footerRowL,u?.children[a]}createColumnFooter(){if(this._options.createFooterRow){this._footerRow.forEach(e=>{e.querySelectorAll(".slick-footerrow-column").forEach(u=>{const i=W.storage.get(u,"column");this.triggerEvent(this.onBeforeFooterRowCellDestroy,{node:u,column:i,grid:this})})}),_t(this._footerRowL),_t(this._footerRowR);for(let e=0;ethis._options.frozenColumn?this._footerRowR:this._footerRowL),i=this.hasFrozenColumns()&&e<=this._options.frozenColumn?"frozen":null;i&&u.classList.add(i),W.storage.put(u,"column",a),this.triggerEvent(this.onFooterRowCellRendered,{node:u,column:a,grid:this})}}}handleHeaderMouseHoverOn(e){e?.target.classList.add("slick-state-hover")}handleHeaderMouseHoverOff(e){e?.target.classList.remove("slick-state-hover")}createColumnHeaders(){this._headers.forEach(e=>{e.querySelectorAll(".slick-header-column").forEach(u=>{const i=W.storage.get(u,"column");i&&this.triggerEvent(this.onBeforeHeaderCellDestroy,{node:u,column:i,grid:this})})}),_t(this._headerL),_t(this._headerR),this.getHeadersWidth(),W.width(this._headerL,this.headersWidthL),W.width(this._headerR,this.headersWidthR),this._headerRows.forEach(e=>{e.querySelectorAll(".slick-headerrow-column").forEach(u=>{const i=W.storage.get(u,"column");i&&this.triggerEvent(this.onBeforeHeaderRowCellDestroy,{node:this,column:i,grid:this})})}),_t(this._headerRowL),_t(this._headerRowR),this._options.createFooterRow&&(this._footerRowL.querySelectorAll(".slick-footerrow-column").forEach(a=>{const u=W.storage.get(a,"column");u&&this.triggerEvent(this.onBeforeFooterRowCellDestroy,{node:this,column:u,grid:this})}),_t(this._footerRowL),this.hasFrozenColumns()&&(this._footerRowR.querySelectorAll(".slick-footerrow-column").forEach(u=>{const i=W.storage.get(u,"column");i&&this.triggerEvent(this.onBeforeFooterRowCellDestroy,{node:this,column:i,grid:this})}),_t(this._footerRowR)));for(let e=0;e{a.headerCellAttrs.hasOwnProperty(h)&&r.setAttribute(h,a.headerCellAttrs[h])}),a.sortable&&(r.classList.add("slick-header-sortable"),T("div",{className:"slick-sort-indicator "+(this._options.numberedMultiColumnSort&&!this._options.sortColNumberInSeparateSpan?" slick-sort-indicator-numbered":"")},r),this._options.numberedMultiColumnSort&&this._options.sortColNumberInSeparateSpan&&T("div",{className:"slick-sort-indicator-numbered"},r)),this.triggerEvent(this.onHeaderCellRendered,{node:r,column:a,grid:this}),this._options.showHeaderRow){const h=T("div",{className:`slick-state-default slick-headerrow-column l${e} r${e}`},i),m=this.hasFrozenColumns()&&e<=this._options.frozenColumn?"frozen":null;m&&h.classList.add(m),this._bindingEventService.bind(h,"mouseenter",this.handleHeaderRowMouseEnter.bind(this)),this._bindingEventService.bind(h,"mouseleave",this.handleHeaderRowMouseLeave.bind(this)),this._bindingEventService.bind(h,"mouseover",this.handleHeaderRowMouseOver.bind(this)),this._bindingEventService.bind(h,"mouseout",this.handleHeaderRowMouseOut.bind(this)),W.storage.put(h,"column",a),this.triggerEvent(this.onHeaderRowCellRendered,{node:h,column:a,grid:this})}if(this._options.createFooterRow&&this._options.showFooterRow){const m=T("div",{className:`slick-state-default slick-footerrow-column l${e} r${e}`},this.hasFrozenColumns()?e<=this._options.frozenColumn?this._footerRow[0]:this._footerRow[1]:this._footerRow[0]);W.storage.put(m,"column",a),this.triggerEvent(this.onFooterRowCellRendered,{node:m,column:a,grid:this})}}this.setSortColumns(this.sortColumns),this.setupColumnResize(),this._options.enableColumnReorder&&("function"==typeof this._options.enableColumnReorder?this._options.enableColumnReorder(this,this._headers,this.headerColumnWidthDiff,this.setColumns,this.setupColumnResize,this.columns,this.getColumnIndex,this.uid,this.triggerEvent):this.setupColumnReorder())}setupColumnSort(){this._headers.forEach(e=>{this._bindingEventService.bind(e,"click",a=>{if(this.columnResizeDragging||a.target.classList.contains("slick-resizable-handle"))return;const u=a.target.closest(".slick-header-column");if(!u)return;const i=W.storage.get(u,"column");if(i?.sortable){if(!this.getEditorLock()?.commitCurrentEdit())return;const r=this.sortColumns.slice();let o=null,d=0;for(;d{const v=this.columns[this.getColumnIndex(g.columnId)];return!v||v.hidden?null:{columnId:v.id,sortCol:v,sortAsc:g.sortAsc}}).filter(g=>g)}:{multiColumnSort:!1,previousSortColumns:r,columnId:this.sortColumns.length>0?i.id:null,sortCol:this.sortColumns.length>0?i:null,sortAsc:!(this.sortColumns.length>0)||this.sortColumns[0].sortAsc},!1!==this.triggerEvent(this.onBeforeSort,m,a).getReturnValue()&&(this.setSortColumns(this.sortColumns),this.triggerEvent(this.onSort,m,a))}})})}setupColumnReorder(){this.sortableSideLeftInstance?.destroy(),this.sortableSideRightInstance?.destroy();let e=null;const a=()=>this._viewportScrollContainerX.scrollLeft+=10,u=()=>this._viewportScrollContainerX.scrollLeft-=10;let i=!1;const r={animation:50,direction:"horizontal",chosenClass:"slick-header-column-active",ghostClass:"slick-sortable-placeholder",draggable:".slick-header-column",dragoverBubble:!1,revertClone:!0,scroll:!this.hasFrozenColumns(),filter:`.${this._options.unorderableColumnCssClass}`,onMove:o=>!o.related.classList.contains(this._options.unorderableColumnCssClass),onStart:o=>{i=!this.hasFrozenColumns()||Lu(o.item).left>Lu(this._viewportScrollContainerX).left,i&&o.originalEvent.pageX>this._container.clientWidth?e||(e=setInterval(a,100)):i&&o.originalEvent.pageX{if(clearInterval(e),e=null,!this.getEditorLock()?.commitCurrentEdit())return;let d=this.sortableSideLeftInstance?.toArray()??[];d=d.concat(this.sortableSideRightInstance?.toArray()??[]);const h=[];for(let m=0;mC.remove()),k=v.length||!v[k]||k=h)continue;const D=T("div",{className:"slick-resizable-handle",role:"separator",ariaOrientation:"horizontal"},x);this._bindingEventService.bind(D,"dblclick",this.handleResizeableDoubleClick.bind(this)),this.slickResizableInstances.push(CW({resizeableElement:x,resizeableHandleElement:D,onResizeStart:(C,F)=>{const A=C.touches?C.changedTouches[0]:C;if(!this.getEditorLock()?.commitCurrentEdit())return!1;i=A.pageX,m=0,F.resizeableElement.classList.add("slick-header-column-active");let z=null,M=null;for(let G=0;G{const A=C.touches?C.changedTouches[0]:C;let z;this.columnResizeDragging=!0;const M=Math.min(o,Math.max(r,A.pageX))-i;let L,R=0,G=0;const $=this.viewportHasVScroll?this.viewportW-(this.scrollbarDimensions?.width||0):this.viewportW;if(M<0){for(L=M,e=k;e>=0;e--)u=v[e],u&&u.resizable&&!u.hidden&&(z=Math.max(u.minWidth||0,this.absoluteColumnMinWidth),L&&(u.previousWidth||0)+Lthis._options.frozenColumn?G+=u.width||0:R+=u.width||0);if(this._options.forceFitColumns)for(L=-M,e=k+1;ethis._options.frozenColumn?G+=u.width||0:R+=u.width||0);else for(e=k+1;ethis._options.frozenColumn?G+=u.width||0:R+=u.width||0);if(this._options.forceFitColumns)for(L=-M,e=k+1;e=0;e--)if(u=v[e],u&&!u.hidden&&u.resizable)if(L&&u.maxWidth&&u.maxWidth-(u.previousWidth||0)m&&re<$-this._options.frozenRightViewportMinWidth&&(m=Y),u.width=re+this._options.frozenRightViewportMinWidth>$?m:Y):u.width=Y,L=0}for(a=0;a<=k;a++)u=v[a],u&&!u.hidden&&(this.hasFrozenColumns()&&a>this._options.frozenColumn?G+=u.width||0:R+=u.width||0);if(this._options.forceFitColumns)for(L=-M,e=k+1;ethis._options.frozenColumn?G+=u.width||0:R+=u.width||0);else for(e=k+1;ethis._options.frozenColumn?G+=u.width||0:R+=u.width||0)}this.hasFrozenColumns()&&R!==this.canvasWidthL&&(W.width(this._headerL,R+1e3),W.setStyleSize(this._paneHeaderR,"left",R)),this.applyColumnHeaderWidths(),this._options.syncColumnCellResize&&this.applyColumnWidths(),this.triggerEvent(this.onColumnsDrag,{triggeredByColumn:F.resizeableElement,resizeHandle:F.resizeableHandleElement})},onResizeEnd:(C,F)=>{F.resizeableElement.classList.remove("slick-header-column-active");const A=F.resizeableElement.id.replace(this.uid,"");let z;for(!0===this.triggerEvent(this.onBeforeColumnsResize,{triggeredByColumn:A}).getReturnValue()&&this.applyColumnHeaderWidths(),e=0;ethis.columnResizeDragging=!1,this._options.columnResizingDelay)}}))}}getVBoxDelta(e){const u=getComputedStyle(e);let i=0;return["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"].forEach(r=>i+=W.toFloat(u[r])),i}setFrozenOptions(){if(this._options.frozenColumn=this._options.frozenColumn>=0&&this._options.frozenColumn-1){this.hasFrozenRows=!0,this.frozenRowsHeight=this._options.frozenRow*this._options.rowHeight;const e=this.getDataLength();this.actualFrozenRow=this._options.frozenBottom?e-this._options.frozenRow:this._options.frozenRow}else this.hasFrozenRows=!1}setPaneVisibility(){this.hasFrozenColumns()?(W.show(this._paneHeaderR),W.show(this._paneTopR),this.hasFrozenRows?(W.show(this._paneBottomL),W.show(this._paneBottomR)):(W.hide(this._paneBottomR),W.hide(this._paneBottomL))):(W.hide(this._paneHeaderR),W.hide(this._paneTopR),W.hide(this._paneBottomR),this.hasFrozenRows?W.show(this._paneBottomL):(W.hide(this._paneBottomR),W.hide(this._paneBottomL)))}setOverflow(){if(this._viewportTopL.style.overflowX=this.hasFrozenColumns()?this.hasFrozenRows&&!this._options.alwaysAllowHorizontalScroll?"hidden":"scroll":this.hasFrozenRows&&!this._options.alwaysAllowHorizontalScroll?"hidden":"auto",this._viewportTopL.style.overflowY=!this.hasFrozenColumns()&&this._options.alwaysShowVerticalScroll?"scroll":this.hasFrozenColumns()?(this.hasFrozenRows,"hidden"):this.hasFrozenRows?"scroll":"auto",this._viewportTopR.style.overflowX=this.hasFrozenColumns()?this.hasFrozenRows&&!this._options.alwaysAllowHorizontalScroll?"hidden":"scroll":this.hasFrozenRows&&!this._options.alwaysAllowHorizontalScroll?"hidden":"auto",this._viewportTopR.style.overflowY=this._options.alwaysShowVerticalScroll?"scroll":(this.hasFrozenColumns(),this.hasFrozenRows?"scroll":"auto"),this._viewportBottomL.style.overflowX=this.hasFrozenColumns()?this.hasFrozenRows&&!this._options.alwaysAllowHorizontalScroll?"scroll":"auto":(this.hasFrozenRows&&this._options.alwaysAllowHorizontalScroll,"auto"),this._viewportBottomL.style.overflowY=!this.hasFrozenColumns()&&this._options.alwaysShowVerticalScroll?"scroll":this.hasFrozenColumns()?(this.hasFrozenRows,"hidden"):this.hasFrozenRows?"scroll":"auto",this._viewportBottomR.style.overflowX=this.hasFrozenColumns()?this.hasFrozenRows&&!this._options.alwaysAllowHorizontalScroll?"scroll":"auto":(this.hasFrozenRows&&this._options.alwaysAllowHorizontalScroll,"auto"),this._viewportBottomR.style.overflowY=this._options.alwaysShowVerticalScroll?"scroll":(this.hasFrozenColumns(),this.hasFrozenRows,"auto"),this._options.viewportClass){const e=Kt(this._options.viewportClass);this._viewportTopL.classList.add(...e),this._viewportTopR.classList.add(...e),this._viewportBottomL.classList.add(...e),this._viewportBottomR.classList.add(...e)}}setScroller(){this.hasFrozenColumns()?(this._headerScrollContainer=this._headerScrollerR,this._headerRowScrollContainer=this._headerRowScrollerR,this._footerRowScrollContainer=this._footerRowScrollerR,this.hasFrozenRows?this._options.frozenBottom?(this._viewportScrollContainerX=this._viewportBottomR,this._viewportScrollContainerY=this._viewportTopR):this._viewportScrollContainerX=this._viewportScrollContainerY=this._viewportBottomR:this._viewportScrollContainerX=this._viewportScrollContainerY=this._viewportTopR):(this._headerScrollContainer=this._headerScrollerL,this._headerRowScrollContainer=this._headerRowScrollerL,this._footerRowScrollContainer=this._footerRowScrollerL,this.hasFrozenRows?this._options.frozenBottom?(this._viewportScrollContainerX=this._viewportBottomL,this._viewportScrollContainerY=this._viewportTopL):this._viewportScrollContainerX=this._viewportScrollContainerY=this._viewportBottomL:this._viewportScrollContainerX=this._viewportScrollContainerY=this._viewportTopL)}measureCellPaddingAndBorder(){const e=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],a=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],u=this._headers[0];this.headerColumnWidthDiff=this.headerColumnHeightDiff=0,this.cellWidthDiff=this.cellHeightDiff=0;let i=T("div",{className:"slick-state-default slick-header-column",style:{visibility:"hidden"},textContent:"-"},u),r=getComputedStyle(i);"border-box"!==r.boxSizing&&(e.forEach(d=>this.headerColumnWidthDiff+=W.toFloat(r[d])),a.forEach(d=>this.headerColumnHeightDiff+=W.toFloat(r[d]))),i.remove();const o=T("div",{className:"slick-row"},this._canvas[0]);i=T("div",{className:"slick-cell",id:"",style:{visibility:"hidden"},textContent:"-"},o),r=getComputedStyle(i),"border-box"!==r.boxSizing&&(e.forEach(d=>this.cellWidthDiff+=W.toFloat(r[d])),a.forEach(d=>this.cellHeightDiff+=W.toFloat(r[d]))),o.remove(),this.absoluteColumnMinWidth=Math.max(this.headerColumnWidthDiff,this.cellWidthDiff)}createCssRules(){this._style=document.createElement("style"),this._style.nonce=this._options.nonce||"",(this._options.shadowRoot||document.head).appendChild(this._style);const e=this._options.rowHeight-this.cellHeightDiff,a=[`.${this.uid} .slick-group-header-column { left: 1000px; }`,`.${this.uid} .slick-header-column { left: 1000px; }`,`.${this.uid} .slick-top-panel { height: ${this._options.topPanelHeight}px; }`,`.${this.uid} .slick-preheader-panel { height: ${this._options.preHeaderPanelHeight}px; }`,`.${this.uid} .slick-topheader-panel { height: ${this._options.topHeaderPanelHeight}px; }`,`.${this.uid} .slick-headerrow-columns { height: ${this._options.headerRowHeight}px; }`,`.${this.uid} .slick-footerrow-columns { height: ${this._options.footerRowHeight}px; }`,`.${this.uid} .slick-cell { height: ${e}px; }`,`.${this.uid} .slick-row { height: ${this._options.rowHeight}px; }`],u=this._style.sheet;if(u){a.forEach(i=>{u.insertRule(i)});for(let i=0;i',this._style=a.content.firstChild,(this._options.shadowRoot||document.head).appendChild(this._style);for(let u=0;u=0&&(u[this._options.devMode.ownerNodeIndex].ownerNode=this._style),a=0;a{this._bindingEventService.unbindByEventName(r,"keydown"),this._bindingEventService.unbindByEventName(r,"click"),this._bindingEventService.unbindByEventName(r,"dblclick"),this._bindingEventService.unbindByEventName(r,"contextmenu"),this._bindingEventService.unbindByEventName(r,"mouseover"),this._bindingEventService.unbindByEventName(r,"mouseout")}),this._viewport.forEach(r=>{this._bindingEventService.unbindByEventName(r,"scroll")}),this._headerScroller.forEach(r=>{this._bindingEventService.unbindByEventName(r,"contextmenu"),this._bindingEventService.unbindByEventName(r,"click")}),this._headerRowScroller.forEach(r=>{this._bindingEventService.unbindByEventName(r,"scroll")}),this._footerRow&&this._footerRow.forEach(r=>{this._bindingEventService.unbindByEventName(r,"contextmenu"),this._bindingEventService.unbindByEventName(r,"click")}),this._footerRowScroller&&this._footerRowScroller.forEach(r=>{this._bindingEventService.unbindByEventName(r,"scroll")}),this._preHeaderPanelScroller&&this._bindingEventService.unbindByEventName(this._preHeaderPanelScroller,"scroll"),this._topHeaderPanelScroller&&this._bindingEventService.unbindByEventName(this._topHeaderPanelScroller,"scroll"),this._bindingEventService.unbindByEventName(this._focusSink,"keydown"),this._bindingEventService.unbindByEventName(this._focusSink2,"keydown");const u=this._container.querySelectorAll(".slick-resizable-handle");[].forEach.call(u,r=>{this._bindingEventService.unbindByEventName(r,"dblclick")});const i=this._container.querySelectorAll(".slick-header-column");[].forEach.call(i,r=>{this._bindingEventService.unbindByEventName(r,"mouseenter"),this._bindingEventService.unbindByEventName(r,"mouseleave"),this._bindingEventService.unbindByEventName(r,"mouseover"),this._bindingEventService.unbindByEventName(r,"mouseout")}),_t(this._container),this._container.classList.remove(this.uid),this.clearAllTimers(),e&&cL(this)}destroyAllInstances(e){if(e){const a=Array.isArray(e)?e:[e];let u;for(;xt(u=a.pop());)u&&"function"==typeof u.destroy&&u.destroy()}return e=Array.isArray(e)?[]:null}autosizeColumns(){this.legacyAutosizeColumns()}legacyAutosizeColumns(){let e,a,u=0,i=0,r=0;const o=[],d=this.viewportHasVScroll?this.viewportW-(this.scrollbarDimensions?.width||0):this.viewportW;for(e=0;ed&&u;){const m=(i-d)/u;for(e=0;ed;e++){if(a=this.columns[e],!a||a.hidden)continue;const g=o[e];if(!a.resizable||g<=a.minWidth||g<=this.absoluteColumnMinWidth)continue;const v=Math.max(a.minWidth,this.absoluteColumnMinWidth);let k=Math.floor(m*(g-v))||1;k=Math.min(k,g-v),i-=k,u-=k,o[e]-=k}if(r<=i)break;r=i}for(r=i;i=i)break;r=i}let h=!1;for(e=0;e!e.hidden)}triggerEvent(e,a,u){const i=u||new Wt(u,a),r=a||{};return r.grid=this,e.notify(r,i,this)}getEditorLock(){return this._options.editorLock}getEditController(){return this.editController}getColumnIndex(e){return this.columnsById[e]}applyColumnHeaderWidths(){if(this.initialized){let e=0;const a=this.getVisibleColumns();this._headers.forEach(u=>{for(let i=0;ithis._options.frozenColumn?this.canvasWidthR:this.canvasWidthL)-e-a+"px"),this._options.frozenColumn!==i&&(e+=this.columns[i].width)),this._options.frozenColumn===i&&(e=0)}setSortColumn(e,a){this.setSortColumns([{columnId:e,sortAsc:a}])}getColumnByIndex(e){let a;return this._headers.every(u=>{const i=u.children.length;return e1;this._headers.forEach(i=>{let r=i.querySelectorAll(".slick-header-column-sorted");r.forEach(o=>o.classList.remove("slick-header-column-sorted")),r=i.querySelectorAll(".slick-sort-indicator"),r.forEach(o=>o.classList.remove("slick-sort-indicator-asc","slick-sort-indicator-desc")),r=i.querySelectorAll(".slick-sort-indicator-numbered"),r.forEach(o=>o.textContent="")});let u=1;this.sortColumns.forEach(i=>{xt(i.sortAsc)||(i.sortAsc=!0);const r=this.getColumnIndex(i.columnId);if(xt(r)){const o=this.getColumnByIndex(r);if(o){o.classList.add("slick-header-column-sorted");let d=o.querySelector(".slick-sort-indicator");d?.classList.add(i.sortAsc?"slick-sort-indicator-asc":"slick-sort-indicator-desc"),a&&(d=o.querySelector(".slick-sort-indicator-numbered"),d&&(d.textContent=String(u)))}}u++})}getSortColumns(){return this.sortColumns}handleSelectedRangesChanged(e,a){const u=e.getNativeEvent(),i=this.selectedRows.slice(0);this.selectedRows=[];const r={};for(let o=0;oi.indexOf(m)<0),h=i.filter(m=>this.getSelectedRows().indexOf(m)<0);this.triggerEvent(this.onSelectedRowsChanged,{rows:this.getSelectedRows(),previousSelectedRows:i,caller:o,changedSelectedRows:d,changedUnselectedRows:h},e)}}simpleArrayEquals(e,a){return Array.isArray(e)&&Array.isArray(a)&&a.sort().toString()!==e.sort().toString()}getColumns(){return this.columns}updateColumnCaches(){this.columnPosLeft=[],this.columnPosRight=[];let e=0;for(let a=0,u=this.columns.length;aa.maxWidth&&(a.width=a.maxWidth)}}setColumns(e){this.triggerEvent(this.onBeforeSetColumns,{previousColumns:this.columns,newColumns:e,grid:this}),this.columns=e,this.updateColumnsInternal(),this.triggerEvent(this.onAfterSetColumns,{newColumns:e,grid:this})}updateColumns(){this.triggerEvent(this.onBeforeUpdateColumns,{columns:this.columns,grid:this}),this.updateColumnsInternal()}updateColumnsInternal(){this.updateColumnProps(),this.updateColumnCaches(),this.initialized&&(this.setPaneVisibility(),this.setOverflow(),this.invalidateAllRows(),this.createColumnHeaders(),this.createColumnFooter(),this.removeCssRules(),this.createCssRules(),this.resizeCanvas(),this.updateCanvasWidth(),this.applyColumnWidths(),this.handleScroll(),this.getSelectionModel()?.refreshSelections())}getOptions(){return this._options}setOptions(e,a,u,i){this.prepareForOptionsChange(),this._options.enableAddRow!==e.enableAddRow&&this.invalidateRow(this.getDataLength()),void 0!==e.frozenColumn&&e.frozenColumn>=0&&(this.getViewports().forEach(o=>o.scrollLeft=0),this.handleScroll());const r=cu(!0,{},this._options);this._options=cu(this._options,e),this.triggerEvent(this.onSetOptions,{optionsBefore:r,optionsAfter:this._options}),this.internal_setOptions(a,u,i)}activateChangedOptions(e,a,u){this.prepareForOptionsChange(),this.invalidateRow(this.getDataLength()),this.triggerEvent(this.onActivateChangedOptions,{options:this._options}),this.internal_setOptions(e,a,u)}prepareForOptionsChange(){this.getEditorLock()?.commitCurrentEdit()&&this.makeActiveCellNormal()}internal_setOptions(e,a,u){void 0!==this._options.showColumnHeader&&this.setColumnHeaderVisibility(this._options.showColumnHeader),this.validateAndEnforceOptions(),this.setFrozenOptions(),void 0!==this._options.frozenBottom&&(this.enforceFrozenRowHeightRecalc=!0),this._viewport.forEach(i=>{i.style.overflowY=this._options.autoHeight?"hidden":"auto"}),e||this.render(),this.setScroller(),u||this.setOverflow(),a||this.setColumns(this.columns),!this._options.enableMouseWheelScrollHandler||!this._viewport||this.slickMouseWheelInstances&&0!==this.slickMouseWheelInstances.length?!1===this._options.enableMouseWheelScrollHandler&&this.destroyAllInstances(this.slickMouseWheelInstances):this._viewport.forEach(i=>{this.slickMouseWheelInstances.push(DW({element:i,onMouseWheel:this.handleMouseWheel.bind(this)}))})}validateAndEnforceOptions(){this._options.autoHeight&&(this._options.leaveSpaceForNewRows=!1)}setData(e,a){this.data=e,this.invalidateAllRows(),this.updateRowCount(),a&&this.scrollTo(0)}getData(){return this.data}getDataLength(){return this.data.getLength?this.data.getLength():this.data?.length||0}getDataLengthIncludingAddNew(){return this.getDataLength()+(!this._options.enableAddRow||this.pagingActive&&!this.pagingIsLastPage?0:1)}getDataItem(e){return this.data.getItem?this.data.getItem(e):this.data[e]}getTopPanel(){return this._topPanels[0]}getTopPanels(){return this._topPanels}hasDataView(){return!Array.isArray(this.data)}togglePanelVisibility(e,a,u){this._options[e]!==u&&(this._options[e]=u,u?W.show(a):W.hide(a),this.resizeCanvas())}setTopPanelVisibility(e){this.togglePanelVisibility("showTopPanel",this._topPanelScrollers,e)}setHeaderRowVisibility(e){this.togglePanelVisibility("showHeaderRow",this._headerRowScroller,e)}setColumnHeaderVisibility(e){this.togglePanelVisibility("showColumnHeader",this._headerScroller,e)}setFooterRowVisibility(e){this.togglePanelVisibility("showFooterRow",this._footerRowScroller,e)}setPreHeaderPanelVisibility(e){this.togglePanelVisibility("showPreHeaderPanel",[this._preHeaderPanelScroller,this._preHeaderPanelScrollerR],e)}setTopHeaderPanelVisibility(e){this.togglePanelVisibility("showTopHeaderPanel",this._topHeaderPanelScroller,e)}getContainerNode(){return this._container}getRowTop(e){return this._options.rowHeight*e-this.offset}getRowFromPosition(e){return Math.floor((e+this.offset)/this._options.rowHeight)}scrollTo(e){e=Math.max(e,0),e=Math.min(e,(this.th||0)-W.height(this._viewportScrollContainerY)+((this.viewportHasHScroll||this.hasFrozenColumns())&&this.scrollbarDimensions?.height||0));const a=this.offset;this.offset=Math.round(this.page*(this.cj||0)),this.page=Math.min((this.n||0)-1,Math.floor(e/(this.ph||0)));const u=e-this.offset;if(this.offset!==a){const i=this.getVisibleRange(u);this.cleanupRows(i),this.updateRowPositions()}this.prevScrollTop!==u&&(this.vScrollDir=this.prevScrollTop+a/g,">"):""}getFormatter(e,a){const u=this.data?.getItemMetadata?.(e);return(u?.columns&&(u.columns[a.id]||u.columns[this.getColumnIndex(a.id)]))?.formatter||u?.formatter||a.formatter||this._options.formatterFactory?.getFormatter(a)||this._options.defaultFormatter}getEditor(e,a){const u=this.columns[a],r=this.data?.getItemMetadata?.(e)?.columns;return void 0!==r?.[u.id]?.editorClass?r[u.id].editorClass:void 0!==r?.[a]?.editorClass?r[a].editorClass:u.editorClass||this._options?.editorFactory?.getEditor(u)}getDataItemValueForColumn(e,a){return this._options.dataItemColumnValueExtractor?this._options.dataItemColumnValueExtractor(e,a):e[a.field]}appendRowHtml(e,a,u,i,r){const o=this.getDataItem(u),d=ui.leftPx){if(!D.alwaysRenderColumn&&this.columnPosLeft[C]>i.rightPx)break;this.hasFrozenColumns()&&C>this._options.frozenColumn?this.appendCellHtml(k,u,C,x,o):this.appendCellHtml(v,u,C,x,o)}else(D.alwaysRenderColumn||this.hasFrozenColumns()&&C<=this._options.frozenColumn)&&this.appendCellHtml(v,u,C,x,o);x>1&&(C+=x-1)}}appendCellHtml(e,a,u,i,r){const o=this.columns[u];let d="slick-cell l"+u+" r"+Math.min(this.columns.length-1,u+i-1)+(o.cssClass?" "+o.cssClass:"");this.hasFrozenColumns()&&u<=this._options.frozenColumn&&(d+=" frozen"),a===this.activeRow&&u===this.activeCell&&this._options.showCellSelection&&(d+=" active"),Object.keys(this.cellCssClasses).forEach(C=>{this.cellCssClasses[C][a]?.[o.id]&&(d+=` ${this.cellCssClasses[C][a][o.id]}`)});let h=null,m="";r&&(h=this.getDataItemValueForColumn(r,o),m=this.getFormatter(a,o)(a,u,h,o,r,this),null==m&&(m=""));const v=this.triggerEvent(this.onBeforeAppendCell,{row:a,cell:u,value:h,dataContext:r}).getReturnValue();let k="string"==typeof v?v:"";m?.addClasses&&(k+=Kt((k?" ":"")+m.addClasses).join(" "));const x=m?.toolTip?`${m.toolTip}`:"",D=T("div",{className:Kt(`${d} ${k||""}`).join(" "),role:"gridcell",tabIndex:-1});if(D.setAttribute("aria-describedby",this.uid+o.id),x&&D.setAttribute("title",x),o.hasOwnProperty("cellAttrs")&&o.cellAttrs instanceof Object&&Object.keys(o.cellAttrs).forEach(C=>{o.cellAttrs.hasOwnProperty(C)&&D.setAttribute(C,o.cellAttrs[C])}),r){const C=Bp(m)?m:m.html||m.text;this.applyHtmlCode(D,C)}e.appendChild(D),m.insertElementAfterTarget&&HG(D,m.insertElementAfterTarget),this.rowsCache[a].cellRenderQueue.push(u),this.rowsCache[a].cellColSpans[u]=i}cleanupRows(e){Object.keys(this.rowsCache).forEach(a=>{if(this.rowsCache){let u=+a,i=!0;this.hasFrozenRows&&(this._options.frozenBottom&&u>=this.actualFrozenRow||!this._options.frozenBottom&&u<=this.actualFrozenRow)&&(i=!1),(u=parseInt(a,10))!==this.activeRow&&(ue.bottom)&&i&&this.removeRowFromCache(u)}}),this._options.enableAsyncPostRenderCleanup&&this.startPostProcessingCleanup()}invalidate(){this.updateRowCount(),this.invalidateAllRows(),this.render()}invalidateAllRows(){this.currentEditor&&this.makeActiveCellNormal(),"object"==typeof this.rowsCache&&Object.keys(this.rowsCache).forEach(e=>{this.rowsCache&&this.removeRowFromCache(+e)}),this._options.enableAsyncPostRenderCleanup&&this.startPostProcessingCleanup()}invalidateRows(e){if(e?.length){this.vScrollDir=0;const a=e.length;for(let u=0;u=0&&this.invalidateRows([e])}queuePostProcessedRowForCleanup(e,a,u){this.postProcessgroupId++,"object"==typeof a&&Object.keys(a).forEach(i=>{a.hasOwnProperty(i)&&this.postProcessedCleanupQueue.push({actionType:"C",groupId:this.postProcessgroupId,node:e.cellNodesByColumnIdx[+i],columnIdx:+i,rowIdx:u})}),e.rowNode||(e.rowNode=[]),this.postProcessedCleanupQueue.push({actionType:"R",groupId:this.postProcessgroupId,node:e.rowNode}),e.rowNode?.forEach(i=>i.remove())}queuePostProcessedCellForCleanup(e,a,u){this.postProcessedCleanupQueue.push({actionType:"C",groupId:this.postProcessgroupId,node:e,columnIdx:a,rowIdx:u}),e.remove()}removeRowFromCache(e){const a=this.rowsCache[e];a?.rowNode&&(this._options.enableAsyncPostRenderCleanup&&this.postProcessedRows[e]?this.queuePostProcessedRowForCleanup(a,this.postProcessedRows[e],e):a.rowNode?.forEach(u=>u.parentElement?.removeChild(u)),delete this.rowsCache[e],delete this.postProcessedRows[e],this.renderedRows--,this.counter_rows_removed++)}applyFormatResultToCellNode(e,a,u){if(null==e&&(e=""),Bp(e))return void this.applyHtmlCode(a,e);const i=e.html||e.text;this.applyHtmlCode(a,i),e.removeClasses&&!u&&a.classList.remove(...Kt(e.removeClasses)),e.addClasses&&a.classList.add(...Kt(e.addClasses)),e.toolTip&&a.setAttribute("title",e.toolTip)}updateCell(e,a){const u=this.getCellNode(e,a);if(u){const i=this.columns[a],r=this.getDataItem(e);if(this.currentEditor&&this.activeRow===e&&this.activeCell===a)this.currentEditor.loadValue(r);else{const o=r?this.getFormatter(e,i)(e,a,this.getDataItemValueForColumn(r,i),i,r,this):"";this.applyFormatResultToCellNode(o,u),this.invalidatePostProcessingResults(e)}}}updateRow(e){const a=this.rowsCache[e];if(!a)return;let u;this.ensureCellNodesInRowsCache(e);const i=this.getDataItem(e);Object.keys(a.cellNodesByColumnIdx).forEach(r=>{if(!a.cellNodesByColumnIdx.hasOwnProperty(r))return;const o=+r,d=this.columns[o],h=a.cellNodesByColumnIdx[o];this.currentEditor&&e===this.activeRow&&o===this.activeCell?this.currentEditor.loadValue(i):i?(u=this.getFormatter(e,d)(e,o,this.getDataItemValueForColumn(i,d),d,i,this),this.applyFormatResultToCellNode(u,h)):_t(h)}),this.invalidatePostProcessingResults(e)}getViewportRowCount(){const e=this.getViewportHeight(),a=this.getScrollbarDimensions()?.height||0;return Math.floor((e-a)/this._options.rowHeight)}getViewportHeight(){if((!this._options.autoHeight||-1!==this._options.frozenColumn)&&(this.topPanelH=this._options.showTopPanel?this._options.topPanelHeight+this.getVBoxDelta(this._topPanelScrollers[0]):0,this.headerRowH=this._options.showHeaderRow?this._options.headerRowHeight+this.getVBoxDelta(this._headerRowScroller[0]):0,this.footerRowH=this._options.showFooterRow?this._options.footerRowHeight+this.getVBoxDelta(this._footerRowScroller[0]):0),this._options.autoHeight){let e=this._paneHeaderL.offsetHeight;e+=this._options.showHeaderRow?this._options.headerRowHeight+this.getVBoxDelta(this._headerRowScroller[0]):0,e+=this._options.showFooterRow?this._options.footerRowHeight+this.getVBoxDelta(this._footerRowScroller[0]):0,e+=this.getCanvasWidth()>this.viewportW&&this.scrollbarDimensions?.height||0,this.viewportH=this._options.rowHeight*this.getDataLengthIncludingAddNew()+(-1===this._options.frozenColumn?e:0)}else{const e=this._options.showColumnHeader?W.toFloat(W.height(this._headerScroller[0]))+this.getVBoxDelta(this._headerScroller[0]):0,a=this._options.createPreHeaderPanel&&this._options.showPreHeaderPanel?this._options.preHeaderPanelHeight+this.getVBoxDelta(this._preHeaderPanelScroller):0,u=this._options.createTopHeaderPanel&&this._options.showTopHeaderPanel?this._options.topHeaderPanelHeight+this.getVBoxDelta(this._topHeaderPanelScroller):0,i=getComputedStyle(this._container);this.viewportH=W.toFloat(i.height)-W.toFloat(i.paddingTop)-W.toFloat(i.paddingBottom)-e-this.topPanelH-this.headerRowH-this.footerRowH-a-u}return this.numVisibleRows=Math.ceil(this.viewportH/this._options.rowHeight),this.viewportH}getViewportWidth(){return this.viewportW=parseFloat(WF(this._container,"width"))||this._options.devMode&&this._options.devMode.containerClientWidth||0,this.viewportW}resizeCanvas(){if(this.initialized){if(this.paneTopH=0,this.paneBottomH=0,this.viewportTopH=0,this.viewportBottomH=0,this.getViewportWidth(),this.getViewportHeight(),this.hasFrozenRows?this._options.frozenBottom?(this.paneTopH=this.viewportH-this.frozenRowsHeight-(this.scrollbarDimensions?.height||0),this.paneBottomH=this.frozenRowsHeight+(this.scrollbarDimensions?.height||0)):(this.paneTopH=this.frozenRowsHeight,this.paneBottomH=this.viewportH-this.frozenRowsHeight):this.paneTopH=this.viewportH,this.paneTopH+=this.topPanelH+this.headerRowH+this.footerRowH,this.hasFrozenColumns()&&this._options.autoHeight&&(this.paneTopH+=this.scrollbarDimensions?.height||0),this.viewportTopH=this.paneTopH-this.topPanelH-this.headerRowH-this.footerRowH,this._options.autoHeight){if(this.hasFrozenColumns()){const u=getComputedStyle(this._headerScrollerL);W.height(this._container,this.paneTopH+W.toFloat(u.height))}this._paneTopL.style.position="relative"}let e=W.height(this._paneHeaderL);e?e+=this._options.showTopHeaderPanel?this._options.topHeaderPanelHeight:0:e=(this._options.showHeaderRow?this._options.headerRowHeight:0)+(this._options.showPreHeaderPanel?this._options.preHeaderPanelHeight:0),W.setStyleSize(this._paneTopL,"top",e||e),W.height(this._paneTopL,this.paneTopH);const a=this._paneTopL.offsetTop+this.paneTopH;if(this._options.autoHeight||W.height(this._viewportTopL,this.viewportTopH),this.hasFrozenColumns()){let u=W.height(this._paneHeaderL);u&&(u+=this._options.showTopHeaderPanel?this._options.topHeaderPanelHeight:0),W.setStyleSize(this._paneTopR,"top",u),W.height(this._paneTopR,this.paneTopH),W.height(this._viewportTopR,this.viewportTopH),this.hasFrozenRows&&(W.setStyleSize(this._paneBottomL,"top",a),W.height(this._paneBottomL,this.paneBottomH),W.setStyleSize(this._paneBottomR,"top",a),W.height(this._paneBottomR,this.paneBottomH),W.height(this._viewportBottomR,this.paneBottomH))}else this.hasFrozenRows&&(W.width(this._paneBottomL,"100%"),W.height(this._paneBottomL,this.paneBottomH),W.setStyleSize(this._paneBottomL,"top",a));this.hasFrozenRows?(W.height(this._viewportBottomL,this.paneBottomH),this._options.frozenBottom?(W.height(this._canvasBottomL,this.frozenRowsHeight),this.hasFrozenColumns()&&W.height(this._canvasBottomR,this.frozenRowsHeight)):(W.height(this._canvasTopL,this.frozenRowsHeight),this.hasFrozenColumns()&&W.height(this._canvasTopR,this.frozenRowsHeight))):W.height(this._viewportTopR,this.viewportTopH),(!this.scrollbarDimensions||!this.scrollbarDimensions.width)&&(this.scrollbarDimensions=this.measureScrollbar()),this._options.forceFitColumns&&this.legacyAutosizeColumns(),this.updateRowCount(),this.handleScroll(),this.lastRenderedScrollLeft=-1,this.render()}}updatePagingStatusFromView(e){this.pagingActive=0!==e.pageSize,this.pagingIsLastPage=e.pageNum===e.totalPages-1}updateRowCount(){if(this.initialized){const e=this.getDataLength(),a=this.getDataLengthIncludingAddNew();let u=0,i=this.hasFrozenRows&&!this._options.frozenBottom?W.height(this._canvasBottomL):W.height(this._canvasTopL);u=this.hasFrozenRows?this.getDataLength()-this._options.frozenRow:a+(this._options.leaveSpaceForNewRows?this.numVisibleRows-1:0);const r=W.height(this._viewportScrollContainerY),o=this.viewportHasVScroll;this.viewportHasVScroll=this._options.alwaysShowVerticalScroll||!this._options.autoHeight&&u*this._options.rowHeight>r,this.makeActiveCellNormal();const d=e-1;"object"==typeof this.rowsCache&&Object.keys(this.rowsCache).forEach(m=>{const g=+m;g>d&&this.removeRowFromCache(g)}),this._options.enableAsyncPostRenderCleanup&&this.startPostProcessingCleanup(),this.activeCellNode&&this.activeRow>d&&this.resetActiveCell(),i=this.h,this._options.autoHeight?this.h=this._options.rowHeight*u:(this.th=Math.max(this._options.rowHeight*u,r-(this.scrollbarDimensions?.height||0)),this.th1&&(i=i.concat(Array.from(u[1].children)));let r=i.length-1;for(;a.cellRenderQueue.length;){const o=a.cellRenderQueue.pop();a.cellNodesByColumnIdx[o]=i[r--]}}}cleanUpCells(e,a){if(this.hasFrozenRows&&(this._options.frozenBottom&&a>this.actualFrozenRow||a<=this.actualFrozenRow))return;const i=this.rowsCache[a],r=[];let o,d;for(Object.keys(i.cellNodesByColumnIdx).forEach(h=>{if(!i.cellNodesByColumnIdx.hasOwnProperty(h))return;const m=+h;if(m<=this._options.frozenColumn||Array.isArray(this.columns)&&this.columns[m]?.alwaysRenderColumn)return;const g=i.cellColSpans[m];(this.columnPosLeft[m]>e.rightPx||this.columnPosRight[Math.min(this.columns.length-1,(m||0)+g-1)]e.rightPx)break;if(xt(d=a.cellColSpans[D])){D+=d>1?d-1:0;continue}d=1,k&&(d=(k[this.columns[D].id]||k[D])?.colspan??1,"*"===d&&(d=C-D));const F=d;this.columnPosRight[Math.min(C-1,D+F-1)]>e.leftPx&&(this.appendCellHtml(u,g,D,F,x),r++),D+=F>1?F-1:0}r&&(o+=r,i.push(g))}if(u.children.length)for(;xt(h=i.pop());){let g;for(a=this.rowsCache[h];xt(g=a.cellRenderQueue.pop());)m=u.lastChild,m&&(this.hasFrozenColumns()&&g>this._options.frozenColumn?a.rowNode[1].appendChild(m):a.rowNode[0].appendChild(m),a.cellNodesByColumnIdx[g]=m)}}renderRows(e){const a=[],u=[],i=[];let r=!1;const o=this.getDataLength();for(let m=e.top,g=e.bottom;m<=g;m++)this.rowsCache[m]||this.hasFrozenRows&&this._options.frozenBottom&&m===this.getDataLength()||(this.renderedRows++,i.push(m),this.rowsCache[m]={rowNode:null,cellColSpans:[],cellNodesByColumnIdx:[],cellRenderQueue:[]},this.appendRowHtml(a,u,m,e,o),this.activeCellNode&&this.activeRow===m&&(r=!0),this.counter_rows_rendered++);if(!i.length)return;const d=document.createElement("div"),h=document.createElement("div");a.forEach(m=>d.appendChild(m)),u.forEach(m=>h.appendChild(m));for(let m=0,g=i.length;m=this.actualFrozenRow?this.hasFrozenColumns()?this.rowsCache?.hasOwnProperty(i[m])&&d.firstChild&&h.firstChild&&(this.rowsCache[i[m]].rowNode=[d.firstChild,h.firstChild],this._canvasBottomL.appendChild(d.firstChild),this._canvasBottomR.appendChild(h.firstChild)):this.rowsCache?.hasOwnProperty(i[m])&&d.firstChild&&(this.rowsCache[i[m]].rowNode=[d.firstChild],this._canvasBottomL.appendChild(d.firstChild)):this.hasFrozenColumns()?this.rowsCache?.hasOwnProperty(i[m])&&d.firstChild&&h.firstChild&&(this.rowsCache[i[m]].rowNode=[d.firstChild,h.firstChild],this._canvasTopL.appendChild(d.firstChild),this._canvasTopR.appendChild(h.firstChild)):this.rowsCache?.hasOwnProperty(i[m])&&d.firstChild&&(this.rowsCache[i[m]].rowNode=[d.firstChild],this._canvasTopL.appendChild(d.firstChild));r&&(this.activeCellNode=this.getCellNode(this.activeRow,this.activeCell))}startPostProcessing(){this._options.enableAsyncPostRender&&(clearTimeout(this.h_postrender),this.h_postrender=setTimeout(this.asyncPostProcessRows.bind(this),this._options.asyncPostRenderDelay))}startPostProcessingCleanup(){this._options.enableAsyncPostRenderCleanup&&(clearTimeout(this.h_postrenderCleanup),this.h_postrenderCleanup=setTimeout(this.asyncPostProcessCleanupRows.bind(this),this._options.asyncPostRenderCleanupDelay))}invalidatePostProcessingResults(e){"object"==typeof this.postProcessedRows[e]&&Object.keys(this.postProcessedRows[e]).forEach(a=>{this.postProcessedRows[e].hasOwnProperty(a)&&(this.postProcessedRows[e][a]="C")}),this.postProcessFromRow=Math.min(this.postProcessFromRow,e),this.postProcessToRow=Math.max(this.postProcessToRow,e),this.startPostProcessing()}updateRowPositions(){this.rowsCache&&"object"==typeof this.rowsCache&&Object.keys(this.rowsCache).forEach(e=>{const a=e?parseInt(e,10):0;W.setStyleSize(this.rowsCache[a].rowNode[0],"top",this.getRowTop(a))})}render(){if(this.initialized){this.scrollThrottle.dequeue();const e=this.getVisibleRange(),a=this.getRenderedRange();if(this.cleanupRows(a),this.lastRenderedScrollLeft!==this.scrollLeft){if(this.hasFrozenRows){const u=cu(!0,{},a);this._options.frozenBottom?(u.top=this.actualFrozenRow,u.bottom=this.getDataLength()):(u.top=0,u.bottom=this._options.frozenRow),this.cleanUpAndRenderCells(u)}this.cleanUpAndRenderCells(a)}this.renderRows(a),this.hasFrozenRows&&(this._options.frozenBottom?this.renderRows({top:this.actualFrozenRow,bottom:this.getDataLength()-1,leftPx:a.leftPx,rightPx:a.rightPx}):this.renderRows({top:0,bottom:this._options.frozenRow-1,leftPx:a.leftPx,rightPx:a.rightPx})),this.postProcessFromRow=e.top,this.postProcessToRow=Math.min(this.getDataLengthIncludingAddNew()-1,e.bottom),this.startPostProcessing(),this.lastRenderedScrollTop=this.scrollTop,this.lastRenderedScrollLeft=this.scrollLeft,this.h_render=null,this.triggerEvent(this.onRendered,{startRow:e.top,endRow:e.bottom,grid:this})}}handleHeaderRowScroll(){const e=this._headerRowScrollContainer.scrollLeft;e!==this._viewportScrollContainerX.scrollLeft&&(this._viewportScrollContainerX.scrollLeft=e)}handleFooterRowScroll(){const e=this._footerRowScrollContainer.scrollLeft;e!==this._viewportScrollContainerX.scrollLeft&&(this._viewportScrollContainerX.scrollLeft=e)}handlePreHeaderPanelScroll(){this.handleElementScroll(this._preHeaderPanelScroller)}handleTopHeaderPanelScroll(){this.handleElementScroll(this._topHeaderPanelScroller)}handleElementScroll(e){const a=e.scrollLeft;a!==this._viewportScrollContainerX.scrollLeft&&(this._viewportScrollContainerX.scrollLeft=a)}handleScroll(e){return this.scrollHeight=this._viewportScrollContainerY.scrollHeight,this.scrollTop=this._viewportScrollContainerY.scrollTop,this.scrollLeft=this._viewportScrollContainerX.scrollLeft,this._handleScroll(e?"scroll":"system")}_handleScroll(e="system"){let a=this._viewportScrollContainerY.scrollHeight-this._viewportScrollContainerY.clientHeight,u=this._viewportScrollContainerY.scrollWidth-this._viewportScrollContainerY.clientWidth;a=Math.max(0,a),u=Math.max(0,u),this.scrollTop>a&&(this.scrollTop=a,this.scrollHeight=a),this.scrollLeft>u&&(this.scrollLeft=u);const i=Math.abs(this.scrollTop-this.prevScrollTop),r=Math.abs(this.scrollLeft-this.prevScrollLeft);if(r&&(this.prevScrollLeft=this.scrollLeft,this._viewportScrollContainerX.scrollLeft=this.scrollLeft,this._headerScrollContainer.scrollLeft=this.scrollLeft,this._topPanelScrollers[0].scrollLeft=this.scrollLeft,this._options.createFooterRow&&(this._footerRowScrollContainer.scrollLeft=this.scrollLeft),this._options.createPreHeaderPanel&&(this.hasFrozenColumns()?this._preHeaderPanelScrollerR.scrollLeft=this.scrollLeft:this._preHeaderPanelScroller.scrollLeft=this.scrollLeft),this._options.createTopHeaderPanel&&(this._topHeaderPanelScroller.scrollLeft=this.scrollLeft),this.hasFrozenColumns()?(this.hasFrozenRows&&(this._viewportTopR.scrollLeft=this.scrollLeft),this._headerRowScrollerR.scrollLeft=this.scrollLeft):(this.hasFrozenRows&&(this._viewportTopL.scrollLeft=this.scrollLeft),this._headerRowScrollerL.scrollLeft=this.scrollLeft)),i&&!this._options.autoHeight)if(this.vScrollDir=this.prevScrollTop20||d>20)&&(this._options.forceSyncScrolling||d{i=!1},d=()=>{u=!0,clearTimeout(this._executionBlockTimer),this._executionBlockTimer=setTimeout(h,a),e.call(this)},h=()=>{i?(o(),d()):u=!1};return{enqueue:(()=>{u?i=!0:d()}).bind(this),dequeue:o.bind(this)}}asyncPostProcessRows(){const e=this.getDataLength();for(;this.postProcessFromRow<=this.postProcessToRow;){const a=this.vScrollDir>=0?this.postProcessFromRow++:this.postProcessToRow--,u=this.rowsCache[a];if(u&&!(a>=e))return this.postProcessedRows[a]||(this.postProcessedRows[a]={}),this.ensureCellNodesInRowsCache(a),Object.keys(u.cellNodesByColumnIdx).forEach(i=>{if(u.cellNodesByColumnIdx.hasOwnProperty(i)){const r=+i,o=this.columns[r],d=this.postProcessedRows[a][r];if(o.asyncPostRender&&"R"!==d){const h=u.cellNodesByColumnIdx[r];h&&o.asyncPostRender(h,a,this.getDataItem(a),o,"C"===d),this.postProcessedRows[a][r]="R"}}}),void(this.h_postrender=setTimeout(this.asyncPostProcessRows.bind(this),this._options.asyncPostRenderDelay))}}asyncPostProcessCleanupRows(){if(this.postProcessedCleanupQueue.length>0){const e=this.postProcessedCleanupQueue[0].groupId;for(;this.postProcessedCleanupQueue.length>0&&this.postProcessedCleanupQueue[0].groupId===e;){const a=this.postProcessedCleanupQueue.shift();if("R"===a?.actionType&&a.node.forEach(u=>{u.remove()}),"C"===a?.actionType){const u=this.columns[a.columnIdx];u.asyncPostRenderCleanup&&a.node&&u.asyncPostRenderCleanup(a.node,a.rowIdx,u)}}this.h_postrenderCleanup=setTimeout(this.asyncPostProcessCleanupRows.bind(this),this._options.asyncPostRenderCleanupDelay)}}updateCellCssStylesOnRenderedRows(e,a){let u,i,r;"object"==typeof this.rowsCache&&Object.keys(this.rowsCache).forEach(o=>{this.rowsCache&&(r=a?.[o],i=e?.[o],r&&Object.keys(r).forEach(d=>{(!i||r[d]!==i[d])&&(u=this.getCellNode(+o,this.getColumnIndex(d)),u&&u.classList.remove(r[d]))}),i&&Object.keys(i).forEach(d=>{(!r||r[d]!==i[d])&&(u=this.getCellNode(+o,this.getColumnIndex(d)),u&&u.classList.add(i[d]))}))})}addCellCssStyles(e,a){if(this.cellCssClasses[e])throw new Error(`SlickGrid addCellCssStyles: cell CSS hash with key "${e}" already exists.`);this.cellCssClasses[e]=a,this.updateCellCssStylesOnRenderedRows(a,null),this.triggerEvent(this.onCellCssStylesChanged,{key:e,hash:a,grid:this})}removeCellCssStyles(e){this.cellCssClasses[e]&&(this.updateCellCssStylesOnRenderedRows(null,this.cellCssClasses[e]),delete this.cellCssClasses[e],this.triggerEvent(this.onCellCssStylesChanged,{key:e,hash:null,grid:this}))}setCellCssStyles(e,a){const u=this.cellCssClasses[e];this.cellCssClasses[e]=a,this.updateCellCssStylesOnRenderedRows(a,u),this.triggerEvent(this.onCellCssStylesChanged,{key:e,hash:a,grid:this})}getCellCssStyles(e){return this.cellCssClasses[e]}flashCell(e,a,u=250){const i=(r,o)=>{o<1||(clearTimeout(this._flashCellTimer),this._flashCellTimer=setTimeout(()=>{o%2==0?r.classList.add(this._options.cellFlashingCssClass||""):r.classList.remove(this._options.cellFlashingCssClass||""),i(r,o-1)},u))};if(this.rowsCache[e]){const r=this.getCellNode(e,a);r&&i(r,5)}}highlightRow(e,a){const u=this.rowsCache[e];a||=this._options.rowHighlightDuration,Array.isArray(u?.rowNode)&&this._options.rowHighlightCssClass&&(u.rowNode.forEach(i=>i.classList.add(...Kt(this._options.rowHighlightCssClass))),clearTimeout(this._highlightRowTimer),this._highlightRowTimer=setTimeout(()=>{u.rowNode?.forEach(i=>i.classList.remove(...Kt(this._options.rowHighlightCssClass)))},a))}handleMouseWheel(e,a,u,i){this.scrollHeight=this._viewportScrollContainerY.scrollHeight,this.scrollTop=Math.max(0,this._viewportScrollContainerY.scrollTop-i*this._options.rowHeight),this.scrollLeft=this._viewportScrollContainerX.scrollLeft+10*u,this._handleScroll("mousewheel")&&e.preventDefault()}handleDragInit(e,a){const u=this.getCellFromEvent(e);if(!u||!this.cellExists(u.row,u.cell))return!1;const i=this.triggerEvent(this.onDragInit,a,e);return!!i.isImmediatePropagationStopped()&&i.getReturnValue()}handleDragStart(e,a){const u=this.getCellFromEvent(e);if(!u||!this.cellExists(u.row,u.cell))return!1;const i=this.triggerEvent(this.onDragStart,a,e);return!!i.isImmediatePropagationStopped()&&i.getReturnValue()}handleDrag(e,a){return this.triggerEvent(this.onDrag,a,e).getReturnValue()}handleDragEnd(e,a){this.triggerEvent(this.onDragEnd,a,e)}handleKeyDown(e){let u=this.triggerEvent(this.onKeyDown,{row:this.activeRow,cell:this.activeCell},e).isImmediatePropagationStopped();if(!u&&!e.shiftKey&&!e.altKey){if(this._options.editable&&this.currentEditor?.keyCaptureList&&this.currentEditor.keyCaptureList.indexOf(e.which)>-1)return;"Home"===e.key?u=e.ctrlKey?this.navigateTop():this.navigateRowStart():"End"===e.key&&(u=e.ctrlKey?this.navigateBottom():this.navigateRowEnd())}if(!u)if(e.shiftKey||e.altKey||e.ctrlKey)"Tab"===e.key&&e.shiftKey&&!e.ctrlKey&&!e.altKey&&(u=this.navigatePrev());else if("Escape"===e.key){if(!this.getEditorLock()?.isActive())return;this.cancelEditAndSetFocus()}else"PageDown"===e.key?(this.navigatePageDown(),u=!0):"PageUp"===e.key?(this.navigatePageUp(),u=!0):"ArrowLeft"===e.key?u=this.navigateLeft():"ArrowRight"===e.key?u=this.navigateRight():"ArrowUp"===e.key?u=this.navigateUp():"ArrowDown"===e.key?u=this.navigateDown():"Tab"===e.key?u=this.navigateNext():"Enter"===e.key&&(this._options.editable&&(this.currentEditor?this.activeRow===this.getDataLength()?this.navigateDown():this.commitEditAndSetFocus():this.getEditorLock()?.commitCurrentEdit()&&this.makeActiveCellEditable(void 0,void 0,e)),u=!0);u&&(e.stopPropagation(),e.preventDefault())}handleClick(e){const a=e instanceof Wt?e.getNativeEvent():e;if(!this.currentEditor&&(a.target!==document.activeElement||a.target.classList.contains("slick-cell"))){const i=this.getTextSelection();this.setFocus(),this.setTextSelection(i)}const u=this.getCellFromEvent(a);if(u&&(null===this.currentEditor||this.activeRow!==u.row||this.activeCell!==u.cell)&&(!(e=this.triggerEvent(this.onClick,{row:u.row,cell:u.cell},e||a)).isImmediatePropagationStopped()&&!a.defaultPrevented&&this.canCellBeActive(u.row,u.cell)&&(!this.getEditorLock()?.isActive()||this.getEditorLock()?.commitCurrentEdit()))){this.scrollRowIntoView(u.row,!1);const i="slick-edit-preclick"===a.target?.className,r=this.columns[u.cell],o=!!(this._options.editable&&r?.editorClass&&this._options.suppressActiveCellChangeOnEdit);this.setActiveCellInternal(this.getCellNode(u.row,u.cell),null,i,o,a)}}handleContextMenu(e){const a=e.target.closest(".slick-cell");a&&(this.activeCellNode===a&&null!==this.currentEditor||this.triggerEvent(this.onContextMenu,{},e))}handleDblClick(e){const a=this.getCellFromEvent(e);!a||null!==this.currentEditor&&this.activeRow===a.row&&this.activeCell===a.cell||(this.triggerEvent(this.onDblClick,{row:a.row,cell:a.cell},e),!e.defaultPrevented&&this._options.editable&&this.gotoCell(a.row,a.cell,!0,e))}handleHeaderMouseEnter(e){const a=W.storage.get(e.target.closest(".slick-header-column"),"column");a&&this.triggerEvent(this.onHeaderMouseEnter,{column:a,grid:this},e)}handleHeaderMouseOver(e){const a=W.storage.get(e.target.closest(".slick-header-column"),"column");a&&this.triggerEvent(this.onHeaderMouseOver,{column:a,grid:this},e)}handleHeaderMouseLeave(e){const a=W.storage.get(e.target.closest(".slick-header-column"),"column");a&&this.triggerEvent(this.onHeaderMouseLeave,{column:a,grid:this},e)}handleHeaderMouseOut(e){const a=W.storage.get(e.target.closest(".slick-header-column"),"column");a&&this.triggerEvent(this.onHeaderMouseOut,{column:a,grid:this},e)}handleHeaderRowMouseEnter(e){const a=W.storage.get(e.target.closest(".slick-headerrow-column"),"column");a&&this.triggerEvent(this.onHeaderRowMouseEnter,{column:a,grid:this},e)}handleHeaderRowMouseOver(e){const a=W.storage.get(e.target.closest(".slick-headerrow-column"),"column");a&&this.triggerEvent(this.onHeaderRowMouseOver,{column:a,grid:this},e)}handleHeaderRowMouseLeave(e){const a=W.storage.get(e.target.closest(".slick-headerrow-column"),"column");a&&this.triggerEvent(this.onHeaderRowMouseLeave,{column:a,grid:this},e)}handleHeaderRowMouseOut(e){const a=W.storage.get(e.target.closest(".slick-headerrow-column"),"column");a&&this.triggerEvent(this.onHeaderRowMouseOut,{column:a,grid:this},e)}handleHeaderContextMenu(e){const a=e.target.closest(".slick-header-column"),u=a&&W.storage.get(a,"column");this.triggerEvent(this.onHeaderContextMenu,{column:u},e)}handleHeaderClick(e){if(!this.columnResizeDragging){const a=e.target.closest(".slick-header-column"),u=a&&W.storage.get(a,"column");u&&this.triggerEvent(this.onHeaderClick,{column:u},e)}}handlePreHeaderContextMenu(e){this.triggerEvent(this.onPreHeaderContextMenu,{node:e.target},e)}handlePreHeaderClick(e){this.columnResizeDragging||this.triggerEvent(this.onPreHeaderClick,{node:e.target},e)}handleFooterContextMenu(e){const a=e.target.closest(".slick-footerrow-column"),u=a&&W.storage.get(a,"column");this.triggerEvent(this.onFooterContextMenu,{column:u},e)}handleFooterClick(e){const a=e.target.closest(".slick-footerrow-column"),u=a&&W.storage.get(a,"column");this.triggerEvent(this.onFooterClick,{column:u},e)}handleCellMouseOver(e){this.triggerEvent(this.onMouseEnter,{},e)}handleCellMouseOut(e){this.triggerEvent(this.onMouseLeave,{},e)}cellExists(e,a){return!(e<0||e>=this.getDataLength()||a<0||a>=this.columns.length)}getCellFromPoint(e,a){let u=this.getRowFromPosition(a),i=0,r=0;for(let o=0;o=this.actualFrozenRow?this.h=this.actualFrozenRow?this.frozenRowsHeight:0:0,a}getCellFromEvent(e){const a=e instanceof Wt?e.getNativeEvent():e;if(!a)return null;const u=a.touches?a.touches[0]:a,i=a.target.closest(".slick-cell");if(!i)return null;let r=this.getRowFromNode(i.parentNode);if(this.hasFrozenRows){let d=0;const h=Lu(W.parents(i,".grid-canvas")[0]);W.parents(i,".grid-canvas-bottom").length&&(d=this._options.frozenBottom?W.height(this._canvasTopL):this.frozenRowsHeight);const g=u.clientX-h.left,v=u.clientY-h.top+d+document.documentElement.scrollTop;r=this.getCellFromPoint(g,v).row}const o=this.getCellFromNode(i);return wp(r)&&wp(o)?{row:r,cell:o}:null}getCellNodeBox(e,a){if(!this.cellExists(e,a))return null;const u=this.getFrozenRowOffset(e),i=this.getRowTop(e)-u,r=i+this._options.rowHeight-1;let o=0;for(let h=0;h1?i-1:0)])}internalScrollColumnIntoView(e,a){const u=this.scrollLeft+W.width(this._viewportScrollContainerX)-(this.viewportHasVScroll&&this.scrollbarDimensions?.width||0);eu&&(this._viewportScrollContainerX.scrollLeft=Math.min(e,a-this._viewportScrollContainerX.clientWidth),this.handleScroll(),this.render())}scrollColumnIntoView(e){this.internalScrollColumnIntoView(this.columnPosLeft[e],this.columnPosRight[e])}setActiveCellInternal(e,a,u,i,r){if(xt(this.activeCellNode)&&(this.makeActiveCellNormal(),this.activeCellNode.classList.remove("active"),this.rowsCache[this.activeRow]?.rowNode?.forEach(o=>o.classList.remove("active"))),this.activeCellNode=e,xt(this.activeCellNode)){const o=Lu(this.activeCellNode);let d=Math.floor(Lu(W.parents(this.activeCellNode,".grid-canvas")[0]).top);const h=W.parents(this.activeCellNode,".grid-canvas-bottom").length;this.hasFrozenRows&&h&&(d-=this._options.frozenBottom?W.height(this._canvasTopL):this.frozenRowsHeight);const m=this.getCellFromPoint(o.left,Math.ceil(o.top)-d);this.activeRow=m.row,this.activeCell=this.activePosX=this.activeCell=this.activePosX=this.getCellFromNode(this.activeCellNode),!xt(a)&&this._options.autoEditNewRow&&(a=this.activeRow===this.getDataLength()||this._options.autoEdit),this._options.showCellSelection&&(this.activeCellNode.classList.add("active"),this.rowsCache[this.activeRow]?.rowNode?.forEach(g=>g.classList.add("active"))),this._options.editable&&a&&this.isCellPotentiallyEditable(this.activeRow,this.activeCell)&&(this._options.asyncEditorLoading?(clearTimeout(this.h_editorLoader),this.h_editorLoader=setTimeout(()=>{this.makeActiveCellEditable(void 0,u,r)},this._options.asyncEditorLoadDelay)):this.makeActiveCellEditable(void 0,u,r))}else this.activeRow=this.activeCell=null;i||this.triggerEvent(this.onActiveCellChanged,this.getActiveCell())}clearTextSelection(){if(document.selection?.empty)try{document.selection.empty()}catch{}else if(window.getSelection){const e=window.getSelection();e?.removeAllRanges&&e.removeAllRanges()}}isCellPotentiallyEditable(e,a){const u=this.getDataLength();return!(e=u||!this.columns[a]||this.columns[a].hidden||!this.getEditor(e,a))}makeActiveCellNormal(e=!1){if(this.currentEditor){if(this.triggerEvent(this.onBeforeCellEditorDestroy,{editor:this.currentEditor}),this.currentEditor.destroy(),this.currentEditor=null,this.activeCellNode){const a=this.getDataItem(this.activeRow);if(this.activeCellNode.classList.remove("editable"),this.activeCellNode.classList.remove("invalid"),a){const u=this.columns[this.activeCell],r=this.getFormatter(this.activeRow,u)(this.activeRow,this.activeCell,this.getDataItemValueForColumn(a,u),u,a,this);this.applyFormatResultToCellNode(r,this.activeCellNode),this.invalidatePostProcessingResults(this.activeRow)}e&&this.setFocus()}navigator.userAgent.toLowerCase().match(/msie/)&&this.clearTextSelection(),this.getEditorLock()?.deactivate(this.editController)}}editActiveCell(e,a,u){this.makeActiveCellEditable(e,a,u)}makeActiveCellEditable(e,a,u){if(!this.activeCellNode)return;if(!this._options.editable)throw new Error("SlickGrid makeActiveCellEditable : should never get called when grid options.editable is false");if(clearTimeout(this.h_editorLoader),!this.isCellPotentiallyEditable(this.activeRow,this.activeCell))return;const i=this.columns[this.activeCell],r=this.getDataItem(this.activeRow);if(!1===this.triggerEvent(this.onBeforeEditCell,{row:this.activeRow,cell:this.activeCell,item:r,column:i,target:"grid"}).getReturnValue())return void this.setFocus();this.getEditorLock()?.activate(this.editController),this.activeCellNode.classList.add("editable");const o=e||this.getEditor(this.activeRow,this.activeCell);if("function"==typeof o){!e&&!o.suppressClearOnEdit&&_t(this.activeCellNode);let d=this.data?.getItemMetadata?.(this.activeRow);d=d?.columns;const h=d&&(d[i.id]||d[this.activeCell]),m={grid:this,gridPosition:this.absBox(this._container),position:this.absBox(this.activeCellNode),container:this.activeCellNode,column:i,columnMetaData:h,item:r||{},event:u,commitChanges:this.commitEditAndSetFocus.bind(this),cancelChanges:this.cancelEditAndSetFocus.bind(this)};this.currentEditor=new o(m),r&&this.currentEditor&&(this.currentEditor.loadValue(r),a&&"function"==typeof this.currentEditor?.preClick&&this.currentEditor.preClick()),this.serializedEditorValue=this.currentEditor?.serializeValue(),this.currentEditor?.position&&this.handleActiveCellPositionChange()}}commitEditAndSetFocus(){this.getEditorLock()?.commitCurrentEdit()&&(this.setFocus(),this._options.autoEdit&&!this._options.autoCommitEdit&&this.navigateDown())}cancelEditAndSetFocus(){this.getEditorLock()?.cancelCurrentEdit()&&this.setFocus()}absBox(e){const a={top:e.offsetTop,left:e.offsetLeft,bottom:0,right:0,width:e.offsetWidth,height:e.offsetWidth,visible:!0};a.bottom=a.top+a.height,a.right=a.left+a.width;let u=e.offsetParent;for(;(e=e.parentNode)!==document.body&&e&&e.parentNode;){const i=getComputedStyle(e);a.visible&&e.scrollHeight!==e.offsetHeight&&"visible"!==i.overflowY&&(a.visible=a.bottom>e.scrollTop&&a.tope.scrollLeft&&a.left0&&(e=a.getRangeAt(0))}return e}setTextSelection(e){if(window.getSelection&&e){const a=window.getSelection();a&&(a.removeAllRanges(),a.addRange(e))}}scrollRowIntoView(e,a){if(!this.hasFrozenRows||!this._options.frozenBottom&&e>this.actualFrozenRow-1||this._options.frozenBottom&&ethis.scrollTop+u+this.offset?(this.scrollTo(a?r:o),this.render()):i*this._options.rowHeight=r&&(i=r-1),i<0&&(i=0);let o=0,d=null;const h=this.activePosX;for(;o<=this.activePosX;)this.canCellBeActive(i,o)&&(d=o),o+=this.getColspan(i,o);null!==d?(this.setActiveCellInternal(this.getCellNode(i,d)),this.activePosX=h):this.resetActiveCell()}}navigatePageDown(){this.scrollPage(1)}navigatePageUp(){this.scrollPage(-1)}navigateTop(){this.navigateToRow(0)}navigateBottom(){return this.navigateToRow(this.getDataLength()-1)}navigateToRow(e){const a=this.getDataLength();if(!a)return!0;if(e<0?e=0:e>=a&&(e=a-1),this.scrollCellIntoView(e,0,!0),this._options.enableCellNavigation&&xt(this.activeRow)){let u=0,i=null;const r=this.activePosX;for(;u<=this.activePosX;)this.canCellBeActive(e,u)&&(i=u),u+=this.getColspan(e,u);null!==i?(this.setActiveCellInternal(this.getCellNode(e,i)),this.activePosX=r):this.resetActiveCell()}return!0}getColspan(e,a){const u=this.data?.getItemMetadata?.(e);if(!u||!u.columns)return 1;let r=(u.columns[this.columns[a].id]||u.columns[a])?.colspan;return r="*"===r?this.columns.length-a:r||1,r}findFirstFocusableCell(e){let a=0;for(;a=this.columns.length)return null;do{a+=this.getColspan(e,a)}while(a=a)return null;let o,r={row:e,cell:i,posX:i},d=!0;for(;d;){if(o=this.gotoRight(r.row,r.cell,r.posX),!o)return d=!1,null;if(o.cell>=a)return d=!1,r;r=o}}gotoDown(e,a,u){let i;const r=this.getDataLengthIncludingAddNew();let o=!0;for(;o;){if(++e>=r)return o=!1,null;for(i=a=0;a<=u;)i=a,a+=this.getColspan(e,a);if(this.canCellBeActive(e,i))return o=!1,{row:e,cell:i,posX:u}}}gotoUp(e,a,u){let i,r=!0;for(;r;){if(--e<0)return r=!1,null;for(i=a=0;a<=u;)i=a,a+=this.getColspan(e,a);if(this.canCellBeActive(e,i))return r=!1,{row:e,cell:i,posX:u}}}gotoNext(e,a,u){if(!wp(e)&&!wp(a)&&(e=a=u=0,this.canCellBeActive(e,a)))return{row:e,cell:a,posX:a};const i=this.gotoRight(e,a,u);if(i)return i;let r=null;const o=this.getDataLengthIncludingAddNew();for(e===o-1&&e--;++e=this.actualFrozenRow||this._options.frozenBottom&&r.rowa?this.rowsCache[e].cellNodesByColumnIdx[a]:null}catch{return this.rowsCache[e].cellNodesByColumnIdx[a]}}return null}setActiveCell(e,a,u,i,r){!this.initialized||!this._options.enableCellNavigation||e>this.getDataLength()||e<0||a>=this.columns.length||a<0||(this.scrollCellIntoView(e,a,!1),this.setActiveCellInternal(this.getCellNode(e,a),u,i,r))}setActiveRow(e,a,u){a??=0,!(!this.initialized||e>this.getDataLength()||e<0||a>=this.columns.length||a<0)&&(this.activeRow=e,u||this.scrollCellIntoView(e,a,!1))}canCellBeActive(e,a){if(!this._options.enableCellNavigation||e>=this.getDataLengthIncludingAddNew()||e<0||a>=this.columns.length||a<0||!this.columns[a]||this.columns[a].hidden)return!1;const u=this.data?.getItemMetadata?.(e);if(void 0!==u?.focusable)return!!u.focusable;const i=u?.columns;return void 0!==i?.[this.columns[a].id]?.focusable?!!i[this.columns[a].id].focusable:void 0!==i?.[a]?.focusable?!!i[a].focusable:!!this.columns[a].focusable}canCellBeSelected(e,a){if(e>=this.getDataLength()||e<0||a>=this.columns.length||a<0||!this.columns[a]||this.columns[a].hidden)return!1;const u=this.data?.getItemMetadata?.(e);if(void 0!==u?.selectable)return!!u.selectable;const i=u?.columns&&(u.columns[this.columns[a].id]||u.columns[a]);return void 0!==i?.selectable?!!i.selectable:!!this.columns[a].selectable}gotoCell(e,a,u,i){if(!this.initialized||!this.canCellBeActive(e,a)||!this.getEditorLock()?.commitCurrentEdit())return;this.scrollCellIntoView(e,a,!1);const r=this.getCellNode(e,a),o=this.columns[a],d=!!(this._options.editable&&o?.editorClass&&this._options.suppressActiveCellChangeOnEdit);this.setActiveCellInternal(r,u||e===this.getDataLength()||this._options.autoEdit,null,d,i),this.currentEditor||this.setFocus()}commitCurrentEdit(){const e=this,a=e.getDataItem(e.activeRow),u=e.columns[e.activeCell];if(e.currentEditor){if(e.currentEditor.isValueChanged()){const i=e.currentEditor.validate();if(i.valid){const r=e.activeRow,o=e.activeCell,d=e.currentEditor,h=e.currentEditor.serializeValue(),m=e.serializedEditorValue;if(e.activeRow{d.applyValue(a,h),e.updateRow(r),e.triggerEvent(e.onCellChange,{command:"execute",row:r,cell:o,item:a,column:u})},undo:()=>{d.applyValue(a,m),e.updateRow(r),e.triggerEvent(e.onCellChange,{command:"undo",row:r,cell:o,item:a,column:u})}};e._options.editCommandHandler?(e.makeActiveCellNormal(!0),e._options.editCommandHandler(a,u,g)):(g.execute(),e.makeActiveCellNormal(!0))}else{const g={};e.currentEditor.applyValue(g,e.currentEditor.serializeValue()),e.makeActiveCellNormal(!0),e.triggerEvent(e.onAddNewRow,{item:g,column:u})}return!e.getEditorLock()?.isActive()}return e.activeCellNode&&(e.activeCellNode.classList.remove("invalid"),W.width(e.activeCellNode),e.activeCellNode.classList.add("invalid")),e.triggerEvent(e.onValidationError,{editor:e.currentEditor,cellNode:e.activeCellNode,validationResults:i,row:e.activeRow,cell:e.activeCell,column:u}),e.currentEditor.focus(),!1}e.makeActiveCellNormal(!0)}return!0}cancelCurrentEdit(){return this.makeActiveCellNormal(),!0}rowsToRanges(e){const a=[],u=this.columns.length-1;for(let i=0;ithis._addonOptions?.maxToolTipLength&&(i=i.substring(0,this._addonOptions.maxToolTipLength-3)+"...")):i="",u.title=i),u=null}}handleHeaderMouseEnter(e,a){const u=a.column;let i;const r=e.target;if(r&&(i=r.closest(".slick-header-column"),i&&!u?.toolTip)){const o=r.clientWidth{this._addonOptions&&"function"==typeof this._addonOptions.onCopyCells&&this._addonOptions.onCopyCells(u,i)}),this._eventHandler.subscribe(this._cellExternalCopyManagerPlugin.onCopyCancelled,(u,i)=>{this._addonOptions&&"function"==typeof this._addonOptions.onCopyCancelled&&this._addonOptions.onCopyCancelled(u,i)}),this._eventHandler.subscribe(this._cellExternalCopyManagerPlugin.onPasteCells,(u,i)=>{this._addonOptions&&"function"==typeof this._addonOptions.onPasteCells&&this._addonOptions.onPasteCells(u,i)})}dispose(){this._eventHandler.unsubscribeAll(),this._bindingEventService.unbindAll(),this._cellSelectionModel?.dispose(),this._cellExternalCopyManagerPlugin?.dispose()}createUndoRedoBuffer(){let e=0;this._commandQueue=[],this._undoRedoBuffer={queueAndExecuteCommand:a=>{this._commandQueue[e]=a,e++,a.execute()},undo:()=>{if(0===e)return;e--;const a=this._commandQueue[e];a&&td.cancelCurrentEdit()&&a.undo()},redo:()=>{if(e>=this._commandQueue.length)return;const a=this._commandQueue[e];e++,a&&td.cancelCurrentEdit()&&a.execute()}}}getDefaultOptions(){let e=0;return{clipboardCommandHandler:a=>{this._undoRedoBuffer.queueAndExecuteCommand.call(this._undoRedoBuffer,a)},dataItemColumnValueExtractor:(a,u,i=0,r=0)=>{const o=this._grid.getActiveCell(),d=this._grid.getCellEditor()&&o?.row===i&&o?.cell===r,h=this.addonOptions?.copyActiveEditorCell||!1;if(!this.gridOptions.editable||!u.editor||!d||h){const m=void 0!==u.exportWithFormatter?u.exportWithFormatter:this.gridOptions.textExportOptions?.exportWithFormatter;if(u.formatter&&m){const g=u.formatter(i,r,a[u.field],u,a,this._grid),v=Bp(g)?g:g.html||g.text;if(u.sanitizeDataExport||this.gridOptions.textExportOptions?.sanitizeDataExport){return Tu((v instanceof HTMLElement?v.innerHTML:v)??"")}return g}}return null},readOnlyMode:!1,includeHeaderWhenCopying:!1,newRowCreator:a=>{for(let u=0;u{};class ghe{constructor(){this.pluginName="CellExternalCopyManager",this._bodyElement=document.body,this._copiedCellStyle="copied",this._copiedCellStyleLayerKey="copy-manager",this._copiedRanges=null,this.onCopyCells=new be("onCopyCells"),this.onCopyCancelled=new be("onCopyCancelled"),this.onPasteCells=new be("onPasteCells"),this.onBeforePasteCell=new be("onBeforePasteCell"),this._eventHandler=new Ut}get addonOptions(){return this._addonOptions}get eventHandler(){return this._eventHandler}init(e,a){this._grid=e,this._addonOptions={...this._addonOptions,...a},this._copiedCellStyleLayerKey=this._addonOptions.copiedCellStyleLayerKey||"copy-manager",this._copiedCellStyle=this._addonOptions.copiedCellStyle||"copied",this._bodyElement=this._addonOptions.bodyElement||document.body,this._onCopyInit=this._addonOptions.onCopyInit||void 0,this._onCopySuccess=this._addonOptions.onCopySuccess||void 0;const u=e.getPubSubService();u&&W.addSlickEventPubSubWhenDefined(u,this),this._eventHandler.subscribe(this._grid.onKeyDown,this.handleKeyDown.bind(this));const i=e.getSelectionModel();if(!i)throw new Error("Selection model is mandatory for this plugin. Please set a selection model on the grid before adding this plugin: grid.setSelectionModel(new SlickCellSelectionModel())");if(this._eventHandler.subscribe(i.onSelectedRangesChanged,()=>{this._grid.getEditorLock().isActive()||this._grid.focus()}),e&&"function"==typeof this._addonOptions?.onBeforePasteCell){const r=e?.getData();this._eventHandler.subscribe(this.onBeforePasteCell,(o,d)=>{const h=e.getColumns()[d.cell],m={row:d.row,cell:d.cell,dataView:r,grid:e,columnDef:h,dataContext:e.getDataItem(d.row)};return this._addonOptions.onBeforePasteCell?.(o,m)})}}dispose(){this._eventHandler.unsubscribeAll()}clearCopySelection(){this._grid.removeCellCssStyles(this._copiedCellStyleLayerKey)}getHeaderValueForColumn(e){if("function"==typeof this._addonOptions.headerColumnValueExtractor){const a=ui(this._addonOptions.headerColumnValueExtractor(e),"innerHTML");if(a)return Tu(a)}return ui(e.name||"","innerHTML")}getDataItemValueForColumn(e,a,u,i,r){if("function"==typeof this._addonOptions.dataItemColumnValueExtractor){const d=this._addonOptions.dataItemColumnValueExtractor(e,a,u,i);if(d)return d instanceof HTMLElement?Tu(d.innerHTML):d}let o="";if(a)if(a.editorClass){const d=document.createElement("p"),h=new a.editorClass({container:d,column:a,event:r,position:{top:0,left:0},gridPosition:{top:0,left:0},grid:this._grid,cancelChanges:x7,commitChanges:x7});h.loadValue(e),o=h.serializeValue(),h.destroy(),d.remove()}else o=e[a.field||""];return o}setDataItemValueForColumn(e,a,u){if(!a?.denyPaste){if(this._addonOptions.dataItemColumnValueSetter){const i=this._addonOptions.dataItemColumnValueSetter(e,a,u);if(!0!==i)return i}if(a.editorClass){const i=document.createElement("div"),r=new a.editorClass({container:i,column:a,event:null,position:{top:0,left:0},gridPosition:{top:0,left:0},grid:this._grid,cancelChanges:x7,commitChanges:x7});r.loadValue(e);const o=r.validate(void 0,u);if(!o.valid){const d=this._grid.getActiveCell();this._grid.onValidationError.notify({editor:r,cellNode:this._grid.getActiveCellNode(),validationResults:o,row:d?.row,cell:d?.cell,column:a,grid:this._grid})}r.applyValue(e,u),r.destroy(),i.remove()}else e[a.field]=u}}setIncludeHeaderWhenCopying(e){this._addonOptions.includeHeaderWhenCopying=e}createTextBox(e){const a=T("textarea",{value:e,style:{position:"absolute",left:"-1000px",top:`${document.body.scrollTop}px`}},this._bodyElement);return a.select(),a}decodeTabularData(e,a){const u=e.getColumns(),r=a.value.split(/[\n\f\r](?=(?:[^"]*"[^"]*")*[^"]*$)/);""===r[r.length-1]&&r.pop();let o=0;const d=[];this._bodyElement.removeChild(a);for(const L of r)L.startsWith('"')&&L.endsWith('"')?d[o++]=[L.replaceAll("\n",this._addonOptions.replaceNewlinesWith||"\n").replaceAll("\r","").replaceAll('"',this._addonOptions.removeDoubleQuotesOnPaste?"":'"')]:d[o++]=L.split("\t");const h=this._grid.getActiveCell(),m=this._grid.getSelectionModel()?.getSelectedRanges(),g=m?.length?m[0]:null;let v,k;if(g)v=g.fromRow,k=g.fromCell;else{if(!h)return;v=h.row,k=h.cell}let x=!1,D=d.length,C=d.length?d[0].length:0;1===d.length&&1===d[0].length&&g&&(x=!0,D=g.toRow-g.fromRow+1,C=g.toCell-g.fromCell+1);const F=this._grid.getData().length-v;let A=0;if(Fthis._grid.getDataLength()&&"function"==typeof this._addonOptions.newRowCreator){const L=v+D-this._grid.getDataLength();this._addonOptions.newRowCreator(L)}const M={isClipboardCommand:!0,clippedRange:d,oldValues:[],cellExternalCopyManager:this,_options:this._addonOptions,setDataItemValueForColumn:this.setDataItemValueForColumn,markCopySelection:this.markCopySelection,oneCellToMultiple:x,activeRow:v,activeCell:k,destH:D,destW:C,maxDestY:this._grid.getDataLength(),maxDestX:this._grid.getColumns().length,h:0,w:0,execute:()=>{M.h=0;for(let R=0;R{for(let R=0;R1){const R=this._grid.getData();for(;A>1;A--)R.splice(R.length-1,1);this._grid.setData(R),this._grid.render()}}};this._addonOptions.clipboardCommandHandler?this._addonOptions.clipboardCommandHandler(M):M.execute()}handleKeyDown(e){let a;if(!this._grid.getEditorLock().isActive()||this._grid.getOptions().autoEdit){if("Escape"===e.key&&this._copiedRanges&&(e.preventDefault(),this.clearCopySelection(),this.onCopyCancelled.notify({ranges:this._copiedRanges}),"function"==typeof this._addonOptions.onCopyCancelled&&this._addonOptions.onCopyCancelled(e,{ranges:this._copiedRanges}),this._copiedRanges=null),("c"===e.key||"Insert"===e.key)&&(e.ctrlKey||e.metaKey)&&!e.shiftKey&&("function"==typeof this._onCopyInit&&this._onCopyInit.call(this),a=this._grid.getSelectionModel()?.getSelectedRanges()??[],0!==a.length)){this._copiedRanges=a,this.markCopySelection(a),this.onCopyCells.notify({ranges:a}),"function"==typeof this._addonOptions.onCopyCells&&this._addonOptions.onCopyCells(e,{ranges:a});const u=this._grid.getColumns();let i="";for(let r=0;r0&&!u[k].hidden&&v.push(this.getHeaderValueForColumn(u[k]));d.push(v.join("\t"))}for(let v=o.fromCell;v0&&!u[v].hidden&&m.push(this.getDataItemValueForColumn(g,u[v],h,v,e));d.push(m.join("\t"))}i+=d.join("\r\n")+"\r\n"}if(window.clipboardData)return window.clipboardData.setData("Text",i),!0;{const r=document.activeElement,o=this.createTextBox(i);if(o.focus(),setTimeout(()=>{this._bodyElement.removeChild(o),r?r.focus():console.log("No element to restore focus to after copy?")},this.addonOptions?.clipboardPasteDelay??100),"function"==typeof this._onCopySuccess){const d=1===a.length?a[0].toRow+1-a[0].fromRow:a.length;this._onCopySuccess(d)}return!1}}if(!this._addonOptions.readOnlyMode&&("v"===e.key&&(e.ctrlKey||e.metaKey)&&!e.shiftKey||"Insert"===e.key&&e.shiftKey&&!e.ctrlKey)){const u=this.createTextBox("");return setTimeout(()=>this.decodeTabularData(this._grid,u),this.addonOptions?.clipboardPasteDelay??100),!1}}}markCopySelection(e){this.clearCopySelection();const a=this._grid.getColumns(),u={};for(const i of e)for(let r=i.fromRow;r<=i.toRow;r++){u[r]={};for(let o=i.fromCell;o<=i.toCell&&othis.clearCopySelection(),this.addonOptions?.clearCopySelectionDelay||2e3)}}class f7{constructor(e,a,u){this.extensionUtility=e,this.pubSubService=a,this.sharedService=u,this._addonOptions={},this._camelPluginName="",this._gridUid="",this._menuCssPrefix="",this._menuPluginCssPrefix="",this._bindEventService=new Ni,this._eventHandler=new Ut}get addonOptions(){return this._addonOptions}set addonOptions(e){this._addonOptions=e}get eventHandler(){return this._eventHandler}get grid(){return this.sharedService.slickGrid}get gridOptions(){return this.sharedService.gridOptions??{}}get gridUid(){return this._gridUid||(this.grid?.getUID()??"")}get gridUidSelector(){return this.gridUid?`.${this.gridUid}`:""}get menuCssClass(){return this._menuPluginCssPrefix||this._menuCssPrefix}get menuElement(){return this._menuElm||document.querySelector(`.${this.menuCssClass}${this.gridUidSelector}`)}dispose(){this._eventHandler?.unsubscribeAll(),this._bindEventService.unbindAll(),this.pubSubService.unsubscribeAll(),this._commandTitleElm?.remove(),this._optionTitleElm?.remove(),this.disposeAllMenus(),_t(this._menuElm),this.menuElement?.remove(),this._menuElm?.remove()}disposeAllMenus(){this.disposeSubMenus(),this._bindEventService.unbindAll("parent-menu"),document.querySelectorAll(`.${this.menuCssClass}${this.gridUidSelector}`).forEach(e=>e.remove())}disposeSubMenus(){this._bindEventService.unbindAll("sub-menu"),document.querySelectorAll(`.${this.menuCssClass}.slick-submenu${this.gridUidSelector}`).forEach(e=>e.remove())}setOptions(e){this._addonOptions={...this._addonOptions,...e}}addSubMenuTitleWhenExists(e,a){if("divider"!==e&&e?.subMenuTitle){const u=document.createElement("div");u.className="slick-menu-title",u.textContent=e.subMenuTitle;const i=e.subMenuTitleCssClass;i&&u.classList.add(...Kt(i)),a.appendChild(u)}}populateCommandOrOptionItems(e,a,u,i,r,o,d){if(r&&i&&a)for(const h of i)this.populateSingleCommandOrOptionItem(e,a,u,h,r,o,d)}populateCommandOrOptionTitle(e,a,u,i){if(a){const r=i>0,o=this._menuElm?.querySelector(`.slick-${e}-header`)??T("div",{className:`slick-${e}-header`}),d=`${e}Title`;r||(a?.[d]?(_t(o),this[`_${e}TitleElm`]=T("span",{className:"slick-menu-title",textContent:a[d]}),o.appendChild(this[`_${e}TitleElm`]),o.classList.add("with-title")):o.classList.add("no-title"),u.appendChild(o))}}populateSingleCommandOrOptionItem(e,a,u,i,r,o,d){let h=null;if(r&&i&&a){const m=r?.level||0,g="headerButtons"===this._camelPluginName?"":"-item",v=`${this._menuCssPrefix}${g}`;let k=!0,x=!0;if("object"==typeof i&&(k=this.extensionUtility.runOverrideFunctionWhenExists(i.itemVisibilityOverride,r),x=this.extensionUtility.runOverrideFunctionWhenExists(i.itemUsabilityOverride,r)),!k)return null;if("object"==typeof i&&i.itemUsabilityOverride&&(i.disabled=!x),h=T("li",{className:v,role:"menuitem"}),"object"==typeof i&&xt(i[e])&&(h.dataset[e]=i?.[e]),u&&u.appendChild(h),"object"==typeof i&&i.divider||"divider"===i)return h.classList.add(`${v}-divider`),h;if(i.disabled&&h.classList.add(`${v}-disabled`),(i.hidden||i.showOnHover)&&h.classList.add(`${v}-hidden`),i.cssClass&&h.classList.add(...Kt(i.cssClass)),i.tooltip&&(h.title=i.tooltip),"headerButtons"!==this._camelPluginName){const C=T("div",{className:`${this._menuCssPrefix}-icon`});h.appendChild(C),i.iconCssClass?C.classList.add(...Kt(i.iconCssClass)):!i.commandItems&&!i.optionItems&&(C.textContent="\u25e6");const F=T("span",{className:`${this._menuCssPrefix}-content`,textContent:"object"==typeof i&&i.title||""},h);i.textCssClass&&F.classList.add(...Kt(i.textCssClass))}const D=m>0?"sub-menu":"parent-menu";if(this._bindEventService.bind(h,"click",C=>o.call(this,C,e,i,m,r?.column),void 0,D),"mouseover"===this._addonOptions?.subMenuOpenByEvent&&"function"==typeof d&&this._bindEventService.bind(h,"mouseover",C=>d.call(this,C,e,i,m,r?.column),void 0,D),i.commandItems||i.optionItems){const C=document.createElement("span");C.className="sub-item-chevron",this._addonOptions.subItemChevronClass?C.classList.add(...Kt(this._addonOptions.subItemChevronClass)):C.textContent="\u2b9e",h.classList.add("slick-submenu-item"),h.appendChild(C)}}return h}}class _W extends f7{constructor(e,a,u){super(e,a,u),this.extensionUtility=e,this.pubSubService=a,this.sharedService=u,this._currentCell=-1,this._currentRow=-1,this._lastMenuTypeClicked="",this._subMenuParentId=""}createParentMenu(e){this.menuElement?.remove(),this._menuElm=void 0;const a=this.grid.getCellFromEvent(e);if(a){this._currentCell=a.cell??0,this._currentRow=a.row??0;const u=this._addonOptions?.commandItems||[],i=this._addonOptions?.optionItems||[],r={cell:this._currentCell,row:this._currentRow,grid:this.grid};if(this.closeMenu(e,r),"function"==typeof e.stopPropagation&&(this.pubSubService.publish(`on${yo(this._camelPluginName)}BeforeMenuShow`,r),"function"==typeof this.addonOptions?.onBeforeMenuShow&&!1===this.addonOptions.onBeforeMenuShow(e,r))||(this._menuElm=this.createMenu(u,i),this._menuElm&&(this._menuElm.style.top=`${(e.pageY||0)+5}px`,this._menuElm.style.left=`${e.pageX}px`,this._menuElm.style.display="block",document.body.appendChild(this._menuElm)),this.pubSubService.publish(`on${yo(this._camelPluginName)}AfterMenuShow`,r),"function"==typeof this.addonOptions?.onAfterMenuShow&&!1===this.addonOptions.onAfterMenuShow(e,r)))return}return this._menuElm}createMenu(e,a,u=0,i){const r=this.grid.getColumns()[this._currentCell],o=this.grid.getDataItem(this._currentRow),d=i?.command||i?.option;let h=1===u&&d?String(d).replace(/\s/g,""):"";h&&(this._subMenuParentId=h),u>1&&(h=this._subMenuParentId);let m=!0,g=!0;if("contextMenu"===this._camelPluginName){if(m=this.checkIsColumnAllowed(this._addonOptions?.optionShownOverColumnIds??[],r.id),g=this.checkIsColumnAllowed(this._addonOptions?.commandShownOverColumnIds??[],r.id),!(r&&(g&&e.length||m&&a.length)))return void this.hideMenu()}else if(!r||!r.cellMenu||!e.length&&!a.length)return;const v=`${this.menuCssClass} slick-menu-level-${u} ${this.gridUid}`,k=document.body.querySelector(`.${this.menuCssClass}.slick-menu-level-${u}${this.gridUidSelector}`);if(k){if(k.dataset.subMenuParent===h)return k;this.disposeSubMenus()}const x=document.createElement("div");x.className=v,u>0&&(x.classList.add("slick-submenu"),this.gridOptions?.darkMode&&x.classList.add("slick-dark-mode"),h&&(x.dataset.subMenuParent=h));const D=isNaN(this.addonOptions.maxHeight)?this.addonOptions.maxHeight:`${this.addonOptions.maxHeight??0}px`,C=isNaN(this.addonOptions.maxWidth)?this.addonOptions.maxWidth:`${this.addonOptions.maxWidth??0}px`;D&&(x.style.maxHeight=D),C&&(x.style.maxWidth=C),this.addonOptions?.width&&(x.style.width=Mc(this.addonOptions?.width));const F=T("button",{ariaLabel:"Close",className:"close",type:"button",textContent:"\xd7",dataset:{dismiss:this._menuCssPrefix}});if(!this.addonOptions.hideOptionSection&&m&&a.length>0){const A=T("div",{className:`${this._menuCssPrefix}-option-list`,role:"menu"},x);this.populateCommandOrOptionTitle("option",this.addonOptions,A,u),!this.addonOptions.hideCloseButton&&u<1&&this.populateCommandOrOptionCloseBtn("option",F,A),i&&u>0&&this.addSubMenuTitleWhenExists(i,A),this.populateCommandOrOptionItems("option",this.addonOptions,A,a,{cell:this._currentCell,row:this._currentRow,column:r,dataContext:o,grid:this.grid,level:u},this.handleMenuItemCommandClick,this.handleMenuItemMouseOver)}if(!this.addonOptions.hideCommandSection&&g&&e.length>0){const A=T("div",{className:`${this._menuCssPrefix}-command-list`,role:"menu"},x);this.populateCommandOrOptionTitle("command",this.addonOptions,A,u),!this.addonOptions.hideCloseButton&&u<1&&(!m||0===a.length||this.addonOptions.hideOptionSection)&&this.populateCommandOrOptionCloseBtn("command",F,A),i&&u>0&&this.addSubMenuTitleWhenExists(i,A),this.populateCommandOrOptionItems("command",this.addonOptions,A,e,{cell:this._currentCell,row:this._currentRow,column:r,dataContext:o,grid:this.grid,level:u},this.handleMenuItemCommandClick,this.handleMenuItemMouseOver)}return u++,x}closeMenu(e,a){if(this.menuElement){if("function"==typeof this.addonOptions?.onBeforeMenuClose&&!1===this.addonOptions.onBeforeMenuClose(e,a))return;this.hideMenu()}}hideMenu(){this.menuElement?.remove(),this._menuElm=null,this.disposeSubMenus()}checkIsColumnAllowed(e,a){return!(e?.length>0)||e.findIndex(u=>u===a)>=0}handleBodyMouseDown(e){if(this.menuElement){let a=!1;const u=e.target.closest(`.${this.menuCssClass}`);(this.menuElement.contains(e.target)||u)&&(a=!0),(this.menuElement!==e.target&&!a&&!e.defaultPrevented||"close"===e.target.className&&u)&&this.closeMenu(e,{cell:this._currentCell,row:this._currentRow,grid:this.grid})}}handleCloseButtonClicked(e){e.defaultPrevented||this.closeMenu(e,{cell:0,row:0,grid:this.grid})}handleMenuItemMouseOver(e,a,u,i=0){void 0!==u?.[a]&&"divider"!==u&&!u.disabled&&!u.divider&&(u.commandItems||u.optionItems?(this.repositionSubMenu(u,a,i,e),this._lastMenuTypeClicked=a):0===i&&this.disposeSubMenus())}handleMenuItemCommandClick(e,a,u,i=0){if(void 0!==u?.[a]&&"divider"!==u&&!u.disabled&&!u.divider&&void 0!==this._currentCell&&void 0!==this._currentRow){if("option"===a&&!this.grid.getEditorLock().commitCurrentEdit())return;const r=this._currentCell,o=this._currentRow,d=this.grid.getColumns()[this._currentCell],h=this.grid.getDataItem(this._currentRow),m=void 0!==u[a]?u[a]:"";if(void 0===m||u[`${a}Items`])(u.commandItems||u.optionItems)&&this.repositionSubMenu(u,a,i,e);else{const g={cell:this._currentCell,row:this._currentRow,grid:this.grid,[a]:m,item:u,column:d,dataContext:h},v="command"===a?"onCommand":"onOptionSelected",k=`${this._camelPluginName}:${v}`;this.pubSubService.publish(k,g),"function"==typeof this._addonOptions?.[v]&&this._addonOptions[v](e,g),"function"==typeof u.action&&u.action.call(this,e,g),e.defaultPrevented||this.closeMenu(e,{cell:r,row:o,grid:this.grid})}this._lastMenuTypeClicked=a}}populateCommandOrOptionCloseBtn(e,a,u){this._bindEventService.bind(a,"click",r=>this.handleCloseButtonClicked(r),void 0,"parent-menu");const i=u.querySelector(`.slick-${e}-header`)??T("div",{className:`slick-${e}-header`});i?.appendChild(a),u.appendChild(i),i.classList.add("with-close")}repositionSubMenu(e,a,u,i){(i.target.classList.contains("slick-cell")||this._lastMenuTypeClicked!==a)&&this.disposeSubMenus();const r=this.createMenu(e?.commandItems||[],e?.optionItems||[],u+1,e);r&&(r.style.display="block",document.body.appendChild(r),this.repositionMenu(i,r))}repositionMenu(e,a){const u=a?.classList.contains("slick-submenu"),i=u?e.target.closest(`.${this._menuCssPrefix}-item`):e.target.closest(".slick-cell");if(a&&i){a.style.top="0px",a.style.left="0px";const r=e?.touches?.[0]??e,o=Lu(i);let d=i&&"cellMenu"===this._camelPluginName?o.left:r.pageX,h=i&&"cellMenu"===this._camelPluginName?o.top:r.pageY;u&&"contextMenu"===this._camelPluginName&&(d=o.left,h=o.top);const m=i.offsetWidth||0,g=a?.offsetHeight||0,v=a?.offsetWidth||this._addonOptions.width||0,k=this.gridOptions.rowHeight||0,x=Number(this._addonOptions.autoAdjustDropOffset||0),D=Number(this._addonOptions.autoAlignSideOffset||0);if(this._addonOptions.autoAdjustDrop||this._addonOptions.dropDirection){const{bottom:C,top:F}=V2(i),A=C+x-k;"top"==(AA?"top":"bottom")||"top"===this._addonOptions.dropDirection?(a.classList.remove("dropdown"),a.classList.add("dropup"),h-=u?g-x-i.clientHeight:g-x):(a.classList.remove("dropup"),a.classList.add("dropdown"),h+=x,"cellMenu"===this._camelPluginName&&(h+=u?x:k+x))}if(this._addonOptions.autoAlignSide||"left"===this._addonOptions.dropSide){const C=this.grid.getGridPosition();let F=d+Number(v);u&&(F+=i.clientWidth);const A=document.documentElement.clientWidth;"left"==(F>=C.width||F>=A?"left":"right")||!u&&"left"===this._addonOptions.dropSide?(a.classList.remove("dropright"),a.classList.add("dropleft"),"cellMenu"!==this._camelPluginName||u?d-=Number(v)-D:d-=Number(v)-m-D):(a.classList.remove("dropleft"),a.classList.add("dropright"),d+=u?D+i.offsetWidth:D)}a.style.top=`${h}px`,a.style.left=`${d}px`}}}class Ehe extends _W{constructor(e,a,u){super(e,a,u),this.extensionUtility=e,this.pubSubService=a,this.sharedService=u,this.pluginName="CellMenu",this._defaults={autoAdjustDrop:!0,autoAlignSide:!0,autoAdjustDropOffset:0,autoAlignSideOffset:0,hideMenuOnScroll:!0,subMenuOpenByEvent:"mouseover"},this._camelPluginName="cellMenu",this._menuCssPrefix="slick-menu",this._menuPluginCssPrefix="slick-cell-menu",this.init(u.gridOptions.cellMenu)}init(e){this._addonOptions={...this._defaults,...e},this.sortMenuItems(this.sharedService.allColumns),this._eventHandler.subscribe(this.grid.onClick,this.handleCellClick.bind(this)),this._addonOptions.hideMenuOnScroll&&this._eventHandler.subscribe(this.grid.onScroll,this.closeMenu.bind(this))}translateCellMenu(){const e=this.sharedService?.gridOptions,a=this.sharedService.allColumns;e?.enableTranslate&&Array.isArray(a)&&a.forEach(u=>{if(u?.cellMenu&&(Array.isArray(u.cellMenu.commandItems)||Array.isArray(u.cellMenu.optionItems))){const i=u.cellMenu.commandItems||[],r=u.cellMenu.optionItems||[];u.cellMenu.commandTitleKey&&(u.cellMenu.commandTitle=this.extensionUtility.translateWhenEnabledAndServiceExist(u.cellMenu.commandTitleKey,"TEXT_COMMANDS")||u.cellMenu.commandTitle),u.cellMenu.optionTitleKey&&(u.cellMenu.optionTitle=this.extensionUtility.translateWhenEnabledAndServiceExist(u.cellMenu.optionTitleKey,"TEXT_COMMANDS")||u.cellMenu.optionTitle),this.extensionUtility.translateMenuItemsFromTitleKey(i,"commandItems"),this.extensionUtility.translateMenuItemsFromTitleKey(r,"optionItems")}})}handleCellClick(e,a){this.disposeAllMenus();const u=this.grid.getCellFromEvent(e);if(u){const i=this.grid.getDataItem(u.row),r=this.grid.getColumns()[u.cell];r?.cellMenu&&!this.gridOptions.cellMenu?.activateCellOnMenuClick&&e.preventDefault(),this._addonOptions={...this._addonOptions,...r.cellMenu};const o=a||{};if(o.column=r,o.dataContext=i,o.grid=this.grid,!this.extensionUtility.runOverrideFunctionWhenExists(this._addonOptions.menuUsabilityOverride,o))return;this._menuElm=this.createParentMenu(e),this._menuElm&&(this.repositionMenu(e,this._menuElm),this._menuElm.ariaExpanded="true",this._menuElm.style.display="block",this.gridOptions.darkMode&&this._menuElm.classList.add("slick-dark-mode")),this._bindEventService.bind(document.body,"mousedown",this.handleBodyMouseDown.bind(this))}}sortMenuItems(e){e.forEach(a=>{a?.cellMenu?.commandItems&&this.extensionUtility.sortItems(a.cellMenu.commandItems||[],"positionOrder"),a?.cellMenu?.optionItems&&this.extensionUtility.sortItems(a.cellMenu.optionItems||[],"positionOrder")})}}class vhe{constructor(e,a){this.grid=e,this.pluginName="CellRangeDecorator",this._defaults={selectionCssClass:"slick-range-decorator",selectionCss:{border:"2px dashed red",zIndex:"9999"},offset:{top:-1,left:-1,height:-2,width:-2}},this._options=Ap(this._defaults,a)}get addonOptions(){return this._options}get addonElement(){return this._elem}destroy(){this.hide()}init(){}hide(){this._elem?.remove(),this._elem=null}show(e){this._elem||(this._elem=T("div",{className:this._options.selectionCssClass}),Object.keys(this._options.selectionCss).forEach(i=>{this._elem.style[i]=this._options.selectionCss[i]}),this._elem.style.position="absolute",this.grid.getActiveCanvasNode()?.appendChild(this._elem));const a=this.grid.getCellNodeBox(e.fromRow,e.fromCell),u=this.grid.getCellNodeBox(e.toRow,e.toCell);return a&&u&&this._options?.offset&&(this._elem.style.top=`${a.top+this._options.offset.top}px`,this._elem.style.left=`${a.left+this._options.offset.left}px`,this._elem.style.height=`${u.bottom-a.top+this._options.offset.height}px`,this._elem.style.width=`${u.right-a.left+this._options.offset.width}px`),this._elem}}class FW{constructor(e){this.pluginName="CellRangeSelector",this._currentlySelectedRange=null,this._canvas=null,this._dragging=!1,this._gridUid="",this._columnOffset=0,this._rowOffset=0,this._isRightCanvas=!1,this._isBottomCanvas=!1,this._xDelayForNextCell=0,this._yDelayForNextCell=0,this._viewportHeight=0,this._viewportWidth=0,this._isRowMoveRegistered=!1,this._scrollLeft=0,this._scrollTop=0,this._defaults={autoScroll:!0,minIntervalToShowNextCell:30,maxIntervalToShowNextCell:600,accelerateInterval:5,selectionCss:{border:"2px dashed blue"}},this.onBeforeCellRangeSelected=new be("onBeforeCellRangeSelected"),this.onCellRangeSelecting=new be("onCellRangeSelecting"),this.onCellRangeSelected=new be("onCellRangeSelected"),this._eventHandler=new Ut,this._options=Ap(this._defaults,e)}get addonOptions(){return this._options}get eventHandler(){return this._eventHandler}get gridUid(){return this._gridUid||(this._grid?.getUID()??"")}get gridUidSelector(){return this.gridUid?`.${this.gridUid}`:""}init(e){this._grid=e,this._decorator=this._options.cellDecorator||new vhe(e,this._options),this._canvas=e.getCanvasNode(),this._gridOptions=e.getOptions(),this._gridUid=e.getUID();const a=e.getPubSubService();a&&W.addSlickEventPubSubWhenDefined(a,this),this._eventHandler.subscribe(this._grid.onDrag,this.handleDrag.bind(this)).subscribe(this._grid.onDragInit,this.handleDragInit.bind(this)).subscribe(this._grid.onDragStart,this.handleDragStart.bind(this)).subscribe(this._grid.onDragEnd,this.handleDragEnd.bind(this)).subscribe(this._grid.onScroll,this.handleScroll.bind(this))}destroy(){this.dispose()}dispose(){this._eventHandler?.unsubscribeAll(),_t(this._activeCanvas),_t(this._canvas),this._decorator?.destroy(),this.stopIntervalTimer()}getCellDecorator(){return this._decorator}getCurrentRange(){return this._currentlySelectedRange}getMouseOffsetViewport(e,a){const u=e?.touches?.[0]??e,i=this._activeViewport.scrollLeft,r=this._activeViewport.scrollTop,o=i+this._viewportWidth,d=r+this._viewportHeight,h=Lu(this._activeViewport),m=h.left,g=h.top,v=m+this._viewportWidth,k=g+this._viewportHeight,x={e,dd:a,viewport:{left:i,top:r,right:o,bottom:d,offset:{left:m,top:g,right:v,bottom:k}},offset:{x:0,y:0},isOutsideViewport:!1};return u.pageXv&&(x.offset.x=u.pageX-v),u.pageYk&&(x.offset.y=k-u.pageY),x.isOutsideViewport=!!x.offset.x||!!x.offset.y,x}stopIntervalTimer(){this._autoScrollTimerId&&(clearInterval(this._autoScrollTimerId),this._autoScrollTimerId=void 0)}handleDrag(e,a){if(!this._dragging&&!this._gridOptions.enableRowMoveManager)return;this._gridOptions.enableRowMoveManager||e.stopImmediatePropagation();const u=e.getNativeEvent();if(this.addonOptions.autoScroll&&(this._draggingMouseOffset=this.getMouseOffsetViewport(u,a),this._draggingMouseOffset.isOutsideViewport))return this.handleDragOutsideViewport();this.stopIntervalTimer(),this.handleDragTo(u,a)}handleDragOutsideViewport(){if(this._xDelayForNextCell=this.addonOptions.maxIntervalToShowNextCell-Math.abs(this._draggingMouseOffset.offset.x)*this.addonOptions.accelerateInterval,this._yDelayForNextCell=this.addonOptions.maxIntervalToShowNextCell-Math.abs(this._draggingMouseOffset.offset.y)*this.addonOptions.accelerateInterval,!this._autoScrollTimerId){let e=0,a=0;this._autoScrollTimerId=setInterval(()=>{let u=!1,i=!1;this._draggingMouseOffset.offset.x?(e+=this.addonOptions.minIntervalToShowNextCell,u=e>=this._xDelayForNextCell):e=0,this._draggingMouseOffset.offset.y?(a+=this.addonOptions.minIntervalToShowNextCell,i=a>=this._yDelayForNextCell):a=0,(u||i)&&(u&&(e=0),i&&(a=0),this.handleDragToNewPosition(u,i))},this.addonOptions.minIntervalToShowNextCell)}}handleDragToNewPosition(e,a){let u=this._draggingMouseOffset.e.pageX,i=this._draggingMouseOffset.e.pageY;const r=this._draggingMouseOffset.offset.x,o=this._draggingMouseOffset.offset.y,d=this._draggingMouseOffset.viewport.offset;e&&r&&(u=r>0?d.right+this._moveDistanceForOneCell.x:d.left-this._moveDistanceForOneCell.x),a&&o&&(i=o>0?d.top-this._moveDistanceForOneCell.y:d.bottom+this._moveDistanceForOneCell.y),this.handleDragTo({pageX:u,pageY:i},this._draggingMouseOffset.dd)}handleDragTo(e,a){const u=e?.touches?.[0]??e,i=this._grid.getCellFromPoint(u.pageX-Lu(this._activeCanvas).left+this._columnOffset,u.pageY-Lu(this._activeCanvas).top+this._rowOffset);if(void 0!==i){if(this._gridOptions.frozenColumn>=0&&(!this._isRightCanvas&&i.cell>this._gridOptions.frozenColumn||this._isRightCanvas&&i.cell<=this._gridOptions.frozenColumn)||this._gridOptions.frozenRow>=0&&(!this._isBottomCanvas&&i.row>=this._gridOptions.frozenRow||this._isBottomCanvas&&i.rowo.right||r.topo.bottom)&&this._grid.scrollCellIntoView(i.row,i.cell)}}if(!this._grid.canCellBeSelected(i.row,i.cell))return;if(a?.range){a.range.end=i;const r=new il(a.range.start.row??0,a.range.start.cell??0,i.row,i.cell);this._decorator.show(r),this.onCellRangeSelecting.notify({range:r})}}}handleDragEnd(e,a){this._decorator.hide(),this._dragging&&(this._dragging=!1,e.stopImmediatePropagation(),this.stopIntervalTimer(),this.onCellRangeSelected.notify({range:new il(a.range.start.row??0,a.range.start.cell??0,a.range.end.row,a.range.end.cell)}))}handleDragInit(e){this._activeCanvas=this._grid.getActiveCanvasNode(e),this._activeViewport=this._grid.getActiveViewportNode(e);const a=this._grid.getDisplayedScrollbarDimensions();if(this._viewportWidth=this._activeViewport.offsetWidth-a.width,this._viewportHeight=this._activeViewport.offsetHeight-a.height,this._moveDistanceForOneCell={x:this._grid.getAbsoluteColumnMinWidth()/2,y:this._gridOptions.rowHeight/2},this._rowOffset=0,this._columnOffset=0,this._isBottomCanvas=this._activeCanvas.classList.contains("grid-canvas-bottom"),this._gridOptions.frozenRow>-1&&this._isBottomCanvas){const r=`${this.gridUidSelector} .grid-canvas-${this._gridOptions.frozenBottom?"bottom":"top"}`;this._rowOffset=document.querySelector(r)?.clientHeight??0}this._isRightCanvas=this._activeCanvas.classList.contains("grid-canvas-right"),this._gridOptions.frozenColumn>-1&&this._isRightCanvas&&(this._columnOffset=document.querySelector(`${this.gridUidSelector} .grid-canvas-left`)?.clientWidth??0);const u=this._grid.getCellFromEvent(e),i=this._grid.getActiveCell();(!this._grid.getEditorLock().isActive()||!i||!u||i.row!==u.row||i.cell!==u.cell)&&(e.stopImmediatePropagation(),e.preventDefault())}handleDragStart(e,a){const u=this._grid.getCellFromEvent(e);if(u&&!1!==this.onBeforeCellRangeSelected.notify(u).getReturnValue()&&this._grid.canCellBeSelected(u.row,u.cell)&&(this._dragging=!0,e.stopImmediatePropagation()),!this._dragging)return;this._grid.focus();const i=Lu(this._canvas);let r=a.startX-i.left;this._gridOptions.frozenColumn>=0&&this._isRightCanvas&&(r+=this._scrollLeft);let o=a.startY-i.top;this._gridOptions.frozenRow>=0&&this._isBottomCanvas&&(o+=this._scrollTop);const d=this._grid.getCellFromPoint(r,o);return a.range={start:d,end:{}},this._currentlySelectedRange=a.range,this._decorator.show(new il(d.row,d.cell))}handleScroll(e,a){this._scrollTop=a.scrollTop,this._scrollLeft=a.scrollLeft}}class bhe{constructor(e){this.pluginName="CellSelectionModel",this._cachedPageRowCount=0,this._prevKeyDown="",this._ranges=[],this._defaults={selectActiveCell:!0},this.onSelectedRangesChanged=new be("onSelectedRangesChanged"),this._eventHandler=new Ut,this._selector=void 0===e||void 0===e.cellRangeSelector?new FW({selectionCss:{border:"2px solid black"}}):this._selector=e.cellRangeSelector,this._addonOptions=e}get addonOptions(){return this._addonOptions}get cellRangeSelector(){return this._selector}get eventHandler(){return this._eventHandler}init(e){this._grid=e,e.hasDataView()&&(this._dataView=e.getData()),this._addonOptions={...this._defaults,...this._addonOptions};const a=e.getPubSubService();a&&this.onSelectedRangesChanged.setPubSubService(a),this._eventHandler.subscribe(this._grid.onActiveCellChanged,this.handleActiveCellChange.bind(this)).subscribe(this._grid.onKeyDown,this.handleKeyDown.bind(this)).subscribe(this._selector.onBeforeCellRangeSelected,this.handleBeforeCellRangeSelected.bind(this)).subscribe(this._selector.onCellRangeSelected,this.handleCellRangeSelected.bind(this)),e.registerPlugin(this._selector)}destroy(){this.dispose()}dispose(){this._selector&&(this._selector.onBeforeCellRangeSelected.unsubscribe(this.handleBeforeCellRangeSelected.bind(this)),this._selector.onCellRangeSelected.unsubscribe(this.handleCellRangeSelected.bind(this))),this._eventHandler.unsubscribeAll(),this._grid?.unregisterPlugin(this._selector),this._selector?.dispose()}getSelectedRanges(){return this._ranges}rangesAreEqual(e,a){let u=e.length!==a.length;if(!u)for(let i=0;ia===e)}handleKeyDown(e){let a,u;const i=this._grid.getColumns().length,r=this._grid.getActiveCell();let o=0;if(o=this._dataView&&"getPagingInfo"in this._dataView?this._dataView?.getPagingInfo().pageSize||this._dataView.getLength():this._grid.getDataLength(),r&&(e.shiftKey||e.ctrlKey)&&!e.altKey&&this.isKeyAllowed(e.key)&&(a=this.getSelectedRanges().slice(),a.length||a.push(new il(r.row,r.cell)),u=a.pop(),"function"==typeof u?.contains)){u.contains(r.row,r.cell)||(u=new il(r.row,r.cell));let d=u.toRow-u.fromRow,h=u.toCell-u.fromCell;const m=r.row===u.fromRow?1:-1,g=r.cell===u.fromCell?1:-1,v=e.key.startsWith("Arrow");let k,x=0;v&&!e.ctrlKey?("ArrowLeft"===e.key?h-=g:"ArrowRight"===e.key?h+=g:"ArrowUp"===e.key?d-=m:"ArrowDown"===e.key&&(d+=m),x=r.row+m*d):(this._cachedPageRowCount<1&&(this._cachedPageRowCount=this._grid.getViewportRowCount()),void 0===this._prevSelectedRow&&(this._prevSelectedRow=r.row),e.shiftKey&&!e.ctrlKey&&"Home"===e.key?(k=0,x=r.row):e.shiftKey&&!e.ctrlKey&&"End"===e.key?(k=i-1,x=r.row):e.ctrlKey&&e.shiftKey&&"Home"===e.key?(k=0,x=0):e.ctrlKey&&e.shiftKey&&"End"===e.key?(k=i-1,x=o-1):"PageUp"===e.key?(this._prevSelectedRow>=0&&(x=this._prevSelectedRow-this._cachedPageRowCount),x<0&&(x=0)):"PageDown"===e.key&&(this._prevSelectedRow<=o-1&&(x=this._prevSelectedRow+this._cachedPageRowCount),x>o-1&&(x=o-1)),this._prevSelectedRow=x),k??=r.cell+g*h;const D=new il(r.row,r.cell,x,k);if(this.removeInvalidRanges([D]).length){a.push(D);const C=m>0?D.toRow:D.fromRow,F=g>0?D.toCell:D.fromCell;v?(this._grid.scrollRowIntoView(C),this._grid.scrollCellIntoView(C,F,!1)):(this._grid.scrollRowIntoView(x),this._grid.scrollCellIntoView(x,F,!1))}else a.push(u);this.setSelectedRanges(a),e.preventDefault(),e.stopPropagation(),this._prevKeyDown=e.key}}}class D7{constructor(e){this.pluginName="RowSelectionModel",this._inHandler=!1,this._ranges=[],this._defaults={autoScrollWhenDrag:!0,cellRangeSelector:void 0,dragToSelect:!1,selectActiveRow:!0},this.onSelectedRangesChanged=new be("onSelectedRangesChanged"),this._eventHandler=new Ut,this._options={...this._defaults,...e}}get addonOptions(){return this._options}get eventHandler(){return this._eventHandler}get gridOptions(){return this._grid?.getOptions()}init(e){this._grid=e,this._options={...this._defaults,...this._options},this._selector=this.addonOptions.cellRangeSelector;const a=e.getPubSubService();a&&this.onSelectedRangesChanged.setPubSubService(a),!this._selector&&this._options.dragToSelect&&(this._selector=new FW({selectionCss:{border:"none"},autoScroll:this._options.autoScrollWhenDrag}),this.addonOptions.cellRangeSelector=this._selector),this._eventHandler.subscribe(this._grid.onActiveCellChanged,this.handleActiveCellChange.bind(this)).subscribe(this._grid.onClick,this.handleClick.bind(this)).subscribe(this._grid.onKeyDown,this.handleKeyDown.bind(this)),this._selector&&(this._grid.registerPlugin(this._selector),this._selector.onCellRangeSelecting.subscribe(this.handleCellRangeSelected.bind(this)),this._selector.onCellRangeSelected.subscribe(this.handleCellRangeSelected.bind(this)),this._selector.onBeforeCellRangeSelected.subscribe(this.handleBeforeCellRangeSelected.bind(this)))}destroy(){this.dispose()}dispose(){this._eventHandler.unsubscribeAll(),this.disposeSelector()}disposeSelector(){this._selector&&(this._selector.onCellRangeSelecting.unsubscribe(this.handleCellRangeSelected.bind(this)),this._selector.onCellRangeSelected.unsubscribe(this.handleCellRangeSelected.bind(this)),this._selector.onBeforeCellRangeSelected.unsubscribe(this.handleBeforeCellRangeSelected.bind(this)),this._grid.unregisterPlugin(this._selector),this._selector?.destroy(),this._selector?.dispose())}getCellRangeSelector(){return this._selector}getSelectedRanges(){return this._ranges}getSelectedRows(){return this.rangesToRows(this._ranges)}refreshSelections(){this.setSelectedRows(this.getSelectedRows())}setSelectedRows(e){this.setSelectedRanges(this.rowsToRanges(e),"SlickRowSelectionModel.setSelectedRows")}setSelectedRanges(e,a="SlickRowSelectionModel.setSelectedRanges"){if(!(this._ranges&&0!==this._ranges.length||e&&0!==e.length))return;this._ranges=e;const u=new Wt(new CustomEvent("click",{detail:{caller:a}}),this._ranges);this.onSelectedRangesChanged.notify(this._ranges,u)}getRowsRange(e,a){let u;const i=[];for(u=e;u<=a;u++)i.push(u);for(u=a;uo!==a.row),this._grid.setActiveCell(a.row,a.cell);else if(u.length&&e.shiftKey){const o=u.pop(),d=Math.min(a.row,o),h=Math.max(a.row,o);u=[];for(let m=d;m<=h;m++)m!==o&&u.push(m);u.push(o),this._grid.setActiveCell(a.row,a.cell)}const r=this.rowsToRanges(u);return this.setSelectedRanges(r),e.stopImmediatePropagation(),!0}handleKeyDown(e){const a=this._grid.getActiveCell();if(this.gridOptions.multiSelect&&a&&e.shiftKey&&!e.ctrlKey&&!e.altKey&&!e.metaKey&&("ArrowUp"===e.key||"ArrowDown"===e.key)){let u=this.getSelectedRows();u.sort((d,h)=>d-h),u.length||(u=[a.row]);let i,r=u[0],o=u[u.length-1];if(i="ArrowDown"===e.key?a.row=0&&ia.push(new il(i,0,i,u))),a}}const AW="mdi-icon-check",wW="mdi-icon-uncheck";class BW{constructor(e,a){this.pubSubService=e,this.pluginName="CheckboxSelectColumn",this._defaults={columnId:"_checkbox_selector",cssClass:null,field:"_checkbox_selector",hideSelectAllCheckbox:!1,name:"",toolTip:"Select/Deselect All",width:30,reorderable:!1,applySelectOnAllPages:!0,hideInColumnTitleRow:!1,hideInFilterHeaderRow:!0},this._addonOptions=this._defaults,this._checkboxColumnCellIndex=null,this._isSelectAllChecked=!1,this._isUsingDataView=!1,this._selectedRowsLookup={},this._selectAll_UID=this.createUID(),this._bindEventService=new Ni,this._eventHandler=new Ut,this._addonOptions={...this._defaults,...a}}get addonOptions(){return this._addonOptions}get headerRowNode(){return this._headerRowNode}get gridOptions(){return this._grid?.getOptions()??{}}get selectAllUid(){return this._selectAll_UID}set selectedRowsLookup(e){this._selectedRowsLookup=e}init(e){this._grid=e,this._isUsingDataView=!Array.isArray(e.getData()),this._isUsingDataView&&(this._dataView=e.getData()),this.gridOptions.backendServiceApi&&(this._addonOptions.applySelectOnAllPages=!1),this._eventHandler.subscribe(e.onSelectedRowsChanged,this.handleSelectedRowsChanged.bind(this)).subscribe(e.onClick,this.handleClick.bind(this)).subscribe(e.onKeyDown,this.handleKeyDown.bind(this)),this._isUsingDataView&&this._dataView&&(this._eventHandler.subscribe(e.onAfterSetColumns,this.handleDataViewSelectedIdsChanged.bind(this)),this._addonOptions.applySelectOnAllPages&&this._eventHandler.subscribe(this._dataView.onSelectedRowIdsChanged,this.handleDataViewSelectedIdsChanged.bind(this)).subscribe(this._dataView.onPagingInfoChanged,this.handleDataViewSelectedIdsChanged.bind(this))),this._addonOptions.hideInFilterHeaderRow||this.addCheckboxToFilterHeaderRow(e),this._addonOptions.hideInColumnTitleRow||this._eventHandler.subscribe(this._grid.onHeaderClick,this.handleHeaderClick.bind(this)),(!this._rowSelectionModel||!this._grid.getSelectionModel())&&(this._rowSelectionModel=new D7(this.gridOptions.rowSelectionOptions),this._grid.setSelectionModel(this._rowSelectionModel)),this.gridOptions.preselectedRows&&this._rowSelectionModel&&this._grid.getSelectionModel()&&setTimeout(()=>this.selectRows(this.gridOptions.preselectedRows||[])),"function"==typeof this._addonOptions.selectableOverride&&this.selectableOverride(this._addonOptions.selectableOverride)}dispose(){this._bindEventService.unbindAll(),this._eventHandler.unsubscribeAll()}create(e,a){if(this._addonOptions={...this._defaults,...a.checkboxSelector},Array.isArray(e)&&a){const u=this.getColumnDefinition();if(!e.some(i=>i.id===u.id)){const i=a?.checkboxSelector?.columnIndexPosition??0;i>0?e.splice(i,0,u):e.unshift(u),this.pubSubService.publish("onPluginColumnsChanged",{columns:e,pluginName:this.pluginName})}}return this}getOptions(){return this._addonOptions}setOptions(e){if(this._addonOptions={...this._addonOptions,...e},this._addonOptions.hideSelectAllCheckbox)this.hideSelectAllFromColumnHeaderTitleRow(),this.hideSelectAllFromColumnHeaderFilterRow();else if(this._addonOptions.hideInColumnTitleRow?(this.hideSelectAllFromColumnHeaderTitleRow(),this._addonOptions.name&&this._grid.updateColumnHeader(this._addonOptions.columnId||"",this._addonOptions.name,"")):(this.renderSelectAllCheckbox(this._isSelectAllChecked),this._eventHandler.subscribe(this._grid.onHeaderClick,this.handleHeaderClick.bind(this))),this._addonOptions.hideInFilterHeaderRow)this.hideSelectAllFromColumnHeaderFilterRow();else{const a=this.headerRowNode?.querySelector("#filter-checkbox-selectall-container");if(a){a.style.display="flex",a.ariaChecked=String(this._isSelectAllChecked);const u=a.querySelector('input[type="checkbox"]');u&&(u.ariaChecked=String(this._isSelectAllChecked),u.checked=this._isSelectAllChecked)}}}deSelectRows(e){const a=[];for(const u of e)this._selectedRowsLookup[u]&&(a[a.length]=u);this._grid.setSelectedRows(this._grid.getSelectedRows().filter(u=>a.indexOf(u)<0),"SlickCheckboxSelectColumn.deSelectRows")}selectRows(e){const a=[];for(const i of e)this._selectedRowsLookup[i]&&(a[a.length]=i);const u=this._grid.getSelectedRows()?.concat(a);this._grid.setSelectedRows(u)}createCheckboxElement(e,a=!1){const u=this.gridOptions?.preventDocumentFragmentUsage?document.createElement("span"):new DocumentFragment,i=T("label",{className:"checkbox-selector-label",htmlFor:e}),r=T("div",{className:"icon-checkbox-container"});return r.appendChild(T("input",{id:e,type:"checkbox",checked:a,ariaChecked:String(a)})),r.appendChild(T("div",{className:`mdi ${a?AW:wW}`})),i.appendChild(r),u.appendChild(i),u}getColumnDefinition(){const e=String(this._addonOptions?.columnId??this._defaults.columnId);return{id:e,name:this._addonOptions.hideSelectAllCheckbox||this._addonOptions.hideInColumnTitleRow?this._addonOptions.name||"":this.createCheckboxElement(`header-selector${this._selectAll_UID}`),toolTip:this._addonOptions.hideSelectAllCheckbox||this._addonOptions.hideInColumnTitleRow?"":this._addonOptions.toolTip,field:e,cssClass:this._addonOptions.cssClass,excludeFromExport:!0,excludeFromColumnPicker:!0,excludeFromGridMenu:!0,excludeFromQuery:!0,excludeFromHeaderMenu:!0,hideSelectAllCheckbox:this._addonOptions.hideSelectAllCheckbox,resizable:!1,reorderable:this._addonOptions.reorderable,sortable:!1,width:this._addonOptions.width||30,maxWidth:this._addonOptions.width||30,formatter:this.checkboxSelectionFormatter.bind(this)}}hideSelectAllFromColumnHeaderTitleRow(){this._grid.updateColumnHeader(this._addonOptions.columnId||"",this._addonOptions.name||"","")}hideSelectAllFromColumnHeaderFilterRow(){const e=this.headerRowNode?.querySelector("#filter-checkbox-selectall-container");e&&(e.style.display="none")}toggleRowSelection(e){this.toggleRowSelectionWithEvent(null,e)}toggleRowSelectionWithEvent(e,a){const u=this._grid.getDataItem(a);if(!this.checkSelectableOverride(a,u,this._grid))return;const i=this._grid.getSelectedRows();"function"==typeof this._addonOptions.onRowToggleStart&&this._addonOptions.onRowToggleStart(e,{row:a,previousSelectedRows:i});const r=this._selectedRowsLookup[a]?this._grid.getSelectedRows().filter(o=>o!==a):this._grid.getSelectedRows().concat(a);this._grid.setSelectedRows(r,"click.toggle"),this._grid.setActiveCell(a,this.getCheckboxColumnCellIndex()),this._addonOptions.onRowToggleEnd&&this._addonOptions.onRowToggleEnd(e,{row:a,previousSelectedRows:i})}selectableOverride(e){this._selectableOverride=e}addCheckboxToFilterHeaderRow(e){this._eventHandler.subscribe(e.onHeaderRowCellRendered,(a,u)=>{if(u.column.field===(this._addonOptions.field||"_checkbox_selector")){_t(u.node);const i=`header-filter-selector${this._selectAll_UID}`,r=T("label",{id:"filter-checkbox-selectall-container",htmlFor:i}),o=T("div",{className:"icon-checkbox-container"});o.appendChild(T("input",{id:i,type:"checkbox",ariaChecked:"false"})),o.appendChild(T("div",{className:"mdi mdi-icon-uncheck"})),r.appendChild(o),u.node.appendChild(r),this._headerRowNode=u.node,this._headerRowNode.classList.add("checkbox-header"),this._bindEventService.bind(r,"click",d=>this.handleHeaderClick(d,u))}})}checkboxSelectionFormatter(e,a,u,i,r,o){if(r&&this.checkSelectableOverride(e,r,o)){const d=this.createUID()+e;return this.createCheckboxElement(`selector${d}`,!!this._selectedRowsLookup[e])}return null}checkSelectableOverride(e,a,u){return"function"!=typeof this._selectableOverride||this._selectableOverride(e,a,u)}createUID(){return Math.round(1e7*Math.random())}getCheckboxColumnCellIndex(){if(null===this._checkboxColumnCellIndex){this._checkboxColumnCellIndex=0;const e=this._grid.getColumns();for(let a=0;a0)for(let i=0;im[o]===d)>=0&&!this.checkSelectableOverride(i,r,this._grid)&&u++}if(this._isSelectAllChecked=e.length+u>=a.length,!this._addonOptions.hideInColumnTitleRow&&!this._addonOptions.hideSelectAllCheckbox&&this.renderSelectAllCheckbox(this._isSelectAllChecked),!this._addonOptions.hideInFilterHeaderRow){const i=this.headerRowNode?.querySelector(`#header-filter-selector${this._selectAll_UID}`),r=this.headerRowNode?.querySelector(".icon-checkbox-container .mdi");i&&(i.ariaChecked=String(this._isSelectAllChecked),i.checked=this._isSelectAllChecked),r&&(r.className=`mdi ${this._isSelectAllChecked?AW:wW}`)}}handleClick(e,a){if(this._grid.getColumns()[a.cell].id===this._addonOptions.columnId&&"checkbox"===e.target.type){if(e.target.ariaChecked=String(e.target.checked),this._grid.getEditorLock().isActive()&&!this._grid.getEditorLock().commitCurrentEdit())return e.preventDefault(),void e.stopImmediatePropagation();this.toggleRowSelectionWithEvent(e,a.row),e.stopPropagation(),e.stopImmediatePropagation()}}handleHeaderClick(e,a){if(a.column.id===this._addonOptions.columnId&&"checkbox"===e.target.type){if(e.target.ariaChecked=String(e.target.checked),this._grid.getEditorLock().isActive()&&!this._grid.getEditorLock().commitCurrentEdit())return e.preventDefault(),void e.stopImmediatePropagation();let u=e.target.checked;const i=u?"click.selectAll":"click.unselectAll",r=this._grid.getSelectedRows();this._addonOptions.onSelectAllToggleStart&&this._addonOptions.onSelectAllToggleStart(e,{previousSelectedRows:r,caller:i});let o=[];if(u){const d=[];for(let h=0;h{void 0!==h&&this._grid.invalidateRow(+h)}),this._selectedRowsLookup=a,this._grid.render(),this._isSelectAllChecked=(e?.length??0)+o>=this._grid.getDataLength(),!(this._isUsingDataView&&this._addonOptions.applySelectOnAllPages||(!this._addonOptions.hideInColumnTitleRow&&!this._addonOptions.hideSelectAllCheckbox&&this.renderSelectAllCheckbox(this._isSelectAllChecked),this._addonOptions.hideInFilterHeaderRow))){const h=this.headerRowNode?.querySelector(`#header-filter-selector${this._selectAll_UID}`);h&&(h.ariaChecked=String(this._isSelectAllChecked),h.checked=this._isSelectAllChecked)}if(d.length>0){for(const h of d){const m=e.indexOf(h);e.splice(m,1)}this._grid.setSelectedRows(e,"click.toggle")}}renderSelectAllCheckbox(e){this._grid.updateColumnHeader(this._addonOptions.columnId||"",this.createCheckboxElement(`header-selector${this._selectAll_UID}`,!!e),this._addonOptions.toolTip)?.classList.add("header-checkbox-selectall")}}class SW extends f7{constructor(e,a,u,i,r){super(e,u,i),this.extensionUtility=e,this.filterService=a,this.pubSubService=u,this.sharedService=i,this.sortService=r,this._areVisibleColumnDifferent=!1,this._columns=[],this._columnCheckboxes=[],this._commandMenuElm=null,this._headerElm=null,this._isMenuOpen=!1,this._subMenuParentId="",this._defaults={dropSide:"left",showButton:!0,hideForceFitButton:!1,hideSyncResizeButton:!1,forceFitTitle:"Force fit columns",marginBottom:15,menuWidth:18,minHeight:250,contentMinWidth:0,resizeOnShowHeaderRow:!1,syncResizeTitle:"Synchronous resize",subMenuOpenByEvent:"mouseover",headerColumnValueExtractor:o=>ui(o.columnPickerLabel||o.name||"","innerHTML")},this._menuCssPrefix="slick-menu",this._menuPluginCssPrefix="slick-grid-menu",this._camelPluginName="gridMenu",this._columns=this.sharedService.allColumns??[],this._gridUid=this.grid?.getUID()??"",this.onAfterMenuShow=new be("onAfterMenuShow"),this.onBeforeMenuShow=new be("onBeforeMenuShow"),this.onMenuClose=new be("onMenuClose"),this.onCommand=new be("onCommand"),this.onColumnsChanged=new be("onColumnsChanged"),this.initEventHandlers(),this.init()}get addonOptions(){return this._addonOptions||{}}get columns(){return this._columns}set columns(e){this._columns=e}get gridOptions(){return this.grid?.getOptions()||{}}get gridUidSelector(){return this.gridUid?`.${this.gridUid}`:""}initEventHandlers(){this._eventHandler.subscribe(this.grid.onColumnsReordered,C7.bind(this)),this._eventHandler.subscribe(this.grid.onClick,e=>this.hideMenu(e)),this._eventHandler.subscribe(this.grid.onBeforeDestroy,this.dispose.bind(this)),this._eventHandler.subscribe(this.grid.onSetOptions,(e,a)=>{if(a&&a.optionsBefore&&a.optionsAfter){const u=a.optionsBefore.frozenColumn>=0&&-1===a.optionsAfter.frozenColumn,i=-1===a.optionsBefore.frozenColumn&&a.optionsAfter.frozenColumn>=0;(u||i)&&this.recreateGridMenu()}})}init(){this._gridUid=this.grid.getUID()??"",W.addSlickEventPubSubWhenDefined(this.pubSubService,this),this._userOriginalGridMenu={...this.sharedService.gridOptions.gridMenu},this._addonOptions={...this._defaults,...this.getDefaultGridMenuOptions(),...this.sharedService.gridOptions.gridMenu},this.sharedService.gridOptions.gridMenu=this._addonOptions;const e=this._userOriginalGridMenu.commandItems,a=this._userOriginalGridMenu&&Array.isArray(e)?e:[];this._addonOptions.commandItems=[...a,...this.addGridMenuCustomCommands(a)],this.extensionUtility.translateMenuItemsFromTitleKey(this._addonOptions.commandItems||[],"commandItems"),this.extensionUtility.sortItems(this._addonOptions.commandItems,"positionOrder"),this.createGridMenu()}dispose(){this.deleteMenu(),super.dispose()}deleteMenu(){this._bindEventService.unbindAll(),this._menuElm?.remove(),this._menuElm=null,this._gridMenuButtonElm?.remove(),this._headerElm&&(this._headerElm.style.width="100%")}createColumnPickerContainer(){this._menuElm&&(TW.call(this,this._menuElm),this._listElm=T("div",{className:"slick-column-picker-list",role:"menu"}),this._bindEventService.bind(this._menuElm,"click",PW.bind(this),void 0,"parent-menu"))}createGridMenu(){const e=this._gridUid?`.${this._gridUid}`:"",a=this._addonOptions?.menuWidth||this._defaults.menuWidth,u=this.gridOptions.hasOwnProperty("frozenColumn")&&this.gridOptions.frozenColumn>=0?"right":"left",i=this.grid.getContainerNode();if(this._headerElm=i.querySelector(`.slick-header-${u}`),this._headerElm&&this._addonOptions){if(this._headerElm.style.width=`calc(100% - ${a}px)`,(this._addonOptions.resizeOnShowHeaderRow??this._defaults.resizeOnShowHeaderRow)&&this.gridOptions.showHeaderRow){const d=i.querySelector(`${e} .slick-headerrow`);d&&(d.style.width=`calc(100% - ${a}px)`)}if(this._addonOptions.showButton??this._defaults.showButton){this._gridMenuButtonElm=T("button",{className:"slick-grid-menu-button",ariaLabel:"Grid Menu"}),this._addonOptions?.iconCssClass&&this._gridMenuButtonElm.classList.add(...Kt(this._addonOptions.iconCssClass));const d="preheader"===this._addonOptions.iconButtonContainer?"firstChild":"lastChild";this._headerElm.parentElement.insertBefore(this._gridMenuButtonElm,this._headerElm.parentElement[d]),this._bindEventService.bind(this._gridMenuButtonElm,"click",this.showGridMenu.bind(this))}this.sharedService.gridOptions.gridMenu={...this._defaults,...this._addonOptions},this.translateTitleLabels(this._addonOptions),this.translateTitleLabels(this.sharedService.gridOptions.gridMenu),this._bindEventService.bind(document.body,"mousedown",this.handleBodyMouseDown.bind(this)),this._bindEventService.bind(document.body,"beforeunload",this.dispose.bind(this))}}createCommandMenu(e,a=0,u){const i=u?.command;let r=1===a&&i?i.replace(/\s/g,""):"";r&&(this._subMenuParentId=r),a>1&&(r=this._subMenuParentId);const o=`${this.menuCssClass} slick-menu-level-${a} ${this._gridUid}`,d=document.body.querySelector(`.${this.menuCssClass}.slick-menu-level-${a}${this.gridUidSelector}`);if(d){if(d.dataset.subMenuParent===r)return d;this.disposeSubMenus()}const h=T("div",{role:"menu",className:o,ariaLabel:a>1?"SubMenu":"Grid Menu"});a>0&&(h.classList.add("slick-submenu"),r&&(h.dataset.subMenuParent=r));const m={grid:this.grid,menu:this._menuElm,columns:this.columns,allColumns:this.getAllColumns(),visibleColumns:this.getVisibleColumns(),level:a};return this._commandMenuElm=this.recreateCommandList(e,h,m,u),a++,h}getAllColumns(){return this._columns}getVisibleColumns(){return this.grid.getColumns()}hideMenu(e){const a={grid:this.grid,menu:this._menuElm,allColumns:this.columns,visibleColumns:this.getVisibleColumns()};if(this.pubSubService.publish("onGridMenuMenuClose",a),("function"!=typeof this._addonOptions?.onMenuClose||!1!==this._addonOptions.onMenuClose(e,a))&&!1!==this.onMenuClose.notify(a,null,this).getReturnValue()){if(this._isMenuOpen=!1,"function"==typeof this.grid?.autosizeColumns){const u=this.grid.getUID()||"";this._areVisibleColumnDifferent&&u&&null!==document.querySelector(`.${u}`)&&(this.gridOptions.enableAutoSizeColumns&&this.grid.autosizeColumns(),this._areVisibleColumnDifferent=!1)}this.disposeSubMenus(),this._menuElm?.remove(),this._menuElm=null}}recreateGridMenu(){this.deleteMenu(),this.init()}repositionMenu(e,a,u,i){const r=e?.touches?.[0]??e,o=a.classList.contains("slick-submenu"),d=o?e.target.closest(".slick-menu-item"):r.target;if(d){const h=u||this._gridMenuButtonElm,m=Lu(u),g=Lu(d),v=i??this._addonOptions,k=getComputedStyle(h),x=parseInt(k?.width??this._defaults?.menuWidth,10),D=a?.offsetWidth??0,C=v?.contentMinWidth??this._defaults.contentMinWidth??0,F=(C>D?C:D)||0,A=m.top,z=m.right;let M,L;if(o?(L=g.top,M=g.left):(L=A+h.offsetHeight,M="right"===v?.dropSide?z-x:z-F),o){const re=a?.clientHeight||0,{bottom:He,top:Ve}=V2(d);"top"==(HeHe?"top":"bottom")?(a.classList.remove("dropdown"),a.classList.add("dropup"),L-=re-d.clientHeight):(a.classList.remove("dropup"),a.classList.add("dropdown"))}const R=this.grid.getGridPosition();let G=M+Number(D);o&&(G+=d.clientWidth);const $=document.documentElement.clientWidth;"left"==(G>=R.width||G>=$?"left":"right")||!o&&"left"===v?.dropSide?(a.classList.remove("dropright"),a.classList.add("dropleft"),o&&(M-=Number(D))):(a.classList.remove("dropleft"),a.classList.add("dropright"),o&&(M+=d.offsetWidth)),a.style.top=`${L}px`,a.style.left=`${M}px`,C>0&&(a.style.minWidth=`${C}px`),a.style.opacity="1",a.style.display="block"}}openGridMenu(){const e=new MouseEvent("click",{bubbles:!0,cancelable:!0,composed:!1});Object.defineProperty(e,"target",{writable:!0,configurable:!0,value:T("button",{className:"slick-grid-menu-button"})}),this.showGridMenu(e)}showGridMenu(e,a){const u=e?.touches?.[0]??e;if(e.preventDefault(),_t(this._menuElm),this._menuElm?.remove(),this._addonOptions){const i={grid:this.grid,menu:this._menuElm,columns:this.columns,allColumns:this.getAllColumns(),visibleColumns:this.getVisibleColumns()},r={...this._addonOptions,...a};if(r&&!this.extensionUtility.runOverrideFunctionWhenExists(r.menuUsabilityOverride,i)||"function"==typeof e.stopPropagation&&(this.pubSubService.publish("onGridMenuBeforeMenuShow",i),"function"==typeof r?.onBeforeMenuShow&&!1===r.onBeforeMenuShow(e,i)||!1===this.onBeforeMenuShow.notify(i,null,this).getReturnValue()))return;this._menuElm=this.createCommandMenu(this._addonOptions?.commandItems??[]),this.createColumnPickerContainer(),C7.call(this),this._columnCheckboxes=[],IW.call(this,r),document.body.appendChild(this._menuElm),this.gridOptions.darkMode&&this._menuElm.classList.add("slick-dark-mode"),this._menuElm.style.opacity="0";const o=(void 0!==r?.marginBottom?r.marginBottom:this._defaults.marginBottom)||0;this._menuElm.style.minHeight=Mc(r?.minHeight,""),void 0!==r?.height?this._menuElm.style.height=Mc(r.height,""):this._menuElm.style.maxHeight=Mc(r?.maxHeight,window.innerHeight-u.clientY-o+"px");let d="BUTTON"===e.target.nodeName?e.target:e.target.querySelector("button");d||(d=e.target.parentElement),this._menuElm.ariaExpanded="true",this._menuElm.appendChild(this._listElm),this.repositionMenu(e,this._menuElm,d,r),this._isMenuOpen=!0,this.pubSubService.publish("onGridMenuAfterMenuShow",i),"function"==typeof r?.onAfterMenuShow&&r.onAfterMenuShow(e,i),this.onAfterMenuShow.notify(i,null,this)}}translateGridMenu(){if(this.sharedService.gridOptions.gridMenu){this.sharedService.gridOptions.gridMenu.commandItems=[],this.sharedService.gridOptions.gridMenu.commandTitle="",this.sharedService.gridOptions.gridMenu.columnTitle="",this.sharedService.gridOptions.gridMenu.forceFitTitle="",this.sharedService.gridOptions.gridMenu.syncResizeTitle="";const e=this._userOriginalGridMenu&&Array.isArray(this._userOriginalGridMenu.commandItems)?this._userOriginalGridMenu.commandItems:[];this.sharedService.gridOptions.gridMenu.commandItems=[...e,...this.addGridMenuCustomCommands(e)],this.extensionUtility.translateMenuItemsFromTitleKey(this._addonOptions?.commandItems||[],"commandItems"),this.extensionUtility.sortItems(this.sharedService.gridOptions.gridMenu.commandItems,"positionOrder"),this.translateTitleLabels(this.sharedService.gridOptions.gridMenu),this.translateTitleLabels(this._addonOptions),this.extensionUtility.translateItems(this._columns,"nameKey","name")}}translateTitleLabels(e){e&&(e.commandTitle=this.extensionUtility.getPickerTitleOutputString("commandTitle","gridMenu"),e.columnTitle=this.extensionUtility.getPickerTitleOutputString("columnTitle","gridMenu"),e.forceFitTitle=this.extensionUtility.getPickerTitleOutputString("forceFitTitle","gridMenu"),e.syncResizeTitle=this.extensionUtility.getPickerTitleOutputString("syncResizeTitle","gridMenu"))}addGridMenuCustomCommands(e){const a=this.gridOptions.backendServiceApi||null,u=[],r=Gl(this.gridOptions),o=this._addonOptions?.commandLabels;if(this._addonOptions&&this.gridOptions){if(!this._addonOptions.hideClearFrozenColumnsCommand){const h="clear-pinning";e.some(m=>"divider"!==m&&m.hasOwnProperty("command")&&m.command===h)||u.push({iconCssClass:this._addonOptions.iconClearFrozenColumnsCommand||"mdi mdi-pin-off-outline",titleKey:`${r}${o?.clearFrozenColumnsCommandKey??"CLEAR_PINNING"}`,disabled:!1,command:h,positionOrder:52})}if(this.gridOptions.enableFiltering&&!this.sharedService.hideHeaderRowAfterPageLoad){if(!this._addonOptions.hideClearAllFiltersCommand){const h="clear-filter";e.some(m=>"divider"!==m&&m.hasOwnProperty("command")&&m.command===h)||u.push({iconCssClass:this._addonOptions.iconClearAllFiltersCommand||"mdi mdi-filter-remove-outline",titleKey:`${r}${o?.clearAllFiltersCommandKey??"CLEAR_ALL_FILTERS"}`,disabled:!1,command:h,positionOrder:50})}if(!this._addonOptions.hideToggleFilterCommand){const h="toggle-filter";e.some(m=>"divider"!==m&&m.hasOwnProperty("command")&&m.command===h)||u.push({iconCssClass:this._addonOptions.iconToggleFilterCommand||"mdi mdi-flip-vertical",titleKey:`${r}${o?.toggleFilterCommandKey??"TOGGLE_FILTER_ROW"}`,disabled:!1,command:h,positionOrder:53})}if(a&&!this._addonOptions.hideRefreshDatasetCommand){const h="refresh-dataset";e.some(m=>"divider"!==m&&m.hasOwnProperty("command")&&m.command===h)||u.push({iconCssClass:this._addonOptions.iconRefreshDatasetCommand||"mdi mdi-sync",titleKey:`${r}${o?.refreshDatasetCommandKey??"REFRESH_DATASET"}`,disabled:!1,command:h,positionOrder:58})}}if(!this._addonOptions.hideToggleDarkModeCommand){const h="toggle-dark-mode";e.some(m=>"divider"!==m&&m.hasOwnProperty("command")&&m.command===h)||u.push({iconCssClass:this._addonOptions.iconToggleDarkModeCommand||"mdi mdi-brightness-4",titleKey:`${r}${o?.toggleDarkModeCommandKey??"TOGGLE_DARK_MODE"}`,disabled:!1,command:h,positionOrder:54})}if(this.gridOptions.showPreHeaderPanel&&!this._addonOptions.hideTogglePreHeaderCommand){const h="toggle-preheader";e.some(m=>"divider"!==m&&m.hasOwnProperty("command")&&m.command===h)||u.push({iconCssClass:this._addonOptions.iconTogglePreHeaderCommand||"mdi mdi-flip-vertical",titleKey:`${r}${o?.togglePreHeaderCommandKey??"TOGGLE_PRE_HEADER_ROW"}`,disabled:!1,command:h,positionOrder:53})}if(this.gridOptions.enableSorting&&!this._addonOptions.hideClearAllSortingCommand){const h="clear-sorting";e.some(m=>"divider"!==m&&m.hasOwnProperty("command")&&m.command===h)||u.push({iconCssClass:this._addonOptions.iconClearAllSortingCommand||"mdi mdi-sort-variant-off",titleKey:`${r}${o?.clearAllSortingCommandKey??"CLEAR_ALL_SORTING"}`,disabled:!1,command:h,positionOrder:51})}if(this.gridOptions.enableTextExport&&!this._addonOptions.hideExportCsvCommand){const h="export-csv";e.some(m=>"divider"!==m&&m.hasOwnProperty("command")&&m.command===h)||u.push({iconCssClass:this._addonOptions.iconExportCsvCommand||"mdi mdi-download",titleKey:`${r}${o?.exportCsvCommandKey??"EXPORT_TO_CSV"}`,disabled:!1,command:h,positionOrder:55})}if(this.gridOptions.enableExcelExport&&!this._addonOptions.hideExportExcelCommand){const h="export-excel";e.some(m=>"divider"!==m&&m.hasOwnProperty("command")&&m.command===h)||u.push({iconCssClass:this._addonOptions.iconExportExcelCommand||"mdi mdi-file-excel-outline text-success",titleKey:`${r}${o?.exportExcelCommandKey??"EXPORT_TO_EXCEL"}`,disabled:!1,command:h,positionOrder:56})}if(this.gridOptions.enableTextExport&&!this._addonOptions.hideExportTextDelimitedCommand){const h="export-text-delimited";e.some(m=>"divider"!==m&&m.hasOwnProperty("command")&&m.command===h)||u.push({iconCssClass:this._addonOptions.iconExportTextDelimitedCommand||"mdi mdi-download",titleKey:`${r}${o?.exportTextDelimitedCommandKey??"EXPORT_TO_TAB_DELIMITED"}`,disabled:!1,command:h,positionOrder:57})}const d=this._addonOptions?.commandItems||[];(Array.isArray(u)&&u.length>0||Array.isArray(d)&&d.length>0)&&(this._addonOptions.commandTitle=this._addonOptions.commandTitle||this.extensionUtility.getPickerTitleOutputString("commandTitle","gridMenu"))}return u}executeGridMenuInternalCustomCommands(e,a){const u=this.sharedService?.externalRegisteredResources||[];if(a?.command)switch(a.command){case"clear-pinning":const i=[...this.sharedService.visibleColumns],r={frozenColumn:-1,frozenRow:-1,frozenBottom:!1,enableMouseWheelScrollHandler:!1};this.grid.setOptions(r),this.sharedService.gridOptions.frozenColumn=r.frozenColumn,this.sharedService.gridOptions.frozenRow=r.frozenRow,this.sharedService.gridOptions.frozenBottom=r.frozenBottom,this.sharedService.gridOptions.enableMouseWheelScrollHandler=r.enableMouseWheelScrollHandler,Array.isArray(i)&&this.grid.setColumns(i),this.gridOptions.enableAutoSizeColumns&&this.grid.autosizeColumns(),this.pubSubService.publish("onGridMenuClearAllPinning");break;case"clear-filter":this.filterService.clearFilters(),this.sharedService.dataView.refresh(),this.pubSubService.publish("onGridMenuClearAllFilters");break;case"clear-sorting":this.sortService.clearSorting(),this.sharedService.dataView.refresh(),this.pubSubService.publish("onGridMenuClearAllSorting");break;case"export-csv":const d=u.find(x=>"TextExportService"===x.className);d?.exportToFile?d.exportToFile({delimiter:$r.comma,format:yt.csv}):console.error("[Slickgrid-Universal] You must register the TextExportService to properly use Export to File in the Grid Menu. Example:: this.gridOptions = { enableTextExport: true, externalResources: [new TextExportService()] };");break;case"export-excel":const h=u.find(x=>"ExcelExportService"===x.className);h?.exportToExcel?h.exportToExcel():console.error("[Slickgrid-Universal] You must register the ExcelExportService to properly use Export to Excel in the Grid Menu. Example:: this.gridOptions = { enableExcelExport: true, externalResources: [new ExcelExportService()] };");break;case"export-text-delimited":const m=u.find(x=>"TextExportService"===x.className);m?.exportToFile?m.exportToFile({delimiter:$r.tab,format:yt.txt}):console.error("[Slickgrid-Universal] You must register the TextExportService to properly use Export to File in the Grid Menu. Example:: this.gridOptions = { enableTextExport: true, externalResources: [new TextExportService()] };");break;case"toggle-dark-mode":const g=this.sharedService.gridOptions.darkMode;this.grid.setOptions({darkMode:!g}),this.sharedService.gridOptions.darkMode=!g;break;case"toggle-filter":let v=this.gridOptions?.showHeaderRow??!1;v=!v,this.grid.setHeaderRowVisibility(v),!0===v&&(this.grid.setColumns(this.sharedService.columnDefinitions),this.grid.scrollColumnIntoView(0));break;case"toggle-preheader":const k=this.gridOptions?.showPreHeaderPanel??!1;this.grid.setPreHeaderPanelVisibility(!k);break;case"refresh-dataset":this.extensionUtility.refreshBackendDataset()}}getDefaultGridMenuOptions(){return{commandTitle:void 0,columnTitle:this.extensionUtility.getPickerTitleOutputString("columnTitle","gridMenu"),forceFitTitle:this.extensionUtility.getPickerTitleOutputString("forceFitTitle","gridMenu"),syncResizeTitle:this.extensionUtility.getPickerTitleOutputString("syncResizeTitle","gridMenu"),iconCssClass:"mdi mdi-menu",menuWidth:18,commandItems:[],hideClearAllFiltersCommand:!1,hideRefreshDatasetCommand:!1,hideToggleFilterCommand:!1}}handleBodyMouseDown(e){if(this.menuElement){let a=!1;const u=e.target.closest(`.${this.menuCssClass}`);(this.menuElement.contains(e.target)||u)&&(a=!0),(this._isMenuOpen&&this.menuElement!==e.target&&!a&&!e.defaultPrevented||"close"===e.target.className&&u)&&this.hideMenu(e)}}handleMenuItemCommandClick(e,a,u,i=0){if("divider"!==u&&!u.disabled&&!u.divider)if(u.command&&!u.commandItems){const o={grid:this.grid,command:u.command,item:u,allColumns:this.columns,visibleColumns:this.getVisibleColumns()};this.executeGridMenuInternalCustomCommands(e,o),this.pubSubService.publish("onGridMenuCommand",o),"function"==typeof this._addonOptions?.onCommand&&this._addonOptions.onCommand(e,o),this.onCommand.notify(o,null,this),"function"==typeof u.action&&u.action.call(this,e,o),!this._addonOptions?.leaveOpen&&!e.defaultPrevented&&this.hideMenu(e),e.preventDefault(),e.stopPropagation()}else u.commandItems&&this.repositionSubMenu(e,u,i)}handleMenuItemMouseOver(e,a,u,i=0){"divider"!==u&&!u.disabled&&!u.divider&&(u.commandItems?this.repositionSubMenu(e,u,i):0===i&&this.disposeSubMenus())}recreateCommandList(e,a,u,i){const r=u.level||0;if(e.length>0){const o=T("div",{className:`${this._menuCssPrefix}-command-list`,role:"menu"},a);if(0===r){this.populateCommandOrOptionTitle("command",this.addonOptions,o,r);const d=a.querySelector(".slick-command-header")??T("div",{className:"slick-command-header"});d.classList.add("with-close"),LW.call(this,d),o.appendChild(d)}return i&&r>0&&this.addSubMenuTitleWhenExists(i,o),this.populateCommandOrOptionItems("command",this._addonOptions,o,e,u,this.handleMenuItemCommandClick,this.handleMenuItemMouseOver),o}return null}repositionSubMenu(e,a,u){const i=a?.commandItems||[],r=this.createCommandMenu(i,u+1,a);r.style.display="block",document.body.appendChild(r),this.repositionMenu(e,r)}}const zW="mdi-icon-picker-check",MW="mdi-icon-picker-uncheck";function LW(t){const a=T("button",{type:"button",className:"close",ariaLabel:"Close",textContent:"\xd7",dataset:{dismiss:this instanceof rT?"slick-column-picker":"slick-grid-menu"}});t.appendChild(a)}function TW(t){const e=this;e.addonOptions?.columnTitle&&(e._columnTitleElm=T("div",{className:"slick-menu-title",textContent:e.addonOptions?.columnTitle??e._defaults.columnTitle},t))}function PW(t){const e=this,a=e instanceof rT?"columnPicker":"gridMenu",i=t.target?.closest(".icon-checkbox-container")?.querySelector(".mdi"),r=!!t.target.checked;if(t.target.ariaChecked=String(r),NW(i,r),"autoresize"===t.target.dataset.option){const o=e.getVisibleColumns();return e.grid.setOptions({forceFitColumns:r}),void e.grid.setColumns(o)}if("syncresize"!==t.target.dataset.option){if("checkbox"===t.target.type){e._areVisibleColumnDifferent=!0;const o=t.target.dataset.columnid||"",d=[];if(e._columnCheckboxes.forEach((g,v)=>{g.checked&&d.push(e.columns[v])}),!d.length)return t.target.checked=!0,void NW(i,!0);if(e.grid.setColumns(d),(!e.sharedService.visibleColumns||Array.isArray(d)&&d.length!==e.sharedService.visibleColumns.length)&&(e.sharedService.visibleColumns=d),e.gridOptions.enableRowSelection&&r){const g=e.grid.getSelectedRows();e.grid.setSelectedRows(g)}const h=e.gridOptions.frozenColumn??-1;h>=0&&e.extensionUtility.readjustFrozenColumnIndexWhenNeeded(h,e.columns,d);const m={columnId:o,showing:r,allColumns:e.columns,visibleColumns:d,columns:d,grid:e.grid};e.pubSubService.publish(`on${yo(a)}ColumnsChanged`,m),"function"==typeof e.addonOptions?.onColumnsChanged&&e.addonOptions.onColumnsChanged(t,m),e.onColumnsChanged.notify(m,null,e)}}else e.grid.setOptions({syncColumnCellResize:r})}function NW(t,e=!1){t&&(t.className=`mdi ${e?zW:MW}`)}function nT(t,e,a,u=!1){const i=T("label",{className:"checkbox-picker-label",htmlFor:e}),r=T("div",{className:"icon-checkbox-container"}),o=T("input",{id:e,type:"checkbox",dataset:a}),d=T("div",{className:`mdi ${u?zW:MW}`}),h=T("span",{className:"checkbox-label"});return r.appendChild(o),r.appendChild(d),i.appendChild(r),i.appendChild(h),t.appendChild(i),u&&(o.ariaChecked="true",o.checked=!0),{inputElm:o,labelElm:i,labelSpanElm:h}}function IW(t){const e=this,a=e instanceof SW?"gridmenu-":"";for(const u of e.columns){const i=u.id,r=document.createElement("li");u.excludeFromColumnPicker&&(r.className="hidden");const o=`${e._gridUid}-${a}colpicker-${i}`,d=e.grid.getColumnIndex(i)>=0,{inputElm:h,labelElm:m,labelSpanElm:g}=nT(r,o,{columnid:`${i}`},d);e._columnCheckboxes.push(h);const k=("function"==typeof t?.headerColumnValueExtractor?t.headerColumnValueExtractor:e._defaults.headerColumnValueExtractor)(u,e.gridOptions);this.grid.applyHtmlCode(g,k),r.appendChild(m),e._listElm.appendChild(r)}if((!t.hideForceFitButton||!t.hideSyncResizeButton)&&e._listElm.appendChild(document.createElement("hr")),!t?.hideForceFitButton){const u=document.createElement("li"),i=`${e._gridUid}-${a}colpicker-forcefit`,{labelSpanElm:r}=nT(u,i,{option:"autoresize"},e.gridOptions.forceFitColumns);r.textContent=t?.forceFitTitle??"",e._listElm.appendChild(u)}if(!t?.hideSyncResizeButton){const u=document.createElement("li"),i=`${e._gridUid}-${a}colpicker-syncresize`,{labelSpanElm:r}=nT(u,i,{option:"syncresize"},e.gridOptions.forceFitColumns);r.textContent=t?.syncResizeTitle??"",e._listElm.appendChild(u)}}function C7(){const t=this,e=t.grid.getColumns().slice(0),a=new Array(t.columns.length);for(let u=0;uui(i.columnPickerLabel||i.name||"","innerHTML")},this._bindEventService=new Ni,this.onColumnsChanged=new be("onColumnsChanged"),this._eventHandler=new Ut,this._columns=this.sharedService.allColumns??[],this._gridUid=this.grid?.getUID?.()??"",this.init()}get addonOptions(){return this.gridOptions.columnPicker||{}}get eventHandler(){return this._eventHandler}get columns(){return this._columns}set columns(e){this._columns=e}get gridOptions(){return this.sharedService.gridOptions??{}}get grid(){return this.sharedService.slickGrid}get menuElement(){return this._menuElm}init(){this._gridUid=this.grid.getUID()??"",this.gridOptions.columnPicker={...this._defaults,...this.gridOptions.columnPicker},this.onColumnsChanged.setPubSubService(this.pubSubService),this.addonOptions.columnTitle=this.extensionUtility.getPickerTitleOutputString("columnTitle","columnPicker"),this.addonOptions.forceFitTitle=this.extensionUtility.getPickerTitleOutputString("forceFitTitle","columnPicker"),this.addonOptions.syncResizeTitle=this.extensionUtility.getPickerTitleOutputString("syncResizeTitle","columnPicker"),this._eventHandler.subscribe(this.grid.onPreHeaderContextMenu,e=>{["slick-column-name","slick-header-column"].some(a=>e.target?.classList.contains(a))&&this.handleHeaderContextMenu(e)}),this._eventHandler.subscribe(this.grid.onHeaderContextMenu,this.handleHeaderContextMenu.bind(this)),this._eventHandler.subscribe(this.grid.onColumnsReordered,C7.bind(this)),this._eventHandler.subscribe(this.grid.onClick,this.disposeMenu.bind(this)),this._bindEventService.bind(document.body,"mousedown",this.handleBodyMouseDown.bind(this),void 0,"body"),this._bindEventService.bind(document.body,"beforeunload",this.dispose.bind(this),void 0,"body")}dispose(){this._eventHandler.unsubscribeAll(),this._bindEventService.unbindAll(),this.disposeMenu()}disposeMenu(){this._bindEventService.unbindAll("parent-menu"),this._listElm?.remove(),this._menuElm?.remove(),this._menuElm=null}createPickerMenu(){const e=T("div",{ariaExpanded:"true",className:`slick-column-picker ${this._gridUid}`,role:"menu"});return C7.call(this),TW.call(this,e),LW.call(this,e),this._listElm=T("div",{className:"slick-column-picker-list",role:"menu"}),this._bindEventService.bind(e,"click",PW.bind(this),void 0,"parent-menu"),document.body.appendChild(e),e}getAllColumns(){return this._columns}getVisibleColumns(){return this.grid.getColumns()}translateColumnPicker(){this.addonOptions&&(this.addonOptions.columnTitle="",this.addonOptions.forceFitTitle="",this.addonOptions.syncResizeTitle="",this.addonOptions.columnTitle=this.extensionUtility.getPickerTitleOutputString("columnTitle","columnPicker"),this.addonOptions.forceFitTitle=this.extensionUtility.getPickerTitleOutputString("forceFitTitle","columnPicker"),this.addonOptions.syncResizeTitle=this.extensionUtility.getPickerTitleOutputString("syncResizeTitle","columnPicker")),this.extensionUtility.translateItems(this._columns,"nameKey","name"),this.translateTitleLabels(this.addonOptions)}handleBodyMouseDown(e){(this._menuElm!==e.target&&!this._menuElm?.contains(e.target)||"close"===e.target.className&&e.target.closest(".slick-column-picker"))&&this.disposeMenu()}handleHeaderContextMenu(e){e.preventDefault(),_t(this._listElm),this._columnCheckboxes=[],this._menuElm=this.createPickerMenu(),this.gridOptions.darkMode&&this._menuElm.classList.add("slick-dark-mode"),IW.call(this,this.addonOptions),document.body.appendChild(this._menuElm),this.repositionMenu(e)}repositionMenu(e){const a=e?.touches?.[0]??e;this._menuElm&&(this._menuElm.style.top=a.pageY-10+"px",this._menuElm.style.left=a.pageX-10+"px",this._menuElm.style.minHeight=Mc(this.addonOptions.minHeight,""),this._menuElm.style.maxHeight=Mc(this.addonOptions.maxHeight,window.innerHeight-a.clientY+"px"),this._menuElm.style.display="block",this._menuElm.ariaExpanded="true",this._menuElm.appendChild(this._listElm))}translateTitleLabels(e){e&&(e.columnTitle=this.extensionUtility.getPickerTitleOutputString("columnTitle","gridMenu"))}}const y7=(t,e,a,u,i,r)=>{const o=u.params||{};if(!o.formatters||!Array.isArray(o.formatters))throw new Error('[Slickgrid-Universal] The multiple formatter requires the "formatters" to be provided as a column params.\n For example: this.columnDefinitions = [{ id: title, field: title, formatter: Formatters.multiple, params: { formatters: [Formatters.lowercase, Formatters.uppercase] }');const d=o.formatters;let h=a;return d.forEach((m,g)=>{if("function"!=typeof m)throw new Error(`[Slickgrid-Universal] the "params.formatters" at index(${g}) to be used by "Formatters.multiple" is invalid, please verify all formatter functions.`);h=m.call(void 0,t,e,h,u,i,r)}),h};function ju(t,e,a,u){let i,r,o="",d="";switch(a){case"currency":i=ue.DEFAULT_FORMATTER_CURRENCY_MIN_DECIMAL,r=ue.DEFAULT_FORMATTER_CURRENCY_MAX_DECIMAL;break;case"decimal":i=ue.DEFAULT_FORMATTER_NUMBER_MIN_DECIMAL,r=ue.DEFAULT_FORMATTER_NUMBER_MAX_DECIMAL;break;case"percent":i=ue.DEFAULT_FORMATTER_PERCENT_MIN_DECIMAL,r=ue.DEFAULT_FORMATTER_PERCENT_MAX_DECIMAL}const h=e&&"function"==typeof e.getOptions?e.getOptions():{},m=nd("minDecimal",t,h,i),g=nd("maxDecimal",t,h,r),v=nd("decimalSeparator",t,h,ue.DEFAULT_NUMBER_DECIMAL_SEPARATOR),k=nd("thousandSeparator",t,h,ue.DEFAULT_NUMBER_THOUSAND_SEPARATOR),x=nd("displayNegativeNumberWithParentheses",t,h,ue.DEFAULT_NEGATIVE_NUMBER_WRAPPED_IN_BRAQUET),D=nd("currencyPrefix",t,h,""),C=nd("currencySuffix",t,h,"");return"cell"===u&&(o=nd("numberPrefix",t,h,""),d=nd("numberSuffix",t,h,"")),{minDecimal:m,maxDecimal:g,decimalSeparator:v,thousandSeparator:k,wrapNegativeNumber:x,currencyPrefix:D,currencySuffix:C,numberPrefix:o,numberSuffix:d}}function nd(t,e,a,u){const i=e&&e.params;return i&&i.hasOwnProperty(t)?i[t]:a?.formatterOptions?.hasOwnProperty(t)?a.formatterOptions[t]:u}function Gu(t,e){const a=tl(t,!0);return(u,i,r,o,d,h)=>{const g=(h&&"function"==typeof h.getOptions?h.getOptions():{})?.formatterOptions?.dateSeparator??e,k=tl(o?.type??w.date,!0),x=o?.params?.parseDateAsUtc??!1,D=Tc(r,k);let C=r;if(D){let F=r;x&&(F=function ice(t){return hK(t,$F(t,"utc"))}(D)),C=Pi(F,a,"en-US")}if(C&&g!==e){const F=new RegExp(e,"ig");C=C.replace(F,g)}return C}}function oT(t,e,a,u,i,r){let d,o=!1;a?.hasOwnProperty("exportWithFormatter")?o=!!a.exportWithFormatter:r?.hasOwnProperty("exportWithFormatter")&&(o=!!r.exportWithFormatter),u&&a.exportCustomFormatter?d=a.exportCustomFormatter:o&&a.formatter&&(d=a.formatter);const h=_7(d,t,e,a,u,i);return r?.sanitizeDataExport&&"string"==typeof h?Tu(h):h}function _7(t,e,a,u,i,r){let o="",h=u.field||u.id||"";if("string"==typeof u.field&&u.field.indexOf(".")>0){const g=u.field.split(".");h=g.length>0?g[0]:u.field}const m=i?.hasOwnProperty(h)?i[h]:null;if("function"==typeof t){const g=t(e,a,m,u,i,r);o=ui(Bp(g)?g:g.html||g.text)}else o=i?.hasOwnProperty(h)?m:"";return null==o&&(o=""),"object"==typeof o&&!(o instanceof Date)&&0===Object.entries(o).length&&(o=""),o}class xhe extends _W{constructor(e,a,u,i){super(e,a,u),this.extensionUtility=e,this.pubSubService=a,this.sharedService=u,this.treeDataService=i,this._defaults={autoAdjustDrop:!0,autoAlignSide:!0,autoAdjustDropOffset:0,autoAlignSideOffset:0,hideMenuOnScroll:!1,optionShownOverColumnIds:[],commandShownOverColumnIds:[],subMenuOpenByEvent:"mouseover"},this.pluginName="ContextMenu",this._camelPluginName="contextMenu",this._menuCssPrefix="slick-menu",this._menuPluginCssPrefix="slick-context-menu",this.init(u.gridOptions.contextMenu)}init(e){this._addonOptions={...this._defaults,...e};const a=this._addonOptions&&Array.isArray(this._addonOptions.commandItems)?this._addonOptions.commandItems:[];this._addonOptions.commandItems=[...a,...this.addMenuCustomCommands(a)],this._addonOptions={...this._addonOptions},this.sharedService.gridOptions.contextMenu=this._addonOptions,this.sortMenuItems(),this._eventHandler.subscribe(this.grid.onContextMenu,this.handleOnContextMenu.bind(this)),this._eventHandler.subscribe(this.grid.onClick,this.hideMenu.bind(this)),this._addonOptions.hideMenuOnScroll&&this._eventHandler.subscribe(this.grid.onScroll,this.closeMenu.bind(this))}translateContextMenu(){const e=this.sharedService?.gridOptions??{},a=this.sharedService.gridOptions.contextMenu;if(a&&e?.enableTranslate){const u=a.commandItems||[],i=a.optionItems||[];a.commandTitleKey&&(a.commandTitle=this.extensionUtility.translateWhenEnabledAndServiceExist(a.commandTitleKey,"TEXT_COMMANDS")||a.commandTitle),a.optionTitleKey&&(a.optionTitle=this.extensionUtility.translateWhenEnabledAndServiceExist(a.optionTitleKey,"TEXT_COMMANDS")||a.optionTitle),this.extensionUtility.translateMenuItemsFromTitleKey(u,"commandItems"),this.extensionUtility.translateMenuItemsFromTitleKey(i,"optionItems")}}handleOnContextMenu(e,a){this.disposeAllMenus();const u=this.grid.getCellFromEvent(e);if(u){const i=this.grid.getDataItem(u.row),r=this.grid.getColumns()[u.cell],o=a||{};if(o.cell=u.cell,o.row=u.row,o.column=r,o.dataContext=i,o.grid=this.grid,!this.extensionUtility.runOverrideFunctionWhenExists(this._addonOptions.menuUsabilityOverride,o))return;this._menuElm=this.createParentMenu(e),this._menuElm&&e.preventDefault(),this._menuElm&&this.gridOptions.darkMode&&this._menuElm.classList.add("slick-dark-mode"),this._menuElm&&(this.repositionMenu(e,this._menuElm),this._menuElm.ariaExpanded="true",this._menuElm.style.display="block"),this._bindEventService.bind(document.body,"mousedown",this.handleBodyMouseDown.bind(this))}}addMenuCustomCommands(e){const a=[],u=this.sharedService&&this.sharedService.gridOptions||{},i=u?.contextMenu,r=this.sharedService?.dataView,o=Gl(u);if(i&&!i.hideCopyCellValueCommand){const d="copy";e.some(h=>"divider"!==h&&h.hasOwnProperty("command")&&h.command===d)||a.push({iconCssClass:i.iconCopyCellValueCommand||"mdi mdi-content-copy",titleKey:`${o}COPY`,disabled:!1,command:d,positionOrder:50,action:(h,m)=>{this.copyToClipboard(m)},itemUsabilityOverride:h=>{const m=h?.column,g=h?.dataContext;if("function"==typeof m.queryFieldNameGetterFn){const v=N2(m,g,"");if(""!==v&&void 0!==v)return!0}else if(m&&g.hasOwnProperty(m.field))return""!==g[m.field]&&null!==g[m.field]&&void 0!==g[m.field];return!1}})}if(u?.enableTextExport&&i&&!i.hideExportCsvCommand){const d="export-csv";e.some(h=>"divider"!==h&&h.hasOwnProperty("command")&&h.command===d)||a.push({iconCssClass:i.iconExportCsvCommand||"mdi mdi-download",titleKey:`${o}EXPORT_TO_CSV`,disabled:!1,command:d,positionOrder:51,action:()=>{const m=(this.sharedService?.externalRegisteredResources||[]).find(g=>"TextExportService"===g.className);if(!m?.exportToFile)throw new Error("[Slickgrid-Universal] You must register the TextExportService to properly use Export to File in the Context Menu. Example:: this.gridOptions = { enableTextExport: true, externalResources: [new TextExportService()] };");m.exportToFile({delimiter:$r.comma,format:yt.csv})}})}if(u&&u.enableExcelExport&&i&&!i.hideExportExcelCommand){const d="export-excel";e.some(h=>"divider"!==h&&h.hasOwnProperty("command")&&h.command===d)||a.push({iconCssClass:i.iconExportExcelCommand||"mdi mdi-file-excel-outline text-success",titleKey:`${o}EXPORT_TO_EXCEL`,disabled:!1,command:d,positionOrder:52,action:()=>{const m=(this.sharedService?.externalRegisteredResources||[]).find(g=>"ExcelExportService"===g.className);if(!m?.exportToExcel)throw new Error("[Slickgrid-Universal] You must register the ExcelExportService to properly use Export to Excel in the Context Menu. Example:: this.gridOptions = { enableExcelExport: true, externalResources: [new ExcelExportService()] };");m.exportToExcel()}})}if(u?.enableTextExport&&i&&!i.hideExportTextDelimitedCommand){const d="export-text-delimited";e.some(h=>"divider"!==h&&h.hasOwnProperty("command")&&h.command===d)||a.push({iconCssClass:i.iconExportTextDelimitedCommand||"mdi mdi-download",titleKey:`${o}EXPORT_TO_TAB_DELIMITED`,disabled:!1,command:d,positionOrder:53,action:()=>{const m=(this.sharedService?.externalRegisteredResources||[]).find(g=>"TextExportService"===g.className);if(!m?.exportToFile)throw new Error("[Slickgrid-Universal] You must register the TextExportService to properly use Export to File in the Context Menu. Example:: this.gridOptions = { enableTextExport: true, externalResources: [new TextExportService()] };");m.exportToFile({delimiter:$r.tab,format:yt.txt})}})}if(u&&(u.enableGrouping||u.enableDraggableGrouping||u.enableTreeData)){if(i&&!i.hideCopyCellValueCommand&&a.push({divider:!0,command:"",positionOrder:54}),u&&!u.enableTreeData&&i&&!i.hideClearAllGrouping){const d="clear-grouping";e.some(h=>"divider"!==h&&h.hasOwnProperty("command")&&h.command===d)||a.push({iconCssClass:i.iconClearGroupingCommand||"mdi mdi-close",titleKey:`${o}CLEAR_ALL_GROUPING`,disabled:!1,command:d,positionOrder:55,action:()=>{r.setGrouping([]),this.pubSubService.publish("onContextMenuClearGrouping")},itemUsabilityOverride:()=>{const h=r&&r.getGrouping&&r.getGrouping();return Array.isArray(h)&&h.length>0}})}if(u&&i&&!i.hideCollapseAllGroups){const d="collapse-all-groups";e.some(h=>"divider"!==h&&h.hasOwnProperty("command")&&h.command===d)||a.push({iconCssClass:i.iconCollapseAllGroupsCommand||"mdi mdi-arrow-collapse",titleKey:`${o}COLLAPSE_ALL_GROUPS`,disabled:!1,command:d,positionOrder:56,action:()=>{u.enableTreeData?this.treeDataService.toggleTreeDataCollapse(!0):r.collapseAllGroups(),this.pubSubService.publish("onContextMenuCollapseAllGroups")},itemUsabilityOverride:()=>{if(u.enableTreeData)return!0;const h=r&&r.getGrouping&&r.getGrouping();return Array.isArray(h)&&h.length>0}})}if(u&&i&&!i.hideExpandAllGroups){const d="expand-all-groups";e.some(h=>"divider"!==h&&h.hasOwnProperty("command")&&h.command===d)||a.push({iconCssClass:i.iconExpandAllGroupsCommand||"mdi mdi-arrow-expand",titleKey:`${o}EXPAND_ALL_GROUPS`,disabled:!1,command:d,positionOrder:57,action:()=>{u.enableTreeData?this.treeDataService.toggleTreeDataCollapse(!1):r.expandAllGroups(),this.pubSubService.publish("onContextMenuExpandAllGroups")},itemUsabilityOverride:()=>{if(u.enableTreeData)return!0;const h=r&&r.getGrouping&&r.getGrouping();return Array.isArray(h)&&h.length>0}})}}return this.extensionUtility.translateMenuItemsFromTitleKey(a),a}copyToClipboard(e){try{if(e&&e.grid&&e.command){const a=this.sharedService?.gridOptions??{},u=e?.cell??0,i=e?.row??0,r=e?.column,o=e?.dataContext,d=this.sharedService?.slickGrid;let m=oT(i,u,r,o,d,a&&(a.excelExportOptions||a.textExportOptions));"function"==typeof r.queryFieldNameGetterFn&&(m=N2(r,o,""));let g=m;"string"==typeof m&&(g=m.replace(/^([\xb7|\u2b9e|\u2b9f]\s*)|([\xb7|\u2b9e|\u2b9f])\s*/gi,"").replace(/[\u00b7|\u034f]/gi,"").trim());const v=document.createElement("textarea");v&&document.body&&(v.style.position="absolute",v.style.opacity="0",v.value=g,document.body.appendChild(v),v.select(),document.execCommand("copy",!1,g)&&v.remove())}}catch{}}sortMenuItems(){const e=this.sharedService?.gridOptions?.contextMenu;e&&(this.extensionUtility.sortItems(e.commandItems||[],"positionOrder"),this.extensionUtility.sortItems(e.optionItems||[],"positionOrder"))}}class fhe{constructor(e,a,u){this.extensionUtility=e,this.pubSubService=a,this.sharedService=u,this.columnsGroupBy=[],this.pluginName="DraggableGrouping",this._gridColumns=[],this._gridUid="",this._reorderedColumns=[],this._subscriptions=[],this._defaults={dropPlaceHolderText:"Drop a column header here to group by the column",hideGroupSortIcons:!1,hideToggleAllButton:!1,toggleAllButtonText:"",toggleAllPlaceholderText:"Toggle all Groups"},this._bindingEventService=new Ni,this.onGroupChanged=new be("onGroupChanged"),this._eventHandler=new Ut}get addonOptions(){return this._addonOptions}get dataView(){return this.grid?.getData()??{}}get dropboxElement(){return this._dropzoneElm}get droppableInstance(){return this._droppableInstance}get sortableLeftInstance(){return this._sortableLeftInstance}get sortableRightInstance(){return this._sortableRightInstance}get eventHandler(){return this._eventHandler}get grid(){return this._grid??this.sharedService.slickGrid??{}}get gridOptions(){return this.sharedService.gridOptions??{}}get gridUid(){return this._gridUid||(this.grid?.getUID()??"")}get gridContainer(){return this.grid.getContainerNode()}init(e,a){if(this._addonOptions={...this._defaults,...a},this._grid=e,e){if(this._gridUid=e.getUID(),this._gridColumns=e.getColumns(),this._dropzoneElm=e.getTopHeaderPanel()||e.getPreHeaderPanel(),this._dropzoneElm.classList.add("slick-dropzone"),this.onGroupChanged.setPubSubService(this.pubSubService),!this._addonOptions.hideToggleAllButton){this._groupToggler=T("div",{className:"slick-group-toggle-all",title:this._addonOptions.toggleAllPlaceholderText??"",style:{display:"none"}});const u=T("span",{className:"slick-group-toggle-all-icon"},this._groupToggler);this.gridOptions.enableTranslate&&this._addonOptions.toggleAllButtonTextKey&&(this._addonOptions.toggleAllButtonText=this.extensionUtility.translateWhenEnabledAndServiceExist(this._addonOptions.toggleAllButtonTextKey,"TEXT_TOGGLE_ALL_GROUPS")),this.gridOptions.enableTranslate&&this._addonOptions.toggleAllPlaceholderTextKey&&(this._addonOptions.toggleAllPlaceholderText=this.extensionUtility.translateWhenEnabledAndServiceExist(this._addonOptions.toggleAllPlaceholderTextKey,"TEXT_TOGGLE_ALL_GROUPS")),this._groupToggler.title=this._addonOptions.toggleAllPlaceholderText??"",this._addonOptions.toggleAllButtonText&&this._groupToggler.appendChild(T("span",{className:"slick-group-toggle-all-text",textContent:this._addonOptions.toggleAllButtonText||""})),this._dropzoneElm.appendChild(this._groupToggler),this._subscriptions.push(this.pubSubService.subscribe("onContextMenuCollapseAllGroups",()=>this.toggleGroupToggler(u,!0,!1)),this.pubSubService.subscribe("onContextMenuExpandAllGroups",()=>this.toggleGroupToggler(u,!1,!1)))}this._dropzonePlaceholderElm=T("div",{className:"slick-draggable-dropzone-placeholder"},this._dropzoneElm),this.gridOptions.enableTranslate&&this._addonOptions?.dropPlaceHolderTextKey&&(this._addonOptions.dropPlaceHolderText=this.extensionUtility.translateWhenEnabledAndServiceExist(this._addonOptions.dropPlaceHolderTextKey,"TEXT_TOGGLE_ALL_GROUPS")),this._dropzonePlaceholderElm.textContent=this._addonOptions?.dropPlaceHolderText??this._defaults.dropPlaceHolderText??"",this.setupColumnDropbox(),this._eventHandler.subscribe(e.onHeaderCellRendered,(u,i)=>{const r=i.node;if(!gL(i.column?.grouping)&&r&&(r.style.cursor="pointer",this._addonOptions.groupIconCssClass)){const o=T("span",{className:"slick-column-groupable"},r);this._addonOptions.groupIconCssClass&&o.classList.add(...Kt(this._addonOptions.groupIconCssClass))}}),this._subscriptions.push(this.pubSubService.subscribe("onContextMenuClearGrouping",()=>this.clearDroppedGroups()));for(const u of this._gridColumns){const i=u.field;e.updateColumnHeader(i)}}return this}dispose(){this.destroySortableInstances(),this._droppableInstance?.el&&this._droppableInstance?.destroy(),this.onGroupChanged.unsubscribe(),this._eventHandler.unsubscribeAll(),this.pubSubService.unsubscribeAll(this._subscriptions),this._bindingEventService.unbindAll(),_t(this.gridContainer.querySelector(`.${this.gridUid} .slick-preheader-panel,.${this.gridUid} .slick-topheader-panel`))}clearDroppedGroups(){this.columnsGroupBy=[],this.updateGroupBy("clear-all");const e=this._dropzoneElm.querySelectorAll(".slick-dropped-grouping");for(const a of Array.from(e))this._dropzoneElm.querySelector(".slick-groupby-remove")?.remove(),a?.remove();this._dropzonePlaceholderElm.style.display="inline-block",this._groupToggler&&(this._groupToggler.style.display="none")}destroySortableInstances(){this._sortableLeftInstance?.el&&this._sortableLeftInstance?.destroy(),this._sortableRightInstance?.el&&this._sortableRightInstance?.destroy()}setAddonOptions(e){this._addonOptions={...this._addonOptions,...e}}setColumns(e){this._gridColumns=e}setDroppedGroups(e){this._dropzonePlaceholderElm.style.display="none";const a=Array.isArray(e)?e:[e];for(const u of a){const i=this.grid.getHeaderColumn(u);this.handleGroupByDrop(this._dropzoneElm,i)}}setupColumnReorder(e,a,u,i,r,o,d,h,m){this.destroySortableInstances();const g=e.getTopHeaderPanel()||e.getPreHeaderPanel(),v=g.querySelector(".slick-draggable-dropzone-placeholder"),k=g.querySelector(".slick-group-toggle-all"),x={animation:50,chosenClass:"slick-header-column-active",ghostClass:"slick-sortable-placeholder",draggable:".slick-header-column",dataIdAttr:"data-id",group:{name:"shared",pull:"clone",put:!1},revertClone:!0,onStart:()=>{v&&(v.style.display="inline-block"),g.querySelectorAll(".slick-dropped-grouping").forEach(C=>C.style.display="none"),k&&(k.style.display="none")},onEnd:D=>{g?.classList.remove("slick-dropzone-hover"),v?.parentElement?.classList.remove("slick-dropzone-placeholder-hover");const C=g.querySelectorAll(".slick-dropped-grouping");if(C.forEach(M=>M.style.display="flex"),C.length&&(v&&(v.style.display="none"),k&&(k.style.display="inline-flex")),!e.getEditorLock().commitCurrentEdit())return;const F=this.sortableLeftInstance?.toArray()??[];if(a.length>1){const M=this._sortableRightInstance?.toArray()??[];for(const L of M)F.push(L)}const A=[],z=e.getColumns();for(const M of F)A.push(z[d.call(e,M)]);i.call(e,A),m.call(e,e.onColumnsReordered,{grid:e,impactedColumns:A}),D.stopPropagation(),r.call(e)}};return this._sortableLeftInstance=Ih.create(this.gridContainer.querySelector(`.${e.getUID()} .slick-header-columns.slick-header-columns-left`),x),this._sortableRightInstance=Ih.create(this.gridContainer.querySelector(`.${e.getUID()} .slick-header-columns.slick-header-columns-right`),x),{sortableLeftInstance:this._sortableLeftInstance,sortableRightInstance:this._sortableRightInstance}}addColumnGroupBy(e){this.columnsGroupBy.push(e),this.updateGroupBy("add-group")}addGroupByRemoveClickHandler(e,a,u,i){this._bindingEventService.bind(a,"click",()=>{const r=this._bindingEventService.boundedEvents.filter(o=>o.element===a);for(const o of r)this._bindingEventService.unbind(o.element,"click",o.listener);this.removeGroupBy(e,u,i)})}addGroupSortClickHandler(e,a){const{grouping:u,type:i}=e;this._bindingEventService.bind(a,"click",()=>{if(this.toggleGroupAll(e,!1),u){const r=u.sortAsc?Gt.desc:Gt.asc;u.comparer=(o,d)=>Cv(i||"text",o.value,d.value,r,e,this.gridOptions),this.getGroupBySortIcon(a,!u.sortAsc),this.updateGroupBy("sort-group"),u.sortAsc=!u.sortAsc,this.grid.invalidate()}})}getGroupBySortIcon(e,a=!0){a?this._addonOptions.sortAscIconCssClass?(e.classList.remove(...Kt(this._addonOptions.sortDescIconCssClass)),e.classList.add(...Kt(this._addonOptions.sortAscIconCssClass))):(e.classList.add("slick-groupby-sort-asc-icon"),e.classList.remove("slick-groupby-sort-desc-icon")):this._addonOptions.sortDescIconCssClass?(e.classList.remove(...Kt(this._addonOptions.sortAscIconCssClass)),e.classList.add(...Kt(this._addonOptions.sortDescIconCssClass))):this._addonOptions.sortDescIconCssClass||(e.classList.add("slick-groupby-sort-desc-icon"),e.classList.remove("slick-groupby-sort-asc-icon"))}handleGroupByDrop(e,a){const u=a.getAttribute("data-id")?.replace(this._gridUid,"");let i=!0;for(const r of this.columnsGroupBy)r.id===u&&(i=!1);if(i){for(const r of this._gridColumns)if(r.id===u&&r.grouping&&!gL(r.grouping)){const o=a.querySelector(".slick-column-name"),d=T("div",{id:`${this._gridUid}_${r.id}_entry`,className:"slick-dropped-grouping",dataset:{id:`${r.id}`}});T("div",{className:"slick-dropped-grouping-title",style:{display:"inline-flex"},textContent:o?o.textContent:a.textContent},d);const h=T("div",{className:"slick-groupby-remove"});let m;this._addonOptions.deleteIconCssClass&&h.classList.add(...Kt(this._addonOptions.deleteIconCssClass)),this._addonOptions.deleteIconCssClass||h.classList.add("slick-groupby-remove-icon"),!0!==this._addonOptions?.hideGroupSortIcons&&r.sortable&&(void 0===r.grouping?.sortAsc&&(r.grouping.sortAsc=!0),m=T("div",{className:"slick-groupby-sort"},d),this.getGroupBySortIcon(m,r.grouping.sortAsc)),d.appendChild(h),d.appendChild(document.createElement("div")),e.appendChild(d),this._groupToggler&&0===this.columnsGroupBy.length&&this.toggleGroupAll(r),this.addColumnGroupBy(r),this.addGroupByRemoveClickHandler(r.id,h,a,d),m&&this.addGroupSortClickHandler(r,m)}this._groupToggler&&this.columnsGroupBy.length>0&&(this._groupToggler.style.display="inline-flex")}}toggleGroupAll({grouping:e},a){const u=this._groupToggler?.querySelector(".slick-group-toggle-all-icon");!0===a||e?.collapsed?(u?.classList.add("collapsed"),u?.classList.remove("expanded")):(u?.classList.add("expanded"),u?.classList.remove("collapsed"))}removeFromArray(e,a){if(Array.isArray(e)){const u=e.findIndex(i=>i.id===a.id);u>=0&&e.splice(u,1)}return e}removeGroupBy(e,a,u){u.remove();const i=[];this._gridColumns.forEach(r=>i[r.id]=r),this.removeFromArray(this.columnsGroupBy,i[e]),0===this.columnsGroupBy.length&&(this._dropzonePlaceholderElm.style.display="inline-block",this._groupToggler&&(this._groupToggler.style.display="none")),this.updateGroupBy("remove-group")}addDragOverDropzoneListeners(){const e=this._dropzoneElm.querySelector(".slick-draggable-dropzone-placeholder");e&&this._dropzoneElm&&(this._bindingEventService.bind(e,"dragover",a=>a.preventDefault()),this._bindingEventService.bind(e,"dragenter",()=>this._dropzoneElm.classList.add("slick-dropzone-hover")),this._bindingEventService.bind(e,"dragleave",()=>this._dropzoneElm.classList.remove("slick-dropzone-hover")))}setupColumnDropbox(){const e=this._dropzoneElm;this._droppableInstance=Ih.create(e,{group:"shared",ghostClass:"slick-droppable-sortitem-hover",draggable:".slick-dropped-grouping",dragoverBubble:!0,onAdd:a=>{const u=a.item;u.getAttribute("id")?.replace(this._gridUid,"")&&this.handleGroupByDrop(e,Ih.utils.clone(a.item)),u.parentNode?.removeChild(u)},onUpdate:()=>{const a=this._droppableInstance?.toArray()??[],u=[];for(const i of a)for(const r of this.columnsGroupBy)if(r.id===i){u.push(r);break}this.columnsGroupBy=u,this.updateGroupBy("sort-group")}}),this.addDragOverDropzoneListeners(),this._groupToggler&&this._bindingEventService.bind(this._groupToggler,"click",a=>{const u=a.target.classList.contains("slick-group-toggle-all-icon")?a.target:a.currentTarget.querySelector(".slick-group-toggle-all-icon");this.toggleGroupToggler(u,u?.classList.contains("expanded"))})}toggleGroupToggler(e,a=!0,u=!0){e&&(!0===a?(e.classList.add("collapsed"),e.classList.remove("expanded"),u&&this.dataView.collapseAllGroups()):(e.classList.remove("collapsed"),e.classList.add("expanded"),u&&this.dataView.expandAllGroups()))}updateGroupBy(e){if(0===this.columnsGroupBy.length)return this.dataView.setGrouping([]),this._dropzonePlaceholderElm.style.display="inline-block",void this.triggerOnGroupChangedEvent({caller:e,groupColumns:[]});const a=[];this.columnsGroupBy.forEach(u=>a.push(u.grouping)),this.dataView.setGrouping(a),this._dropzonePlaceholderElm.style.display="none",this.triggerOnGroupChangedEvent({caller:e,groupColumns:a})}triggerOnGroupChangedEvent(e){this._addonOptions&&"function"==typeof this._addonOptions.onGroupChanged&&this._addonOptions.onGroupChanged(new Wt,e),this.onGroupChanged.notify(e)}}class Dhe extends f7{constructor(e,a,u){super(e,a,u),this.extensionUtility=e,this.pubSubService=a,this.sharedService=u,this._buttonElms=[],this._defaults={buttonCssClass:"slick-header-button"},this.pluginName="HeaderButtons",this._menuCssPrefix="slick-header-button",this._camelPluginName="headerButtons",this._bindEventService=new Ni,this._eventHandler=new Ut,this.init(u.gridOptions.headerButton)}get addonOptions(){return this._addonOptions}set addonOptions(e){this._addonOptions=e}get eventHandler(){return this._eventHandler}get grid(){return this.sharedService.slickGrid}init(e){this._addonOptions={...this._defaults,...e},this._eventHandler.subscribe(this.grid.onHeaderCellRendered,this.handleHeaderCellRendered.bind(this)),this._eventHandler.subscribe(this.grid.onBeforeHeaderCellDestroy,this.handleBeforeHeaderCellDestroy.bind(this)),this.grid.setColumns(this.grid.getColumns())}dispose(){super.dispose(),this._buttonElms.forEach(e=>e.remove())}handleHeaderCellRendered(e,a){const u=a.column;if(u.header?.buttons&&Array.isArray(u.header.buttons)){let i=u.header.buttons.length;for(;i--;){const r=u.header.buttons[i],o=this.populateSingleCommandOrOptionItem("command",this.addonOptions,null,r,a,this.handleButtonClick.bind(this));o&&r.handler&&!r.disabled&&this._bindEventService.bind(o,"click",d=>r.handler.call(this,d)),o&&(this._buttonElms.push(o),a.node.appendChild(o))}}}handleBeforeHeaderCellDestroy(e,a){if(a.column.header?.buttons&&this._addonOptions?.buttonCssClass){const i=(this._addonOptions?.buttonCssClass||"").replace(/(\s+)/g,".");i&&a.node.querySelectorAll(`.${i}`).forEach(r=>r.remove())}}handleButtonClick(e,a,u,i,r){if(u.command&&!u.disabled){const o=u.command||"",d={grid:this.grid,column:r,button:u};o&&(d.command=o),"function"==typeof u.action&&!u.disabled&&u.action.call(this,e,d),null!==o&&!u.disabled&&this._addonOptions?.onCommand&&(this.pubSubService.publish("onHeaderButtonCommand",d),this._addonOptions.onCommand(e,d),r?.id&&this.grid.updateColumnHeader(r.id))}e.preventDefault(),e.stopPropagation()}}class Che extends f7{constructor(e,a,u,i,r){super(e,u,i),this.extensionUtility=e,this.filterService=a,this.pubSubService=u,this.sharedService=i,this.sortService=r,this._subMenuParentId="",this._defaults={autoAlign:!0,autoAlignOffset:0,buttonCssClass:null,buttonImage:null,minWidth:100,hideColumnHideCommand:!1,hideSortCommands:!1,title:"",subMenuOpenByEvent:"mouseover"},this.pluginName="HeaderMenu",this._menuCssPrefix="slick-menu",this._menuPluginCssPrefix="slick-header-menu",this._camelPluginName="headerMenu",this.sharedService.gridOptions.headerMenu=this.addHeaderMenuCustomCommands(this.sharedService.columnDefinitions),this.init(i.gridOptions.headerMenu)}init(e){this._addonOptions={...this._defaults,...e},this._eventHandler.subscribe(this.grid.onBeforeSetColumns,(a,u)=>{this.sharedService.gridOptions.headerMenu=this.addHeaderMenuCustomCommands(u.newColumns)}),this._eventHandler.subscribe(this.grid.onHeaderCellRendered,this.handleHeaderCellRendered.bind(this)),this._eventHandler.subscribe(this.grid.onBeforeHeaderCellDestroy,this.handleBeforeHeaderCellDestroy.bind(this)),this._eventHandler.subscribe(this.grid.onClick,this.hideMenu.bind(this)),this.grid.setColumns(this.grid.getColumns()),this._bindEventService.bind(document.body,"mousedown",this.handleBodyMouseDown.bind(this))}dispose(){super.dispose(),this._menuElm=this._menuElm||document.body.querySelector(`.slick-header-menu${this.gridUidSelector}`),this._menuElm?.remove(),this._activeHeaderColumnElm=void 0}hideColumn(e){if(this.sharedService?.slickGrid?.getColumnIndex){const a=this.sharedService.slickGrid.getColumnIndex(e.id),u=this.sharedService.slickGrid.getColumns(),i=this.sharedService.gridOptions.frozenColumn??-1;i>=0&&i>=a&&(this.sharedService.gridOptions.frozenColumn=i-1,this.sharedService.slickGrid.setOptions({frozenColumn:this.sharedService.gridOptions.frozenColumn}));const r=mL(u,a);this.sharedService.visibleColumns=r,this.sharedService.slickGrid.setColumns(r),this.pubSubService.publish("onHeaderMenuHideColumns",{columns:r,hiddenColumn:e})}}hideMenu(){this.disposeSubMenus(),this._menuElm?.remove(),this._menuElm=void 0}repositionSubMenu(e,a,u,i){const r=this.createCommandMenu(a.commandItems||[],i,u+1,a);document.body.appendChild(r),this.repositionMenu(e,r)}repositionMenu(e,a){const u=e.target,i=a.classList.contains("slick-submenu"),r=i?e.target.closest(".slick-menu-item"):u,o=TG(this.sharedService.gridContainerElement,u),d=this.grid.getGridPosition(),h=a.offsetWidth,m=Lu(r);let g=i?m.left:o?.left??0,v=i?m.top:(o?.top??0)+(this.addonOptions?.menuOffsetTop??0)+u.clientHeight;if(i){const k=a?.clientHeight||0,{bottom:x,top:D}=V2(r);"top"==(xx?"top":"bottom")?(a.classList.remove("dropdown"),a.classList.add("dropup"),v-=k-r.clientHeight):(a.classList.remove("dropup"),a.classList.add("dropdown"))}if(i&&r){const k=g+Number(h)+r.clientWidth,x=document.documentElement.clientWidth;"left"==(k>=d.width||k>=x?"left":"right")?(a.classList.remove("dropright"),a.classList.add("dropleft"),g-=h):(a.classList.remove("dropleft"),a.classList.add("dropright"),g+=r.offsetWidth)}else g=o?.left??0,this.addonOptions.autoAlign&&d?.width&&g+(a.clientWidth??0)>=d.width&&(g=g+u.clientWidth-a.clientWidth+(this.addonOptions?.autoAlignOffset||0));a.style.top=`${v}px`,a.style.left=`${g}px`}translateHeaderMenu(){this.sharedService.gridOptions?.headerMenu&&this.resetHeaderMenuTranslations(this.sharedService.visibleColumns)}handleHeaderCellRendered(e,a){const i=a.column.header?.menu;if(i&&a.node){if(!this.extensionUtility.runOverrideFunctionWhenExists(this.addonOptions.menuUsabilityOverride,a))return;const r=T("div",{className:"slick-header-menu-button",ariaLabel:"Header Menu"},a.node);this.addonOptions.buttonCssClass&&r.classList.add(...Kt(this.addonOptions.buttonCssClass)),this.addonOptions.tooltip&&(r.title=this.addonOptions.tooltip),this._bindEventService.bind(r,"click",o=>{this.disposeAllMenus(),this.createParentMenu(o,a.column,i)})}}handleBeforeHeaderCellDestroy(e,a){a.column.header?.menu&&a.node.querySelectorAll(".slick-header-menu-button").forEach(i=>i.remove())}handleBodyMouseDown(e){if(this.menuElement){let a=!1;const u=e.target.closest(`.${this.menuCssClass}`);(this.menuElement.contains(e.target)||u)&&(a=!0),(this._menuElm!==e.target&&!a&&!e.defaultPrevented||"close"===e.target.className&&u)&&this.hideMenu()}}handleMenuItemCommandClick(e,a,u,i=0,r){if("divider"!==u&&!u.disabled&&!u.divider)if(u.command&&!u.commandItems){const d={grid:this.grid,command:u.command,column:r,item:u};this.executeHeaderMenuInternalCommands(e,d),this.pubSubService.publish("onHeaderMenuCommand",d),"function"==typeof this.addonOptions?.onCommand&&this.addonOptions.onCommand(e,d),"function"==typeof u.action&&u.action.call(this,e,d),e.defaultPrevented||this.hideMenu(),e.preventDefault(),e.stopPropagation()}else u.commandItems&&this.repositionSubMenu(e,u,i,r)}handleMenuItemMouseOver(e,a,u,i=0,r){"divider"!==u&&!u.disabled&&!u.divider&&(u.commandItems?this.repositionSubMenu(e,u,i,r):0===i&&this.disposeSubMenus())}addHeaderMenuCustomCommands(e){const a=this.sharedService.gridOptions,u=a.headerMenu||{},i=Gl(a);return Array.isArray(e)&&a.enableHeaderMenu&&e.forEach(r=>{if(r&&!r.excludeFromHeaderMenu){r.header?r.header.menu||(r.header.menu={commandItems:[]}):r.header={menu:{commandItems:[]}};const o=r?.header?.menu?.commandItems??[];let d=!1;if(u&&!u.hideFreezeColumnsCommand&&(d=!0,o.some(h=>"divider"!==h&&"freeze-columns"===h?.command)||o.push({iconCssClass:u.iconFreezeColumns||"mdi mdi-pin-outline",titleKey:`${i}FREEZE_COLUMNS`,command:"freeze-columns",positionOrder:45})),u&&!u.hideColumnResizeByContentCommand&&this.sharedService.gridOptions.enableColumnResizeOnDoubleClick&&(d=!0,o.some(h=>"divider"!==h&&"column-resize-by-content"===h?.command)||o.push({iconCssClass:u.iconColumnResizeByContentCommand||"mdi mdi-arrow-expand-horizontal",titleKey:`${i}COLUMN_RESIZE_BY_CONTENT`,command:"column-resize-by-content",positionOrder:47})),d&&!o.some(h=>"divider"!==h&&48===h.positionOrder)&&o.push({divider:!0,command:"",positionOrder:48}),a.enableSorting&&r.sortable&&u&&!u.hideSortCommands&&(o.some(h=>"divider"!==h&&"sort-asc"===h?.command)||o.push({iconCssClass:u.iconSortAscCommand||"mdi mdi-sort-ascending",titleKey:`${i}SORT_ASCENDING`,command:"sort-asc",positionOrder:50}),o.some(h=>"divider"!==h&&"sort-desc"===h?.command)||o.push({iconCssClass:u.iconSortDescCommand||"mdi mdi-sort-descending",titleKey:`${i}SORT_DESCENDING`,command:"sort-desc",positionOrder:51}),o.some(h=>"divider"!==h&&52===h.positionOrder)||o.push({divider:!0,command:"",positionOrder:52}),!u.hideClearSortCommand&&!o.some(h=>"divider"!==h&&"clear-sort"===h?.command)&&o.push({iconCssClass:u.iconClearSortCommand||"mdi mdi-sort-variant-off",titleKey:`${i}REMOVE_SORT`,command:"clear-sort",positionOrder:58})),r.filter?.filterShortcuts&&!o.some(h=>"divider"!==h&&"filter-shortcuts-root-menu"===h?.command)){const h=[];r.filter.filterShortcuts.forEach(g=>{const v=g.title?fv(g.title):(g.titleKey||"").toLowerCase().replaceAll("_","-");h.push({...g,command:v,action:(k,x)=>{this.filterService.getFiltersMetadata().find(C=>C.columnDef.id===x.column.id)?.setValues(g.searchTerms,g.operator,!0)}})});const m=u.filterShortcutsPositionOrder??55;o.push({iconCssClass:u.iconFilterShortcutSubMenu||"mdi mdi-filter-outline",titleKey:`${i}FILTER_SHORTCUTS`,command:"filter-shortcuts-root-menu",positionOrder:m,commandItems:h}),d&&!o.some(g=>"divider"!==g&&g.positionOrder===m+1)&&o.push({divider:!0,command:"",positionOrder:m+1})}a.enableFiltering&&r.filterable&&u&&!u.hideFilterCommand&&!u.hideClearFilterCommand&&!o.some(h=>"divider"!==h&&"clear-filter"===h?.command)&&o.push({iconCssClass:u.iconClearFilterCommand||"mdi mdi-filter-remove-outline",titleKey:`${i}REMOVE_FILTER`,command:"clear-filter",positionOrder:57}),u&&!u.hideColumnHideCommand&&!o.some(h=>"divider"!==h&&"hide-column"===h?.command)&&o.push({iconCssClass:u.iconColumnHideCommand||"mdi mdi-close",titleKey:`${i}HIDE_COLUMN`,command:"hide-column",positionOrder:59}),this.extensionUtility.translateMenuItemsFromTitleKey(o),this.extensionUtility.sortItems(o,"positionOrder")}}),u}clearColumnFilter(e,a){a?.column&&this.filterService.clearFilterByColumnId(e,a.column.id)}clearColumnSort(e,a){a?.column&&this.sharedService&&this.sortService.clearSortByColumnId(e,a.column.id)}executeHeaderMenuInternalCommands(e,a){if(a?.command)switch(a.command){case"hide-column":this.hideColumn(a.column),this.sharedService.gridOptions?.enableAutoSizeColumns&&this.sharedService.slickGrid.autosizeColumns();break;case"clear-filter":this.clearColumnFilter(e,a);break;case"clear-sort":this.clearColumnSort(e,a);break;case"column-resize-by-content":this.pubSubService.publish("onHeaderMenuColumnResizeByContent",{columnId:a.column.id});break;case"freeze-columns":const u=[...this.sharedService.visibleColumns],r={frozenColumn:u.findIndex(m=>m.id===a.column.id),enableMouseWheelScrollHandler:!0},o=this.sharedService.slickGrid.getColumns();this.sharedService.slickGrid.setOptions(r,!1,!0),this.sharedService.gridOptions.frozenColumn=r.frozenColumn,this.sharedService.gridOptions.enableMouseWheelScrollHandler=r.enableMouseWheelScrollHandler,this.sharedService.frozenVisibleColumnId=a.column.id,this.sharedService.hasColumnsReordered||Array.isArray(u)&&Array.isArray(this.sharedService.allColumns)&&u.length!==this.sharedService.allColumns.length?this.sharedService.slickGrid.setColumns(u):this.sharedService.slickGrid.setColumns(o),this.sharedService.slickGrid.getOptions().enableAutoSizeColumns&&this.sharedService.slickGrid.autosizeColumns();break;case"sort-asc":case"sort-desc":const h="sort-asc"===a.command;this.sortColumn(e,a,h)}}createParentMenu(e,a,u){const i={grid:this.grid,column:a,menu:u};"function"==typeof e.stopPropagation&&(this.pubSubService.publish("onHeaderMenuBeforeMenuShow",i),"function"==typeof this.addonOptions?.onBeforeMenuShow&&!1===this.addonOptions?.onBeforeMenuShow(e,i))||(this._menuElm=this.createCommandMenu(u.commandItems,a),this.grid.getContainerNode()?.appendChild(this._menuElm),this.repositionMenu(e,this._menuElm),this.pubSubService.publish("onHeaderMenuAfterMenuShow",i),("function"!=typeof this.addonOptions?.onAfterMenuShow||!1!==this.addonOptions?.onAfterMenuShow(e,i))&&(e.preventDefault(),e.stopPropagation()))}createCommandMenu(e,a,u=0,i){const r=i?.command;let o=1===u&&r?r.replace(/\s/g,""):"";o&&(this._subMenuParentId=o),u>1&&(o=this._subMenuParentId);const d=`${this.menuCssClass} slick-menu-level-${u} ${this.gridUid}`,h=document.body.querySelector(`.${this.menuCssClass}.slick-menu-level-${u}${this.gridUidSelector}`);if(h){if(h.dataset.subMenuParent===o)return h;this.disposeSubMenus()}const m=T("div",{ariaExpanded:"true",ariaLabel:u>1?"SubMenu":"Header Menu",role:"menu",className:d,style:{minWidth:`${this.addonOptions.minWidth}px`}});u>0&&(m.classList.add("slick-submenu"),o&&(m.dataset.subMenuParent=o),this.gridOptions?.darkMode&&m.classList.add("slick-dark-mode"));const g=T("div",{className:`${this._menuCssPrefix}-command-list`,role:"menu"},m),v={grid:this.grid,column:a,level:u,menu:{commandItems:e}};return i&&u>0&&this.addSubMenuTitleWhenExists(i,g),this.populateCommandOrOptionItems("command",this.addonOptions,g,e,v,this.handleMenuItemCommandClick,this.handleMenuItemMouseOver),u++,m}resetHeaderMenuTranslations(e){e.forEach(a=>{if(a?.header?.menu?.commandItems&&!a.excludeFromHeaderMenu){const u=a.header.menu.commandItems||[];this.extensionUtility.translateMenuItemsFromTitleKey(u)}})}sortColumn(e,a,u=!0){if(a?.column){const i=a.column,r=this.sharedService.gridOptions.multiColumnSort?this.sortService.getCurrentColumnSorts(i.id+""):[];let o=zu.local;r.push({columnId:i.id,sortCol:i,sortAsc:u}),this.sharedService.gridOptions.backendServiceApi?(this.sortService.onBackendSortChanged(e,{multiColumnSort:!0,sortCols:r,grid:this.sharedService.slickGrid}),o=zu.remote):this.sharedService.dataView?(this.sortService.onLocalSortChanged(this.sharedService.slickGrid,r),o=zu.local):a.grid.onSort.notify(r);const d=r.map(h=>({columnId:h?.sortCol?.id??"",sortAsc:h?.sortAsc??!0}));if(this.sharedService.slickGrid.setSortColumns(d),o){const h=[];d.forEach(m=>{h.push({columnId:`${m.columnId}`,direction:m.sortAsc?"ASC":"DESC"})}),this.sortService.emitSortChanged(o,h)}}}}const F7="slick-rbe-editmode",RW="slick-rbe-unsaved-highlight",lT="action-btns--delete",sT="action-btns--edit",dT="action-btns--update",cT="action-btns--cancel";class HW{constructor(e,a,u){this.extensionUtility=e,this.pubSubService=a,this.pluginName="RowBasedEdit",this._defaults={actionsColumnLabel:"Actions",allowMultipleRows:!1,columnId:"_slick_rowbasededit_action",columnIndexPosition:-1,reorderable:!1},this._editedRows=new Map,this._currentLang="en",this._translations={},this.onBeforeEditCellHandler=(i,r)=>this._editedRows.has(r.item?.[this.gridOptions.datasetIdPropertyName??"id"]),this._eventHandler=new Ut,this._addonOptions=u}get addonOptions(){return this._addonOptions}get gridOptions(){return this._grid.getOptions()||{}}get eventHandler(){return this._eventHandler}init(e,a){this._grid=e,this._gridService=a,this._addonOptions={...this._defaults,...this.addonOptions};const u=this._grid.getData();if(this._eventHandler.subscribe(this._grid.onBeforeEditCell,this.onBeforeEditCellHandler),this.checkOptionsRequirements(this.gridOptions),this.gridOptions.autoEdit||(this._grid.setOptions({autoEdit:!0}),console.warn('[Slickgrid-Universal] The Row Based Edit Plugin works best with the gridOption "autoEdit" enabled, the option has now been set automatically for you.')),this._existingEditCommandHandler=this.gridOptions.editCommandHandler,this._grid.setOptions({editCommandHandler:this.rowBasedEditCommandHandler.bind(this)}),!0===this.gridOptions.enableExcelCopyBuffer){const r=this.gridOptions.excelCopyBufferOptions?.onBeforePasteCell;this._grid.setOptions({excelCopyBufferOptions:{...this.gridOptions.excelCopyBufferOptions,onBeforePasteCell:(o,d)=>{let h=!0;if(r&&(h=r(o,d),!1===h))return!1;const m=u.getItem(d.row),g=this.gridOptions.datasetIdPropertyName??"id";return!(!this._editedRows.has(m[g])||!0!==h)}}})}const i=u.getItemMetadata;u.getItemMetadata=this.updateItemMetadata(i?.bind?.(u)),this._eventHandler.subscribe(this._grid.onSetOptions,this.optionsUpdatedHandler.bind(this)),this._eventHandler.subscribe(u.onRowsOrCountChanged,this.handleAllRowRerender.bind(this)),this.translate()}destroy(){this.dispose()}dispose(){this._eventHandler?.unsubscribeAll(),this.pubSubService?.unsubscribeAll()}create(e,a){if(this._addonOptions={...this._defaults,...a.rowBasedEditOptions},Array.isArray(e)&&a){const u=this.getColumnDefinition();if(!e.some(i=>i.id===u.id)){const i=a?.rowBasedEditOptions?.columnIndexPosition??-1;-1===i?e.push(u):i>0&&ivoid 0!==v.editor),d=[],h=this.gridOptions.datasetIdPropertyName??"id";i.forEach((v,k)=>{const x=i[k],D=r[k];if(x!==D||""===D){const C=Array.isArray(u.prevSerializedValue)?o?.[k]:a;if(!C)return;this._grid.invalidate(),u.execute(),this.renderUnsavedCellStyling(e[h],C),d.push(C)}});const m=this._editedRows.get(e[h]),g=[...m?.editCommands||[]];d.length>0&&g.push(u),this._editedRows.set(e[h],{columns:[...m?.columns||[],...d],editCommands:g,cssStyleKeys:m?.cssStyleKeys||[]})}translate(e=!1){return this._currentLang=this.extensionUtility.translaterService?.getCurrentLanguage()??"en",(!this._translations[this._currentLang]||e)&&(this._translations[this._currentLang]={btnUpdateTitle:this.getTitleOrDefault("updateButtonTitle","Update the row"),btnEditTitle:this.getTitleOrDefault("editButtonTitle","Edit the Row"),btnDeleteTitle:this.getTitleOrDefault("deleteButtonTitle","Delete the Row"),btnCancelTitle:this.getTitleOrDefault("cancelButtonTitle","Cancel changes of the Row")}),this._translations[this._currentLang]}checkOptionsRequirements(e){if(!e?.enableCellNavigation)throw new Error("[Slickgrid-Universal] Row Based Edit Plugin requires the gridOption cell navigation (enableCellNavigation = true)");if(!e?.editable)throw new Error("[Slickgrid-Universal] Row Based Edit Plugin requires the gridOption editable (editable = true)")}undoRowEdit(e){const a=this.gridOptions.datasetIdPropertyName??"id",u=this._editedRows.get(e[a]),i=this._grid.getData().getRowByItem(e);if(void 0!==i&&u?.editCommands&&u.editCommands.length||td.cancelCurrentEdit()){for(;u.editCommands.length>0;){const r=u.editCommands.pop();r&&r.undo()}u.columns.forEach(r=>{this.removeUnsavedStylingFromCell(r,i)}),u.columns=[],this._grid.invalidate()}}renderUnsavedCellStyling(e,a){if(a){const u=this._grid.getData()?.getRowById(e);if(void 0!==u&&u>=0){const i={[u]:{[a.id]:"slick-rbe-unsaved-cell"}},r=`${RW}_${[a.id]}${u}`;this._grid.setCellCssStyles(r,i),this._editedRows.get(e)?.cssStyleKeys.push(r)}}}handleAllRowRerender(e,a){this._editedRows.forEach((u,i)=>{u.cssStyleKeys.forEach(r=>{this._grid.removeCellCssStyles(r)}),u.cssStyleKeys=[],u.columns.forEach(r=>{this.renderUnsavedCellStyling(i,r)})})}removeUnsavedStylingFromCell(e,a){const u=`${RW}_${[e.id]}${a}`;this._grid.removeCellCssStyles(u)}removeUnsavedStylingFromRow(e){this._grid.getColumns().forEach(a=>{this.removeUnsavedStylingFromCell(a,e)})}optionsUpdatedHandler(e,a){this._addonOptions={...this._defaults,...a.optionsAfter.rowBasedEditOptions}}onCellClickHandler(e,a){var u=this;return Su(function*(){const i=a.dataContext,r=e.target,o=u.gridOptions.datasetIdPropertyName??"id",d=u._editedRows.get(i[o]);if((r.classList.contains(lT)||r.parentElement?.classList.contains(lT))&&u._gridService){if(u._addonOptions?.actionButtons?.deleteButtonPrompt&&!window.confirm(u._addonOptions.actionButtons.deleteButtonPrompt))return;u.toggleEditmode(i,!1),u._gridService.deleteItem(i)}else if(r.classList.contains(sT)||r.parentElement?.classList.contains(sT)){if(!u._addonOptions?.allowMultipleRows&&u._editedRows.size>0)return;"function"==typeof u._addonOptions?.onBeforeEditMode&&u._addonOptions.onBeforeEditMode(a),u.toggleEditmode(i,!0)}else if(r.classList.contains(dT)||r.parentElement?.classList.contains(dT)){if(u._addonOptions?.actionButtons?.updateButtonPrompt&&(d?.editCommands.length||0)>0&&!window.confirm(u._addonOptions.actionButtons.updateButtonPrompt)||(u._grid.getCellEditor()&&u._grid.getActiveCell()?.row===a.row&&u._grid.getEditController()?.commitCurrentEdit(),u._addonOptions?.onBeforeRowUpdated&&!0!==(yield u._addonOptions.onBeforeRowUpdated(a))))return;u.removeUnsavedStylingFromRow(a.row),u.toggleEditmode(i,!1)}else if(r.classList.contains(cT)||r.parentElement?.classList.contains(cT)){if(u._addonOptions?.actionButtons?.cancelButtonPrompt&&(d?.editCommands.length||0)>0&&!window.confirm(u._addonOptions.actionButtons.cancelButtonPrompt))return;u.undoRowEdit(i),u.toggleEditmode(i,!1)}})()}actionColumnFormatter(e,a,u,i,r){const o=this.gridOptions,d=this._editedRows.has(r?.[o.datasetIdPropertyName??"id"]),h=this._translations[this._currentLang]??this.translate(),m=document.createDocumentFragment();return m.appendChild(T("span",{className:`${o.rowBasedEditOptions?.actionButtons?.editButtonClassName||"button-style padding-1px mr-2"} action-btns `+sT,title:h.btnEditTitle,style:{display:d?"none":""}})).appendChild(T("span",{className:o.rowBasedEditOptions?.actionButtons?.iconEditButtonClassName||"mdi mdi-table-edit text-color-primary"})),m.appendChild(T("span",{className:`${o.rowBasedEditOptions?.actionButtons?.deleteButtonClassName||"button-style padding-1px"} action-btns `+lT,title:h.btnDeleteTitle,style:{display:d?"none":""}})).appendChild(T("span",{className:o.rowBasedEditOptions?.actionButtons?.iconDeleteButtonClassName||"mdi mdi-close text-color-danger"})),m.appendChild(T("span",{className:`${o.rowBasedEditOptions?.actionButtons?.updateButtonClassName||"button-style padding-1px mr-2"} action-btns `+dT,title:h.btnUpdateTitle,style:{display:d?"":"none"}})).appendChild(T("span",{className:o.rowBasedEditOptions?.actionButtons?.iconUpdateButtonClassName||"mdi mdi-check-bold text-color-success"})),m.appendChild(T("span",{className:`${o.rowBasedEditOptions?.actionButtons?.cancelButtonClassName||"button-style padding-1px"} action-btns `+cT,title:h.btnCancelTitle,style:{display:d?"":"none"}})).appendChild(T("span",{className:o.rowBasedEditOptions?.actionButtons?.iconCancelButtonClassName||"mdi mdi-cancel text-color-danger"})),m}toggleEditmode(e,a){const u=this.gridOptions.datasetIdPropertyName??"id";a?this._editedRows.set(e[u],{columns:[],editCommands:[],cssStyleKeys:[]}):this._editedRows.delete(e[u]),this._grid.invalidate()}updateItemMetadata(e){return a=>{const u=this._grid.getData().getItem(a);let i={cssClasses:""};if("function"==typeof e){const r=e(a);r&&(i=r)}if(i&&u){const r=this.gridOptions.datasetIdPropertyName??"id";this._editedRows.has(u[r])&&!i.cssClasses.includes(F7)?i.cssClasses=(i.cssClasses||"")+" "+F7:!this._editedRows.has(u[r])&&i.cssClasses.includes(F7)&&(i.cssClasses=i.cssClasses.replace(F7,""))}return i}}getTitleOrDefault(e,a){const u=this.gridOptions.rowBasedEditOptions?.actionButtons;return u?.[e+"Key"]&&this.extensionUtility.translaterService?.translate?.(u?.[e+"Key"]||"")||u?.[e]||a}}class VW{constructor(e){this.pubSubService=e,this.pluginName="RowMoveManager",this._dragging=!1,this._defaults={autoScroll:!0,columnId:"_move",cssClass:"slick-row-move-column",cancelEditOnDrag:!1,disableRowSelection:!1,hideRowMoveShadow:!0,reorderable:!1,rowMoveShadowMarginTop:0,rowMoveShadowMarginLeft:0,rowMoveShadowOpacity:.9,rowMoveShadowScale:.75,singleRowMove:!1,width:40},this.onBeforeMoveRows=new be("onBeforeMoveRows"),this.onMoveRows=new be("onMoveRows"),this._eventHandler=new Ut}get addonOptions(){return this._addonOptions}get eventHandler(){return this._eventHandler}get gridOptions(){return this._grid?.getOptions()??{}}init(e,a){this._addonOptions={...this._defaults,...a},this._grid=e,this._canvas=this._grid.getCanvasNode(),W.addSlickEventPubSubWhenDefined(this.pubSubService,this),"function"==typeof this._addonOptions?.usabilityOverride&&this.usabilityOverride(this._addonOptions.usabilityOverride),this._eventHandler.subscribe(this._grid.onDragInit,this.handleDragInit.bind(this)).subscribe(this._grid.onDragStart,this.handleDragStart.bind(this)).subscribe(this._grid.onDrag,this.handleDrag.bind(this)).subscribe(this._grid.onDragEnd,this.handleDragEnd.bind(this))}dispose(){this._eventHandler?.unsubscribeAll()}create(e,a){if(this._addonOptions={...this._defaults,...a.rowMoveManager},Array.isArray(e)&&a){const u=this.getColumnDefinition();if(!e.some(i=>i.id===u.id)){const r=Array.isArray(e)&&e.find(d=>"selectAndMove"===d?.behavior)||u,o=a?.rowMoveManager?.columnIndexPosition??0;o>0?e.splice(o,0,r):e.unshift(r),this.pubSubService.publish("onPluginColumnsChanged",{columns:e,pluginName:this.pluginName})}}return this}getColumnDefinition(){const e=String(this._addonOptions?.columnId??this._defaults.columnId);return{id:e,name:"",behavior:"selectAndMove",excludeFromExport:!0,excludeFromColumnPicker:!0,excludeFromGridMenu:!0,excludeFromQuery:!0,excludeFromHeaderMenu:!0,field:e,reorderable:this._addonOptions.reorderable,resizable:!1,width:this._addonOptions.width||40,formatter:this.moveIconFormatter.bind(this)}}usabilityOverride(e){this._usabilityOverride=e}setOptions(e){this._addonOptions={...this._addonOptions,...e}}handleDragInit(e){e.stopImmediatePropagation()}handleDragEnd(e,a){if(this._dragging&&(this._dragging=!1,e.stopImmediatePropagation(),a.guide?.remove(),a.selectionProxy?.remove(),a.clonedSlickRow?.remove(),a.canMove)){const u={grid:this._grid,rows:a.selectedRows,insertBefore:a.insertBefore};"function"==typeof this._addonOptions.onMoveRows&&this._addonOptions.onMoveRows(e instanceof Wt?e.getNativeEvent():e,u),this.onMoveRows.notify(u)}}handleDrag(e,a){if(this._dragging){e.stopImmediatePropagation();const u=e.getNativeEvent(),r=(u?.touches?.[0]??u).pageY-Lu(this._canvas).top;a.selectionProxy.style.top=r-5+"px",a.selectionProxy.style.display="block",a.clonedSlickRow&&(a.clonedSlickRow.style.top=r-6+"px",a.clonedSlickRow.style.display="block");const o=Math.max(0,Math.min(Math.round(r/(this.gridOptions.rowHeight||0)),this._grid.getDataLength()));if(o!==a.insertBefore){const d={grid:this._grid,rows:a.selectedRows,insertBefore:o};if(!1===this._addonOptions?.onBeforeMoveRows?.(u,d)||!1===this.onBeforeMoveRows.notify(d).getReturnValue()?a.canMove=!1:a.canMove=!0,this._usabilityOverride&&a.canMove){const h=this._grid.getDataItem(o);a.canMove=this.checkUsabilityOverride(o,h,this._grid)}a.canMove?a.guide.style.top=o*(this.gridOptions.rowHeight||0)+"px":a.guide.style.top="-1000px",a.insertBefore=o}}}handleDragStart(e,a){const u=this._grid.getCellFromEvent(e)||{cell:-1,row:-1},i=u.row,r=this._grid.getDataItem(i);if(this.checkUsabilityOverride(i,r,this._grid)){if(this._addonOptions.cancelEditOnDrag&&this._grid.getEditorLock().isActive()&&this._grid.getEditorLock().cancelCurrentEdit(),this._grid.getEditorLock().isActive()||!/move|selectAndMove/.test(this._grid.getColumns()[u.cell].behavior||""))return!1;if(this._dragging=!0,e.stopImmediatePropagation(),!this.addonOptions.hideRowMoveShadow){const h=this._grid.getCellNode(u.row,u.cell)?.closest(".slick-row");h&&(a.clonedSlickRow=h.cloneNode(!0),a.clonedSlickRow.classList.add("slick-reorder-shadow-row"),a.clonedSlickRow.style.display="none",a.clonedSlickRow.style.marginLeft=Mc(this._addonOptions?.rowMoveShadowMarginLeft,"0px"),a.clonedSlickRow.style.marginTop=Mc(this._addonOptions?.rowMoveShadowMarginTop,"0px"),a.clonedSlickRow.style.opacity=`${this._addonOptions?.rowMoveShadowOpacity??.95}`,a.clonedSlickRow.style.transform=`scale(${this.addonOptions?.rowMoveShadowScale??.75})`,this._canvas.appendChild(a.clonedSlickRow))}let o=this._addonOptions.singleRowMove?[u.row]:this._grid.getSelectedRows();(0===o.length||!o.some(h=>h===u.row))&&(o=[u.row],this._addonOptions.disableRowSelection||this._grid.setSelectedRows(o));const d=this.gridOptions.rowHeight;a.selectedRows=o,a.selectionProxy=T("div",{className:"slick-reorder-proxy",style:{display:"none",position:"absolute",zIndex:"99999",width:`${this._canvas.clientWidth}px`,height:d*o.length+"px"}},this._canvas),a.guide=T("div",{className:"slick-reorder-guide",style:{position:"absolute",zIndex:"99999",width:`${this._canvas.clientWidth}px`,top:"-1000px"}},this._canvas),a.insertBefore=-1}}checkUsabilityOverride(e,a,u){return"function"!=typeof this._usabilityOverride||this._usabilityOverride(e,a,u)}moveIconFormatter(e,a,u,i,r,o){return this.checkUsabilityOverride(e,r,o)?{addClasses:"cell-reorder dnd",html:T("div",{className:this._addonOptions.cssClass||""})}:""}}class _he{get extensionList(){return this._extensionList}get gridOptions(){return this.sharedService.gridOptions||{}}constructor(e,a,u,i,r,o,d,h){this.extensionUtility=e,this.filterService=a,this.pubSubService=u,this.sharedService=i,this.sortService=r,this.treeDataService=o,this.translaterService=d,this.lazyGridService=h,this._extensionCreatedList={},this._extensionList={},this._requireInitExternalExtensions=[]}dispose(){if(this.sharedService.visibleColumns=[],"object"==typeof this._extensionList){const e=Object.keys(this._extensionList);e.forEach(a=>{if(this._extensionList.hasOwnProperty(a)){const u=this._extensionList[a];"function"==typeof u?.instance?.dispose&&u.instance.dispose()}}),e.forEach(a=>{delete this._extensionList[a]})}this._cellMenuPlugin=null,this._cellExcelCopyManagerPlugin=null,this._checkboxSelectColumn=null,this._contextMenuPlugin=null,this._columnPickerControl=null,this._draggleGroupingPlugin=null,this._gridMenuControl=null,this._groupItemMetadataProviderService=null,this._headerMenuPlugin=null,this._rowMoveManagerPlugin=null,this._rowSelectionModel=null,this._extensionCreatedList=null,this._extensionList={}}addExtensionToList(e,a){this._extensionList[e]=a}getAllColumns(){return this.sharedService.allColumns||[]}getVisibleColumns(){return this.sharedService.visibleColumns||[]}getCreatedExtensionByName(e){if(this._extensionCreatedList?.hasOwnProperty(e))return this._extensionCreatedList[e]}getExtensionByName(e){return this._extensionList?.[e]}getExtensionInstanceByName(e){return this.getExtensionByName(e)?.instance}autoResizeColumns(){this.sharedService.slickGrid.autosizeColumns()}bindDifferentExtensions(){if(this.gridOptions){if(this.gridOptions.enableTranslate&&this.translateItems(this.sharedService.allColumns,"nameKey","name"),this.gridOptions.enableRowBasedEdit){this._rowBasedEdit=this._rowBasedEdit||new HW(this.extensionUtility,this.pubSubService,this.gridOptions.rowBasedEditOptions);const e=this.lazyGridService?.();if(!e)throw new Error("[Slickgrid-Universal] the RowBasedEdit Plugin requires a GridService to be configured and available");this._rowBasedEdit.init(this.sharedService.slickGrid,e),this.gridOptions.rowBasedEditOptions?.onExtensionRegistered&&this.gridOptions.rowBasedEditOptions.onExtensionRegistered(this._rowBasedEdit),this._extensionList[Ea.rowBasedEdit]={name:Ea.rowBasedEdit,instance:this._rowBasedEdit}}if(this.gridOptions.enableAutoTooltip){const e=new hhe(this.gridOptions?.autoTooltipOptions);this.sharedService.slickGrid.registerPlugin(e),this._extensionList[Ea.autoTooltip]={name:Ea.autoTooltip,instance:e}}if(this.gridOptions.enableExcelCopyBuffer&&(this._cellExcelCopyManagerPlugin=new mhe,this._cellExcelCopyManagerPlugin.init(this.sharedService.slickGrid,this.sharedService.gridOptions.excelCopyBufferOptions),this.gridOptions.excelCopyBufferOptions?.onExtensionRegistered&&this.gridOptions.excelCopyBufferOptions.onExtensionRegistered(this._cellExcelCopyManagerPlugin),this._extensionList[Ea.cellExternalCopyManager]={name:Ea.cellExternalCopyManager,instance:this._cellExcelCopyManagerPlugin}),this.gridOptions.enableCellMenu&&(this._cellMenuPlugin=new Ehe(this.extensionUtility,this.pubSubService,this.sharedService),this.gridOptions.cellMenu?.onExtensionRegistered&&this.gridOptions.cellMenu.onExtensionRegistered(this._cellMenuPlugin),this._extensionList[Ea.cellMenu]={name:Ea.cellMenu,instance:this._cellMenuPlugin}),!this._rowSelectionModel&&(this.gridOptions.enableRowSelection||this.gridOptions.enableCheckboxSelector||this.gridOptions.enableRowDetailView||this.gridOptions.enableRowMoveManager)){if(!this._rowSelectionModel||!this.sharedService.slickGrid.getSelectionModel()){const e=this.gridOptions.rowSelectionOptions??{};this.gridOptions.enableRowMoveManager&&!1!==this.gridOptions.rowMoveManager?.dragToSelect&&(e.dragToSelect=!0),this._rowSelectionModel=new D7(e),this.sharedService.slickGrid.setSelectionModel(this._rowSelectionModel)}this._extensionList[Ea.rowSelection]={name:Ea.rowSelection,instance:this._rowSelectionModel}}if(this.gridOptions.enableCheckboxSelector){this._checkboxSelectColumn=this._checkboxSelectColumn||new BW(this.pubSubService,this.gridOptions.checkboxSelector),this._checkboxSelectColumn.init(this.sharedService.slickGrid);const a=this.getCreatedExtensionByName(Ea.checkboxSelector)?.instance;a&&(this.gridOptions.checkboxSelector?.onExtensionRegistered&&this.gridOptions.checkboxSelector.onExtensionRegistered(a),this._extensionList[Ea.checkboxSelector]={name:Ea.checkboxSelector,instance:this._checkboxSelectColumn})}if(this.gridOptions.enableColumnPicker&&(this._columnPickerControl=new rT(this.extensionUtility,this.pubSubService,this.sharedService),this.gridOptions.columnPicker?.onExtensionRegistered&&this.gridOptions.columnPicker.onExtensionRegistered(this._columnPickerControl),this._extensionList[Ea.columnPicker]={name:Ea.columnPicker,instance:this._columnPickerControl}),this.gridOptions.enableContextMenu&&(this._contextMenuPlugin=new xhe(this.extensionUtility,this.pubSubService,this.sharedService,this.treeDataService),this.gridOptions.contextMenu?.onExtensionRegistered&&this.gridOptions.contextMenu.onExtensionRegistered(this._contextMenuPlugin),this._extensionList[Ea.contextMenu]={name:Ea.contextMenu,instance:this._contextMenuPlugin}),this.gridOptions.enableDraggableGrouping&&(this._draggleGroupingPlugin&&(this._draggleGroupingPlugin.init(this.sharedService.slickGrid,this.gridOptions.draggableGrouping),this.gridOptions.draggableGrouping?.onExtensionRegistered&&this.gridOptions.draggableGrouping.onExtensionRegistered(this._draggleGroupingPlugin),this._extensionList[Ea.contextMenu]={name:Ea.contextMenu,instance:this._draggleGroupingPlugin}),this._extensionList[Ea.draggableGrouping]={name:Ea.draggableGrouping,instance:this._draggleGroupingPlugin}),this.gridOptions.enableGridMenu&&(this._gridMenuControl=new SW(this.extensionUtility,this.filterService,this.pubSubService,this.sharedService,this.sortService),this.gridOptions.gridMenu?.onExtensionRegistered&&this.gridOptions.gridMenu.onExtensionRegistered(this._gridMenuControl),this._extensionList[Ea.gridMenu]={name:Ea.gridMenu,instance:this._gridMenuControl}),this.gridOptions.enableHeaderButton){const e=new Dhe(this.extensionUtility,this.pubSubService,this.sharedService);this.gridOptions.headerButton?.onExtensionRegistered&&this.gridOptions.headerButton.onExtensionRegistered(e),this._extensionList[Ea.headerButton]={name:Ea.headerButton,instance:e}}this.gridOptions.enableHeaderMenu&&(this._headerMenuPlugin=new Che(this.extensionUtility,this.filterService,this.pubSubService,this.sharedService,this.sortService),this.gridOptions.headerMenu?.onExtensionRegistered&&this.gridOptions.headerMenu.onExtensionRegistered(this._headerMenuPlugin),this._extensionList[Ea.headerMenu]={name:Ea.headerMenu,instance:this._headerMenuPlugin}),this.gridOptions.enableRowMoveManager&&(this._rowMoveManagerPlugin=this._rowMoveManagerPlugin||new VW(this.pubSubService),this._rowMoveManagerPlugin.init(this.sharedService.slickGrid,this.gridOptions.rowMoveManager),this.getCreatedExtensionByName(Ea.rowMoveManager)?.instance&&(this._extensionList[Ea.rowMoveManager]={name:Ea.rowMoveManager,instance:this._rowMoveManagerPlugin})),this._requireInitExternalExtensions.length&&this._requireInitExternalExtensions.forEach(e=>{e.instance.init(this.sharedService.slickGrid,void 0)})}}createExtensionsBeforeGridCreation(e,a){const u=[];a.enableCheckboxSelector&&(this.getCreatedExtensionByName(Ea.checkboxSelector)||(this._checkboxSelectColumn=new BW(this.pubSubService,this.sharedService.gridOptions.checkboxSelector),u.push({name:Ea.checkboxSelector,instance:this._checkboxSelectColumn,columnIndexPosition:a?.checkboxSelector?.columnIndexPosition??u.length}))),a.enableRowMoveManager&&(this.getCreatedExtensionByName(Ea.rowMoveManager)||(this._rowMoveManagerPlugin=new VW(this.pubSubService),u.push({name:Ea.rowMoveManager,instance:this._rowMoveManagerPlugin,columnIndexPosition:a?.rowMoveManager?.columnIndexPosition??u.length}))),a.enableRowBasedEdit&&(this.getCreatedExtensionByName(Ea.rowBasedEdit)||(this._rowBasedEdit=new HW(this.extensionUtility,this.pubSubService),u.push({name:Ea.rowBasedEdit,instance:this._rowBasedEdit,columnIndexPosition:a?.rowMoveManager?.columnIndexPosition??u.length}))),a.preRegisterExternalExtensions&&a.preRegisterExternalExtensions(this.pubSubService).forEach(r=>{u.push(r),this._requireInitExternalExtensions.push(r)}),this.createExtensionByTheirColumnIndex(u,e,a),a.enableDraggableGrouping&&(this.getCreatedExtensionByName(Ea.draggableGrouping)||(this._draggleGroupingPlugin=new fhe(this.extensionUtility,this.pubSubService,this.sharedService),this._draggleGroupingPlugin&&(a.enableColumnReorder=this._draggleGroupingPlugin.setupColumnReorder.bind(this._draggleGroupingPlugin),this._extensionCreatedList[Ea.draggableGrouping]={name:Ea.draggableGrouping,instance:this._draggleGroupingPlugin})))}hideColumn(e){if("function"==typeof this.sharedService?.slickGrid?.getColumns){const a=this.sharedService.slickGrid.getColumnIndex(e.id);this.sharedService.visibleColumns=this.removeColumnByIndex(this.sharedService.slickGrid.getColumns(),a),this.sharedService.slickGrid.setColumns(this.sharedService.visibleColumns)}}refreshBackendDataset(e){this.extensionUtility.refreshBackendDataset(e)}removeColumnByIndex(e,a){return Array.isArray(e)?e.filter((u,i)=>a!==i):e}translateAllExtensions(e){this.translateCellMenu(),this.translateContextMenu(),this.translateHeaderMenu(),this.translateRowEditPlugin(),this.translateColumnHeaders(e)}translateCellMenu(){this._cellMenuPlugin?.translateCellMenu()}translateColumnPicker(){this._columnPickerControl?.translateColumnPicker()}translateContextMenu(){this._contextMenuPlugin?.translateContextMenu()}translateGridMenu(){this._gridMenuControl?.translateGridMenu()}translateHeaderMenu(){this._headerMenuPlugin?.translateHeaderMenu()}translateRowEditPlugin(){this._rowBasedEdit?.translate()}translateColumnHeaders(e,a){if(this.sharedService&&this.gridOptions&&this.gridOptions.enableTranslate&&(!this.translaterService||!this.translaterService.translate))throw new Error('[Slickgrid-Universal] requires a Translate Service to be installed and configured when the grid option "enableTranslate" is enabled.');e&&this.translaterService?.use&&this.translaterService.getCurrentLanguage()!==e&&this.translaterService.use(e);let u=a;u||(u=this.sharedService.columnDefinitions),this.translateItems(u,"nameKey","name"),this.translateItems(this.sharedService.allColumns,"nameKey","name"),this.translateItems(this.sharedService.allColumns,"columnGroupKey","columnGroup"),this.renderColumnHeaders(u,Array.isArray(a))}renderColumnHeaders(e,a=!1){let u=e;u||(u=this.sharedService.columnDefinitions),Array.isArray(u)&&this.sharedService.slickGrid?.setColumns&&((u.length>this.sharedService.allColumns.length||a)&&(this.sharedService.allColumns=u),this.sharedService.slickGrid.setColumns(u)),this.gridOptions.enableColumnPicker&&this._columnPickerControl&&(this._columnPickerControl.columns=this.sharedService.allColumns,this._columnPickerControl.translateColumnPicker()),this.gridOptions.enableGridMenu&&this._gridMenuControl&&(this._gridMenuControl.columns=this.sharedService.allColumns??[],this._gridMenuControl.recreateGridMenu(),this._gridMenuControl.translateGridMenu())}createExtensionByTheirColumnIndex(e,a,u){e.sort((i,r)=>(i?.columnIndexPosition??0)-(r?.columnIndexPosition??0)),e.forEach(i=>{const r=i.instance.create(a,u);r&&(this._extensionCreatedList[i.name]={name:i.name,instance:r})})}translateItems(e,a,u){if(this.gridOptions?.enableTranslate&&!this.translaterService?.translate)throw new Error('[Slickgrid-Universal] requires a Translate Service to be installed and configured when the grid option "enableTranslate" is enabled.');this.extensionUtility.translateItems(e,a,u)}}function OW(t,e,a){if(a&&(t?.hasOwnProperty(a)||e?.hasOwnProperty(a)))return t[a]===e||t===e[a]||t[a]===e[a];if("object"==typeof t&&"object"==typeof e&&Object.keys(t).length!==Object.keys(e).length)return!1;for(const u in t)if(t.hasOwnProperty(u)&&t[u]!==e[u])return!1;return!0}const Rh=(t,e,a)=>{switch(t.toUpperCase()){case"<":case"LT":return e":case"GT":return e>a;case">=":case"GE":return e>=a;case"!=":case"<>":case"NE":return e!==a;case"=":case"==":case"EQ":return e===a;case"IN":return!(!a||!Array.isArray(a))&&a.includes(e);case"NIN":case"NOT_IN":return!(!a||!Array.isArray(a))&&!a.includes(e);case"IN_CONTAINS":return!(!a||!Array.isArray(a)||"string"!=typeof e)&&a.some(u=>e.split(/[,]+/).map(i=>i.trim()).includes(u));case"NIN_CONTAINS":case"NOT_IN_CONTAINS":return!(!a||!Array.isArray(a)||"string"!=typeof e)&&!a.some(u=>e.split(/[,]+/).map(i=>i.trim()).includes(u));case"IN_COLLECTION":return!!(e&&a&&Array.isArray(e)&&Array.isArray(a))&&a.some(u=>e.includes(u));case"NOT_IN_COLLECTION":return!!(e&&a&&Array.isArray(e)&&Array.isArray(a))&&!a.some(u=>e.includes(u))}return!0},jW=(t,e)=>{let[a,u]=e;if(void 0===a&&!t.operator)return!0;t.cellValue=void 0===t.cellValue||null===t.cellValue?"":t.cellValue.toString();const i=t?.ignoreAccentOnStringFilterAndSort?xv(t.cellValue,!0):t.cellValue.toLowerCase();if("string"==typeof a&&(a=t?.ignoreAccentOnStringFilterAndSort?xv(a,!0):a.toLowerCase()),"string"==typeof u&&(u=t?.ignoreAccentOnStringFilterAndSort?xv(u,!0):u.toLowerCase()),t.operator===te.startsWithEndsWith&&void 0!==a&&void 0!==u)return function whe(t,[e,a]){return t.startsWith(e)&&t.endsWith(a)}(i,[a,u]);if(void 0!==a&&void 0!==u){let o=t?.operator??t.defaultFilterRangeOperator;o!==te.rangeInclusive&&o!==te.rangeExclusive&&(o=t.defaultFilterRangeOperator);const d=o===te.rangeInclusive,h=hT(d?">=":">",i,a,t.searchInputLastChar),m=hT(d?"<=":"<",i,u,t.searchInputLastChar);return h&&m}return hT(t.operator,i,a,t.searchInputLastChar)};function hT(t,e,a,u){return"*"===t||t===te.endsWith||"*z"===t?e.endsWith(a):""===t&&"*"===u||t===te.startsWith||"a*"===t?e.startsWith(a):""===t||t===te.contains?e.indexOf(a)>-1:"<>"===t||t===te.notContains?-1===e.indexOf(a):Rh(t||"==",e,a)}const GW=(t,e)=>{const a=parseFloat(t.cellValue),[u,i]=e;if(void 0===u&&!t.operator)return!0;if(void 0!==u&&void 0!==i){let r=t?.operator??t.defaultFilterRangeOperator;r!==te.rangeInclusive&&r!==te.rangeExclusive&&(r=t.defaultFilterRangeOperator);const o=r===te.rangeInclusive,d=Rh(o?">=":">",a,+u),h=Rh(o?"<=":"<",a,+i);return d&&h}return Rh(t.operator||"==",a,+u)};const KW=(t,e)=>JF(t.cellValue)===JF(e);const WW=t=>{const e=t.operator;let a;return a=!Array.isArray(t.cellValue)||"IN_COLLECTION"!==e&&"NOT_IN_COLLECTION"!==e?void 0===t.cellValue||null===t.cellValue?"":`${t.cellValue}`:t.cellValue.length?t.cellValue.map(u=>`${u}`):[],Rh(e||"IN",a,t.searchTerms||[])};function A7(t,e){let u;switch(UW(e)){case"boolean":u=function She(t){return JF(Array.isArray(t)&&t[0]||!1)}(t);break;case"date":u=function Mhe(t,e){const a=Array.isArray(t)&&t||[],i=tl(e||w.dateIso),r=[];if(2===a.length||"string"==typeof a[0]&&a[0].indexOf("..")>0){const o=2===a.length?a:a[0].split(".."),d=Array.isArray(o)&&o[0]||"",h=Array.isArray(o)&&o[1]||"",m=Tc(d,i,!0),g=Tc(h,i,!0);if(!m||!g)return[];r.push(m,g)}else{const o=Tc(a[0],i,!0);if(!o)return[];r.push(o)}return r}(t,e);break;case"number":u=function Bhe(t){const a=Array.isArray(t)&&t||[0],u=[];let i,r;if(2===a.length||"string"==typeof a[0]&&a[0].indexOf("..")>0){const o=2===a.length?a:a[0].split("..");i=parseFloat(Array.isArray(o)?o[0]:""),r=parseFloat(Array.isArray(o)?o[1]:"")}else i=parseFloat(a[0]);return Ma(i,!0)&&Ma(r,!0)?u.push(i,r):Ma(i,!0)&&u.push(i),u}(t);break;case"object":u=function The(t){return(Array.isArray(t)&&t.length>0?t[0]:"")||""}(t);break;case"string":u=function Ahe(t){let a=Array.isArray(t)&&t||[""];const u=[];let i,r;if(1===a.length&&"string"==typeof a[0]){const o=a[0];o.indexOf("..")>0?a=o.split(".."):o.indexOf("*")>0&&o.indexOf("*")0?t[0]:"";i=null==o?"":`${o}`}return void 0!==i&&void 0!==r?u.push(i,r):void 0!==i&&u.push(i),u}(t)}return u}function UW(t){switch(t){case w.boolean:return"boolean";case w.date:case w.dateIso:case w.dateUtc:case w.dateTime:case w.dateTimeIso:case w.dateTimeIsoAmPm:case w.dateTimeIsoAM_PM:case w.dateTimeShortIso:case w.dateEuro:case w.dateEuroShort:case w.dateTimeShortEuro:case w.dateTimeEuro:case w.dateTimeEuroAmPm:case w.dateTimeEuroAM_PM:case w.dateTimeEuroShort:case w.dateTimeEuroShortAmPm:case w.dateTimeEuroShortAM_PM:case w.dateUs:case w.dateUsShort:case w.dateTimeShortUs:case w.dateTimeUs:case w.dateTimeUsAmPm:case w.dateTimeUsAM_PM:case w.dateTimeUsShort:case w.dateTimeUsShortAmPm:case w.dateTimeUsShortAM_PM:return"date";case w.integer:case w.float:case w.number:return"number";case w.object:return"object";case w.string:case w.text:case w.password:case w.readonly:default:return"string"}}const JW_executeFilterConditionTest=(t,e)=>{if(function Fhe(t){switch(t&&t.toUpperCase()||""){case"IN":case"NIN":case"NOT_IN":case"IN_CONTAINS":case"NIN_CONTAINS":case"NOT_IN_CONTAINS":case"IN_COLLECTION":case"NOT_IN_COLLECTION":return!0;default:return!1}}(t.operator))return WW(t);switch(UW(t.filterSearchType||t.fieldType)){case"boolean":return KW(t,e);case"date":return function zhe(t,e){const u=tl(t&&(t.filterSearchType||t.fieldType)||w.dateIso),[i,r]=e,o=Tc(t.cellValue,u,!0);if(!i&&!r||!o)return!1;const d="ISO8601"===u||u.toLowerCase().includes("h")?o.valueOf():dK(new Date(o)).valueOf();if(i&&r){let m=t?.operator??t.defaultFilterRangeOperator;m!==te.rangeInclusive&&m!==te.rangeExclusive&&(m=t.defaultFilterRangeOperator);const g=m===te.rangeInclusive,v=Rh(g?">=":">",d,i.valueOf()),k=Rh(g?"<=":"<",d,r.valueOf());return v&&k}const h="ISO8601"===u||u.toLowerCase().includes("h")?i.valueOf():dK(new Date(i)).valueOf();return Rh(t.operator||"==",d,h)}(t,e||[]);case"number":return GW(t,e||[]);case"object":return((t,e)=>{if(void 0===e&&!t.operator)return!0;switch((t.operator||"").toUpperCase()){case"!=":case"<>":case"NE":return!OW(t.cellValue,e,t.dataKey);default:return OW(t.cellValue,e,t.dataKey)}})(t,e);default:return jW(t,e||[])}};class Nhe{constructor(e,a,u,i,r){this.filterFactory=e,this.pubSubService=a,this.sharedService=u,this.backendUtilities=i,this.rxjs=r,this._isFilterFirstRender=!0,this._firstColumnIdRendered="",this._filtersMetadata=[],this._columnFilters={},this._isTreePresetExecuted=!1,this._previousFilters=[],this._onSearchChange=new be,this._eventHandler=new Ut,this.rxjs&&(this.httpCancelRequests$=this.rxjs.createSubject())}get eventHandler(){return this._eventHandler}get isFilterFirstRender(){return this._isFilterFirstRender}get onSearchChange(){return this._onSearchChange}get _gridOptions(){return this._grid?.getOptions()??{}}get _columnDefinitions(){return this._grid?.getColumns()??[]}get _dataView(){return this._grid?.getData()??{}}addRxJsResource(e){this.rxjs=e}init(e){this._grid=e,this._gridOptions&&this._gridOptions.enableTreeData&&this._gridOptions.treeDataOptions&&this._grid.setSortColumns([{columnId:this._gridOptions.treeDataOptions.columnId,sortAsc:!0}])}dispose(){this._eventHandler.unsubscribeAll(),this.httpCancelRequests$&&this.rxjs?.isObservable(this.httpCancelRequests$)&&(this.httpCancelRequests$.next(),this.httpCancelRequests$.complete()),this.disposeColumnFilters(),this._onSearchChange=null}disposeColumnFilters(){if(this.removeAllColumnFiltersProperties(),Array.isArray(this._filtersMetadata)){let e=this._filtersMetadata.pop();for(;e;)"function"==typeof e?.destroy&&e.destroy(),e=this._filtersMetadata.pop()}}bindBackendOnFilter(e){this._filtersMetadata=[],this._eventHandler.subscribe(e.onHeaderRowCellRendered,(a,u)=>{u.column.id===this._firstColumnIdRendered&&(this._isFilterFirstRender=!1),this.addFilterTemplateToHeaderRow(u,this._isFilterFirstRender),""===this._firstColumnIdRendered&&(this._firstColumnIdRendered=u.column.id)}),this.subscribeToOnHeaderRowCellRendered(e),this._onSearchChange&&this._eventHandler.subscribe(this._onSearchChange,this.onBackendFilterChange.bind(this))}bindLocalOnFilter(e){var a=this;this._filtersMetadata=[],this._dataView.setFilterArgs({columnFilters:this._columnFilters,grid:this._grid,dataView:this._dataView}),this._dataView.setFilter(this.customLocalFilter.bind(this)),this._onSearchChange&&this._eventHandler.subscribe(this._onSearchChange,function(){var u=Su(function*(i,r){const o=r?.clearFilterTriggered??!1;o||(yield a.emitFilterChanged(zu.local,!0)),!0===a._gridOptions.enableTreeData&&(a._tmpPreFilteredData=a.preFilterTreeData(a._dataView.getItems(),a._columnFilters)),o||(yield a.emitFilterChanged(zu.local)),null!==r.columnId&&a._dataView.refresh(),a._previousFilters=a.extractBasicFilterDetails(a._columnFilters)});return function(i,r){return u.apply(this,arguments)}}()),this._eventHandler.subscribe(e.onHeaderRowCellRendered,(u,i)=>{this.addFilterTemplateToHeaderRow(i)}),this.subscribeToOnHeaderRowCellRendered(e)}clearFilterByColumnId(e,a){var u=this;return Su(function*(){yield u.pubSubService.publish("onBeforeFilterClear",{columnId:a},0);const i=u._gridOptions.backendServiceApi??!1,r=i?zu.remote:zu.local,o=Object.keys(u._columnFilters);let d;Array.isArray(o)&&(d=o.find(m=>m===`${a}`));const h=u._filtersMetadata.find(m=>m.columnDef.id===a);return h?.clear&&h.clear(!0),i&&void 0!==d&&u.onBackendFilterChange(e,{grid:u._grid,columnFilters:u._columnFilters}),yield u.emitFilterChanged(r),!0})()}clearFilters(e=!0){var a=this;return Su(function*(){e&&(yield a.pubSubService.publish("onBeforeFilterClear",!0,0)),a._filtersMetadata.forEach(i=>{i?.clear&&i.clear(!1)}),a.removeAllColumnFiltersProperties(),Array.isArray(a._columnDefinitions)&&a._columnDefinitions.forEach(i=>{i.filter?.searchTerms&&delete i.filter.searchTerms}),a._dataView&&a._grid&&(a._dataView.refresh(),a._grid.invalidate());const u=a._gridOptions.backendServiceApi;if(u&&e){const i={clearFilterTriggered:!0,shouldTriggerQuery:e,grid:a._grid,columnFilters:a._columnFilters},o=u.service.processOnFilterChanged(void 0,i),d=a._gridOptions.pagination?.totalItems??0;a.backendUtilities?.executeBackendCallback(u,o,i,new Date,d,{errorCallback:a.resetToPreviousSearchFilters.bind(a),successCallback:h=>a._previousFilters=a.extractBasicFilterDetails(h.columnFilters),emitActionChangedCallback:a.emitFilterChanged.bind(a)})}else a._previousFilters=a.extractBasicFilterDetails(a._columnFilters);e&&a.pubSubService.publish("onFilterCleared",!0)})()}customLocalFilter(e,a){const u=a?.grid,i=a?.columnFilters??{},r=this._gridOptions.enableTreeData??!1,o=this._gridOptions.treeDataOptions;if(r&&o){const d=o.collapsedPropName??ue.treeDataProperties.COLLAPSED_PROP,h=o.parentPropName??ue.treeDataProperties.PARENT_PROP,m=o?.childrenPropName??ue.treeDataProperties.CHILDREN_PROP,g=this._gridOptions.datasetIdPropertyName??"id",v=o.autoRecalcTotalsOnFilterChange??!1;let k=!1;if(null!==e[h]){let x=this._dataView.getItemById(e[h]);for(;x;){if(x[d]){if(!v)return!1;k=!0}x=this._dataView.getItemById(x[h])}}if(this._tmpPreFilteredData instanceof Set){const x=this._tmpPreFilteredData.has(e[g]);if(v){const D=zh(this.sharedService.hierarchicalDataset,C=>C[g]===e[g],m);if(D&&(D.__filteredOut=!x),k)return!1}return x}}else if("object"==typeof i)for(const d of Object.keys(i)){const h=i[d],m=h.columnDef?.filter;if("function"==typeof m?.filterPredicate){if(!m.filterPredicate(e,h))return!1}else{const g=this.preProcessFilterConditionOnDataContext(e,h,u);if("boolean"==typeof g)return g;let v=h?.parsedSearchTerms;if(void 0===v&&(v=A7(h.searchTerms,h.columnDef.type||w.string),void 0!==v&&(h.parsedSearchTerms=v)),!JW_executeFilterConditionTest(g,v))return!1}}return!0}parseFormInputFilterConditions(e,a){const u=cu(!0,[],e)||[];let i=Array.isArray(u)&&1===u.length?u[0]:"";const r=a.columnDef,o=r.filter?.type??r.type??w.string;let d=null;o!==w.object&&(i=null==i?"":`${i}`,d=!1!==(r.autoParseInputFilterOperator??this._gridOptions.autoParseInputFilterOperator)?i.match(/^((.*[^\\*\r\n])[*]{1}(.*[^*\r\n]))|^([<>!=*]{0,2})(.*[^<>!=*])([*]?)$/)||[]:[i,"","","","",i,""]);const h=d?.[2]||"",m=d?.[3]||"";let g=d?.[4]||a.operator,v=d?.[1]||d?.[5]||"";const k=d?.[6]||("*z"===g?"*":"");return"string"==typeof i&&(i=i.replace("'","''"),h&&m?(v=i,g=te.startsWithEndsWith):"*"===g||"*z"===g?g=te.endsWith:("a*"===g||"*"===k)&&(g=te.startsWith)),Array.isArray(d)&&d.length>=1&&Array.isArray(u)&&1===u.length&&(u[0]=v.length>0&&" "===v.substring(0,1)?v.substring(1):v),{dataKey:r.dataKey,fieldType:o,searchTerms:u||[],operator:g,searchInputLastChar:k,filterSearchType:r.filterSearchType,defaultFilterRangeOperator:this._gridOptions.defaultFilterRangeOperator}}preProcessFilterConditionOnDataContext(e,a,u){const i=a.columnDef,r=a.columnId;let o=u.getColumnIndex(r);if(!i&&this.sharedService&&Array.isArray(this.sharedService.allColumns)&&(o=this.sharedService.allColumns.findIndex(k=>k.field===r)),!i)return!0;if(this._gridOptions.enableRowDetailView){const k=this._gridOptions.rowDetailView&&this._gridOptions.rowDetailView.keyPrefix||"__";e[`${k}isPadding`]&&e[`${k}parent`]&&(e=e[`${k}parent`])}let d=i.filter?.queryField||i.queryFieldFilter||i.queryField||i.field||"";"function"==typeof i.queryFieldNameGetterFn&&(d=i.queryFieldNameGetterFn(e));const h=i.filter?.type??i.type??w.string;let m=e[d];d?.indexOf(".")>=0&&(m=ti(e,d));const g=a.operator,v=a.searchTerms||[];if(!v||Array.isArray(v)&&(0===v.length||1===v.length&&g===v[0]))return!0;if(v&&Array.isArray(v)&&h!==w.object)for(let k=0,x=v.length;k{x[F[d]]=F,delete x[F[d]].__used}),"object"==typeof a&&Object.keys(a).forEach(F=>{const A=a[F],z=A?.searchTerms?cu(!0,[],A.searchTerms):[],M=this.parseFormInputFilterConditions(z,A),L=A.columnDef,R=L?.filter?.type??L?.type??w.string,G=A7(M.searchTerms,R);void 0!==G&&(A.parsedSearchTerms=G)}),e.forEach(F=>{const A=F[o];let z=!0;for(const M of Object.keys(a)){const L=a[M],R=this.preProcessFilterConditionOnDataContext(F,L,this._grid);if(R){const G=L?.parsedSearchTerms,$="boolean"==typeof R?R:JW_executeFilterConditionTest(R,G);if($&&k&&A&&L.columnId===g){C.set(F[d],!0);break}if($||!v&&!0===C.get(F[r])){if(A&&L.columnId===g&&C.set(F[d],!0),$||!v&&L.columnId===g)continue}else A&&!0!==C.get(F[r])&&L.columnId!==g&&C.set(F[d],!1)}z=!1}if(z){D.add(F[d]);let M=x[F[r]]??!1;const L=!m;for(!this._isTreePresetExecuted&&Array.isArray(h)&&h.some(R=>R.itemId===M.id&&R.isCollapsed===L)&&(M[i]=L);M;)M.__used??D.add(M[d]),x[M[d]].__used=!0,M=x[M[r]]??!1}})),this._isTreePresetExecuted=!0,D}getColumnFilters(){return this._columnFilters}getPreviousFilters(){return this._previousFilters}getFiltersMetadata(){return this._filtersMetadata}getCurrentLocalFilters(){const e=[];if(this._columnFilters)for(const a of Object.keys(this._columnFilters)){const u=this._columnFilters[a],i={columnId:a||""},o=this.sharedService.allColumns.find(d=>d.id===i.columnId)?.filter?.emptySearchTermReturnAllValues??!0;u?.searchTerms&&(i.searchTerms=u.searchTerms),u.operator&&(i.operator=u.operator),u.targetSelector&&(i.targetSelector=u.targetSelector),Array.isArray(i.searchTerms)&&i.searchTerms.length>0&&(!o||""!==i.searchTerms[0])&&e.push(i)}return e}emitFilterChanged(e,a=!1){const u=a?"onBeforeFilterChange":"onFilterChanged";if(e===zu.remote&&this._gridOptions.backendServiceApi){let i=[];const r=this._gridOptions.backendServiceApi.service;return r?.getCurrentFilters&&(i=r.getCurrentFilters()),this.pubSubService.publish(u,i)}if(e===zu.local)return this.pubSubService.publish(u,this.getCurrentLocalFilters())}onBackendFilterChange(e,a){var u=this;return Su(function*(){const i=a?.shouldTriggerQuery;if(i&&(yield u.emitFilterChanged(zu.remote,!0)),!a||!a.grid)throw new Error('Something went wrong when trying to bind the "onBackendFilterChange(event, args)" function, it seems that "args" is not populated correctly');const r=u._gridOptions.backendServiceApi;if(!r||!r.process||!r.service)throw new Error('BackendServiceApi requires at least a "process" function and a "service" defined');const o=new Date;if(r.preProcess&&r.preProcess(),i){const d=yield r.service.processOnFilterChanged(e,a),h=u._gridOptions.pagination?.totalItems??0;u.backendUtilities?.executeBackendCallback(r,d,a,o,h,{errorCallback:u.resetToPreviousSearchFilters.bind(u),successCallback:m=>u._previousFilters=u.extractBasicFilterDetails(m.columnFilters),emitActionChangedCallback:u.emitFilterChanged.bind(u),httpCancelRequestSubject:u.httpCancelRequests$})}})()}populateColumnFilterSearchTermPresets(e){return Array.isArray(e)&&(this._columnDefinitions.forEach(a=>{a.filter?.searchTerms&&delete a.filter.searchTerms;const u=e.find(i=>i.columnId===a.id);u&&Array.isArray(u?.searchTerms)&&(a.filter=a.filter||{},a.filter.operator=u.operator||a.filter.operator||"",a.filter.searchTerms=u.searchTerms)}),this._gridOptions.enableTreeData&&this.refreshTreeDataFilters(),this._previousFilters=this.extractBasicFilterDetails(this._columnFilters)),this._columnDefinitions}refreshTreeDataFilters(e){const a=e??this._dataView?.getItems()??[];this._dataView&&this._gridOptions.enableTreeData&&a.length>0?(this._tmpPreFilteredData=this.preFilterTreeData(a,this._columnFilters),this._dataView.refresh()):0===a.length&&Array.isArray(this.sharedService.hierarchicalDataset)&&this.sharedService.hierarchicalDataset.length>0&&queueMicrotask(()=>this.refreshTreeDataFilters())}disableFilterFunctionality(e=!0,a=!0){const i=!this._gridOptions.enableFiltering;i!==e&&(a&&e&&this.clearFilters(),this.disableAllFilteringCommands(e),this._grid.setOptions({enableFiltering:i},!1,!0),this._grid.setHeaderRowVisibility(i),this._gridOptions.enableFiltering=!e,this.sharedService.gridOptions=this._gridOptions,this._grid.setColumns(this.sharedService.columnDefinitions))}resetToPreviousSearchFilters(){this.updateFilters(this._previousFilters,!1,!1,!1)}toggleFilterFunctionality(e=!0){const a=this._gridOptions.enableFiltering;this.disableFilterFunctionality(a,e)}toggleHeaderFilterRow(){let e=this._gridOptions.showHeaderRow??!1;e=!e,this._grid.setHeaderRowVisibility(e),!0===e&&this._grid.setColumns(this.sharedService.columnDefinitions)}setSortColumnIcons(e){this._grid&&Array.isArray(e)&&this._grid.setSortColumns(e)}updateFilters(e,a=!0,u=!0,i=!1){var r=this;return Su(function*(){if(!r._filtersMetadata||0===r._filtersMetadata.length||!r._gridOptions||!r._gridOptions.enableFiltering)throw new Error('[Slickgrid-Universal] in order to use "updateFilters" method, you need to have Filterable Columns defined in your grid and "enableFiltering" set in your Grid Options');if(Array.isArray(e)){r.clearFilters(!1),e.forEach(h=>{const m=r._filtersMetadata.find(g=>h.columnId===g.columnDef.id);if(h&&m){const g=h.operator||m.defaultOperator;r.updateColumnFilters(h.searchTerms,m.columnDef,g),m.setValues(h.searchTerms||[],g),(i||r._gridOptions.enableTreeData)&&r.callbackSearchEvent(void 0,{columnDef:m.columnDef,operator:g,searchTerms:h.searchTerms,shouldTriggerQuery:!0,forceOnSearchChangeEvent:!0})}});const o=r._gridOptions.backendServiceApi,d=o?zu.remote:zu.local;if(a&&(yield r.emitFilterChanged(d,!0)),r._dataView.refresh(),o){const h=o?.service;h?.updateFilters&&(h.updateFilters(e,!0),u&&r.backendUtilities?.refreshBackendDataset(r._gridOptions))}a&&(yield r.emitFilterChanged(d))}return!0})()}updateSingleFilter(e,a=!0,u=!0){var i=this;return Su(function*(){const r=i.sharedService.allColumns.find(o=>o.id===e.columnId);if(r&&e.columnId){i._columnFilters={};const o=r.filter?.emptySearchTermReturnAllValues??!0;Array.isArray(e.searchTerms)&&(e.searchTerms.length>1||1===e.searchTerms.length&&(!o||""!==e.searchTerms[0]))&&(i._columnFilters[e.columnId]={columnId:e.columnId,operator:e.operator,searchTerms:e.searchTerms,columnDef:r,type:r.type??w.string});const d=i._gridOptions.backendServiceApi,h=d?zu.remote:zu.local;if(a&&(yield i.emitFilterChanged(h,!0)),d){const m=d?.service;m?.updateFilters&&(m.updateFilters(i._columnFilters,!0),u&&i.backendUtilities?.refreshBackendDataset(i._gridOptions))}else i._dataView.setFilterArgs({columnFilters:i._columnFilters,grid:i._grid}),i._gridOptions.enableTreeData&&i.refreshTreeDataFilters(),i._dataView.refresh();a&&(yield i.emitFilterChanged(h))}return!0})()}drawFilterTemplate(e,a){let u;if("string"==typeof a){if(u=document.querySelector(a),null===u)return null}else u=a;const i="string"==typeof e?this.sharedService.allColumns.find(o=>o.id===e):e;if("selector"!==(i?.id??"")&&i?.filterable){let o,d;const h=this.filterFactory.createFilter(i.filter);d=i&&i.filter&&i.filter.operator||h&&h.operator,this._columnFilters[i.id]?(o=this._columnFilters[i.id].searchTerms||void 0,d=this._columnFilters[i.id].operator||void 0):i.filter&&(o=i.filter.searchTerms||void 0,this.updateColumnFilters(o,i,d));const m={grid:this._grid,operator:d,searchTerms:o,columnDef:i,filterContainerElm:u,callback:this.callbackSearchEvent.bind(this)};return h&&(h.init(m),o&&h.setValues&&h.setValues(o,d)),h}return null}addFilterTemplateToHeaderRow(e,a=!0){const u=e.column,i=u?.id??"";if("selector"!==i&&u?.filterable){let r,o;const d=this.filterFactory.createFilter(u.filter);o=u&&u.filter&&u.filter.operator||d&&d.operator,this._columnFilters[u.id]?(r=this._columnFilters[u.id].searchTerms||void 0,o=this._columnFilters[u.id].operator||void 0):u.filter&&(r=u.filter.searchTerms||void 0,this.updateColumnFilters(r,u,o));const h={grid:this._grid,operator:o,searchTerms:r,columnDef:u,filterContainerElm:this._grid.getHeaderRowColumn(i),callback:this.callbackSearchEvent.bind(this)};if(d){d.init(h,a);const m=this._filtersMetadata.findIndex(g=>d.columnDef.id===g.columnDef.id);-1===m?this._filtersMetadata.push(d):this._filtersMetadata[m]=d,r&&d.setValues&&d.setValues(r,o)}}}callbackSearchEvent(e,a){if(a){const u=e?.target?e.target.value:void 0,i=a.searchTerms&&Array.isArray(a.searchTerms)?a.searchTerms:u?[u]:void 0,r=a.columnDef||null,o=r?.id??"",d=r?.filter?.type??r?.type??w.string,h=a.operator||void 0,m=i&&Array.isArray(i),g=m&&i&&i.length,v={...this._columnFilters},k=r.filter?.emptySearchTermReturnAllValues??!0;let x;if(r&&o)if(!m||0===g||1===g&&Array.isArray(i)&&k&&""===i[0])delete this._columnFilters[o];else{const F=`${o}`,A={columnId:F,columnDef:r,parsedSearchTerms:[],type:d,targetSelector:this.getSelectorStringFromElement(e?.target)},z=this.parseFormInputFilterConditions(i,A);A.operator=h||z.operator||R2(d),x=A7(z.searchTerms,d),void 0!==x&&(A.parsedSearchTerms=x),A.searchTerms=z.searchTerms||[],this._columnFilters[F]=A}const D=e&&"function"!=typeof e.isPropagationStopped?cu({},new Wt,e):e,C=e?.key;if(this._onSearchChange&&(a.forceOnSearchChangeEvent||"Enter"===C||!H0(v,this._columnFilters))){const F={clearFilterTriggered:a.clearFilterTriggered,shouldTriggerQuery:a.shouldTriggerQuery,columnId:o,columnDef:r,columnFilters:this._columnFilters,operator:h||R2(d),searchTerms:i,parsedSearchTerms:x,grid:this._grid,target:e?.target};!1===this.pubSubService.publish("onBeforeSearchChange",F)?this._gridOptions.resetFilterSearchValueAfterOnBeforeCancellation&&this.resetToPreviousSearchFilters():this._onSearchChange.notify(F,D)}}}disableAllFilteringCommands(e=!0){const a=this._grid.getColumns();a.forEach(i=>{i?.header?.menu&&i.header.menu.commandItems?.forEach(r=>{r&&"string"!=typeof r&&"clear-filter"===r.command&&(r.hidden=e)})});const u=this._gridOptions.gridMenu?.commandItems;return u&&u.forEach(i=>{if(i&&"string"!=typeof i){const r=i.command;("clear-filter"===r||"toggle-filter"===r)&&(i.hidden=e)}}),a}extractBasicFilterDetails(e){const a=[];if(e&&"object"==typeof e)for(const u of Object.keys(e)){const{operator:i,searchTerms:r}=e[`${u}`];a.push({columnId:u,operator:i,searchTerms:r})}return a}getSelectorStringFromElement(e){return e?.localName?e?.className?`${e.localName}.${Array.from(e.classList).join(".")}`:e.localName:""}removeAllColumnFiltersProperties(){"object"==typeof this._columnFilters&&Object.keys(this._columnFilters).forEach(e=>{e&&this._columnFilters[e]&&delete this._columnFilters[e]})}subscribeToOnHeaderRowCellRendered(e){this._eventHandler.subscribe(e.onBeforeHeaderRowCellDestroy,(a,u)=>{this._filtersMetadata.find(r=>r.columnDef.id===u.column.id)?.destroy?.()})}updateColumnFilters(e,a,u){const i=a.filter?.type??a.type??w.string,r=A7(e,i);e&&a&&(this._columnFilters[a.id]={columnId:a.id,columnDef:a,searchTerms:e,operator:u,parsedSearchTerms:r,type:i})}}const w7={skipError:!1,triggerEvent:!0},cf={highlightRow:!0,resortGrid:!1,selectRow:!1,scrollRowIntoView:!0,skipError:!1,triggerEvent:!0},mT={highlightRow:!1,selectRow:!1,scrollRowIntoView:!1,skipError:!1,triggerEvent:!0},ZW={autoResizeColumns:!0,triggerEvent:!0,hideFromColumnPicker:!1,hideFromGridMenu:!1};class Ihe{constructor(e,a,u,i,r,o,d){this.gridStateService=e,this.filterService=a,this.pubSubService=u,this.paginationService=i,this.sharedService=r,this.sortService=o,this.treeDataService=d}get _dataView(){return this._grid?.getData()}get _gridOptions(){return this._grid?.getOptions()??{}}dispose(){this._rowSelectionPlugin?.dispose()}init(e){this._grid=e}clearAllFiltersAndSorts(){this.sortService&&this.sortService.clearSorting&&this.sortService.clearSorting(!1),this.filterService&&this.filterService.clearFilters&&this.filterService.clearFilters()}clearPinning(e=!0){const a=[...this.sharedService.visibleColumns];this.sharedService.slickGrid.setOptions({frozenColumn:-1,frozenRow:-1,frozenBottom:!1,enableMouseWheelScrollHandler:!1}),e&&Array.isArray(a)&&this.sharedService.slickGrid.setColumns(a)}setPinning(e,a=!0,u=!1,i=!0){qG(e)?this.clearPinning():(this.sharedService.slickGrid.setOptions(e,u,i),this.sharedService.gridOptions={...this.sharedService.gridOptions,...e}),a&&this.sharedService.slickGrid.autosizeColumns()}getAllColumnDefinitions(){return this.sharedService.allColumns}getVisibleColumnDefinitions(){return this.sharedService.visibleColumns}getColumnFromEventArguments(e){if(!(e&&e.grid&&e.grid.getColumns&&e.grid.getDataItem))throw new Error("[Slickgrid-Universal] To get the column definition and data, we need to have these arguments passed as objects (row, cell, grid)");return{row:e.row,cell:e.cell,columnDef:e.grid.getColumns()[e.cell],dataContext:e.grid.getDataItem(e.row),dataView:this._dataView,grid:this._grid}}getDataItemByRowNumber(e){if(!this._grid||"function"!=typeof this._grid.getDataItem)throw new Error('[Slickgrid-Universal] We could not find SlickGrid Grid object or it\'s "getDataItem" method');return this._grid.getDataItem(e)}getDataItemByRowIndex(e){if(!this._grid||"function"!=typeof this._grid.getDataItem)throw new Error('[Slickgrid-Universal] We could not find SlickGrid Grid object and/or "getDataItem" method');return this._grid.getDataItem(e)}getDataItemByRowIndexes(e){if(!this._grid||"function"!=typeof this._grid.getDataItem)throw new Error('[Slickgrid-Universal] We could not find SlickGrid Grid object and/or "getDataItem" method');const a=[];return Array.isArray(e)&&e.forEach(u=>{a.push(this._grid.getDataItem(u))}),a}getSelectedRows(){if(!this._grid||"function"!=typeof this._grid.getSelectedRows)throw new Error('[Slickgrid-Universal] We could not find SlickGrid Grid object and/or "getSelectedRows" method');return this._grid.getSelectedRows()}getSelectedRowsDataItem(){if(!this._grid||"function"!=typeof this._grid.getSelectedRows)throw new Error('[Slickgrid-Universal] We could not find SlickGrid Grid object and/or "getSelectedRows" method');const e=this._grid.getSelectedRows();return this.getDataItemByRowIndexes(e)}hideColumnById(e,a){if(a={...ZW,...a},this._grid&&this._grid.getColumns&&this._grid.setColumns){const u=this._grid.getColumns(),i=u.findIndex(r=>r.id===e);if(i>=0){const r=mL(u,i);this.sharedService.visibleColumns=r,this._grid.setColumns(r);const o=this.sharedService.allColumns.findIndex(d=>d.id===e);return o&&(a?.hideFromColumnPicker&&(this.sharedService.allColumns[o].excludeFromColumnPicker=!0),a?.hideFromGridMenu&&(this.sharedService.allColumns[o].excludeFromGridMenu=!0)),a?.autoResizeColumns&&this._grid.autosizeColumns(),a?.triggerEvent&&this.pubSubService.publish("onHeaderMenuHideColumns",{columns:r}),i}}return-1}hideColumnByIds(e,a){if(a={...ZW,...a},Array.isArray(e)){for(const u of e)this.hideColumnById(u,{...a,triggerEvent:!1,autoResizeColumns:!1});a?.autoResizeColumns&&this._grid.autosizeColumns(),a?.triggerEvent&&this.pubSubService.publish("onHeaderMenuHideColumns",{columns:this.sharedService.visibleColumns})}}highlightRow(e,a){this._grid.getSelectionModel()||(this._rowSelectionPlugin=new D7(this._gridOptions.rowSelectionOptions),this._grid.setSelectionModel(this._rowSelectionPlugin)),a||=this._gridOptions.rowHighlightDuration,Array.isArray(e)?e.forEach(u=>this._grid.highlightRow(u)):this._grid.highlightRow(e,a)}setSelectedRow(e){this._grid?.setSelectedRows&&this._grid.setSelectedRows([e])}setSelectedRows(e){this._grid?.setSelectedRows&&this._grid.setSelectedRows(e)}renderGrid(){"function"==typeof this._grid?.invalidate&&this._grid.invalidate()}resetGrid(e){if(this.clearPinning(!1),this._grid){const a=this.sharedService.allColumns||[];Array.isArray(a)&&a.length>0&&(this._grid.setColumns(a),this._gridOptions?.enableAutoSizeColumns&&this._grid.autosizeColumns(),this.gridStateService.resetColumns(e))}"function"==typeof this.filterService?.clearFilters&&this.filterService.clearFilters(),"function"==typeof this.sortService?.clearSorting&&this.sortService.clearSorting()}addItem(e,a){const u={...cf,...a};if(!(u?.skipError||this._grid&&this._gridOptions&&this._dataView))throw new Error("[Slickgrid-Universal] We could not find SlickGrid Grid, DataView objects");const i=this._gridOptions.datasetIdPropertyName||"id";if(!(u?.skipError||e&&e.hasOwnProperty(i)))throw new Error(`[Slickgrid-Universal] Adding an item requires the item to include an "${i}" property`);if(this._gridOptions?.enableTreeData&&"top"===a?.position)throw new Error('[Slickgrid-Universal] Please note that `addItem({ position: "top" })` is not supported when used with Tree Data because of the extra complexity.');const r=u?.position;"bottom"===r||this._gridOptions?.enableTreeData?this._dataView.addItem(e):this._dataView.insertItem(0,e);let o=0;const d=e?.[i]??"";return this._gridOptions?.enableTreeData?(this.invalidateHierarchicalDataset(),o=this._dataView.getRowById(d),u.scrollRowIntoView&&this._grid.scrollRowIntoView(o??0,!1)):u.resortGrid?(this._dataView.reSort(),o=this._dataView.getRowById(d)):(o="bottom"===r?this._dataView.getRowById(d):0,u.scrollRowIntoView&&this._grid.scrollRowIntoView(o??0)),u.highlightRow&&void 0!==o&&this.highlightRow(o),void 0!==o&&u.selectRow&&this._gridOptions&&(this._gridOptions.enableCheckboxSelector||this._gridOptions.enableRowSelection)&&this.setSelectedRow(o),u.triggerEvent&&this.pubSubService.publish("onItemAdded",e),!this._gridOptions?.backendServiceApi&&this._gridOptions.enablePagination&&("bottom"===r?this.paginationService.goToLastPage():this.paginationService.goToFirstPage()),o}addItems(e,a){const u={...cf,...a},i=this._gridOptions.datasetIdPropertyName||"id",r=u?.position,o=[];if(!Array.isArray(e))return[this.addItem(e,u)||0];if(this._dataView.beginUpdate(!0),"bottom"===r||this._gridOptions?.enableTreeData?this._dataView.addItems(e):this._dataView.insertItems(0,e),this._dataView.endUpdate(),this._gridOptions?.enableTreeData){this.invalidateHierarchicalDataset();const d=e[0]?.[i]??"",h=this._dataView.getRowById(d);u.scrollRowIntoView&&this._grid.scrollRowIntoView(h??0,!1)}else u.resortGrid&&this._dataView.reSort();return r&&u.scrollRowIntoView&&!this._gridOptions?.enableTreeData&&("bottom"===r?this._grid.navigateBottom():this._grid.navigateTop()),e.forEach(d=>o.push(this._dataView.getRowById(d[i]))),u.highlightRow&&this.highlightRow(o),u.selectRow&&this._gridOptions&&(this._gridOptions.enableCheckboxSelector||this._gridOptions.enableRowSelection)&&this.setSelectedRows(o),u.triggerEvent&&this.pubSubService.publish("onItemAdded",e),o}deleteItem(e,a){a={...w7,...a};const u=this._gridOptions.datasetIdPropertyName||"id";if(!(a?.skipError||e&&e.hasOwnProperty(u)))throw new Error(`[Slickgrid-Universal] Deleting an item requires the item to include an "${u}" property`);return this.deleteItemById(e[u],a)}deleteItems(e,a){a={...w7,...a};const u=this._gridOptions.datasetIdPropertyName||"id";if(!Array.isArray(e))return this.deleteItem(e,a),[e[u]];this._dataView.beginUpdate(!0);const i=[];return e.forEach(r=>{void 0!==r?.[u]&&i.push(r[u])}),this._dataView.deleteItems(i),this._dataView.endUpdate(),a.triggerEvent&&this.pubSubService.publish("onItemDeleted",e),i}deleteItemById(e,a){if(a={...w7,...a},!a?.skipError&&null==e)throw new Error('[Slickgrid-Universal] Cannot delete a row without a valid "id"');return!(this.gridStateService&&this.gridStateService.needToPreserveRowSelection())&&this._grid&&this._gridOptions&&(this._gridOptions.enableCheckboxSelector||this._gridOptions.enableRowSelection)&&this.setSelectedRows([]),this._dataView.deleteItem(e),a.triggerEvent&&this.pubSubService.publish("onItemDeleted",e),e}deleteItemByIds(e,a){if(a={...w7,...a},Array.isArray(e)){this._dataView.beginUpdate(!0);for(let u=0;u{const d=o&&o.hasOwnProperty(u)?o[u]:void 0;if(r.push(d),void 0!==this._dataView.getIdxById(d)){const h=this._dataView.getRowById(d);void 0!==h&&(i.push(h),this._grid.updateRow(h))}}),this._dataView.updateItems(r,e),this._dataView.endUpdate(),this._gridOptions?.enableTreeData&&this.invalidateHierarchicalDataset(),a.highlightRow&&this.highlightRow(i),a.selectRow&&this._gridOptions&&(this._gridOptions.enableCheckboxSelector||this._gridOptions.enableRowSelection)&&this.setSelectedRows(i),a.triggerEvent&&this.pubSubService.publish("onItemUpdated",e),i}updateItemById(e,a,u){if(u={...mT,...u},!u?.skipError&&void 0===e)throw new Error('[Slickgrid-Universal] Cannot update a row without a valid "id"');const i=this._dataView.getRowById(e);if(!u?.skipError&&!a&&!this._gridOptions.enablePagination)throw new Error(`[Slickgrid-Universal] The item to update in the grid was not found with id: ${e}`);return void 0!==this._dataView.getIdxById(e)&&(this._dataView.updateItem(e,a),void 0!==i&&this._grid.updateRow(i),this._gridOptions?.enableTreeData&&this.invalidateHierarchicalDataset(),u.scrollRowIntoView&&void 0!==i&&this._grid.scrollRowIntoView(i),u.highlightRow&&void 0!==i&&this.highlightRow(i),void 0!==i&&u.selectRow&&this._gridOptions&&(this._gridOptions.enableCheckboxSelector||this._gridOptions.enableRowSelection)&&this.setSelectedRow(i),u.triggerEvent&&this.pubSubService.publish("onItemUpdated",a)),i}upsertItem(e,a){a={...cf,...a};const u=this._gridOptions.datasetIdPropertyName||"id",i=e&&e.hasOwnProperty(u)?e[u]:void 0;if(!a?.skipError&&void 0===i)throw new Error(`[Slickgrid-Universal] Calling Upsert of an item requires the item to include an "${u}" property`);return this.upsertItemById(i,e,a)}upsertItems(e,a){if(a={...cf,...a},!Array.isArray(e))return[this.upsertItem(e,a)];this._dataView.beginUpdate(!0);const u=[];e.forEach(r=>{u.push(this.upsertItem(r,{...a,highlightRow:!1,resortGrid:!1,selectRow:!1,triggerEvent:!1}))}),this._dataView.endUpdate();const i=u.map(r=>void 0!==r.added?r.added:r.updated);if(a.highlightRow&&this.highlightRow(i),a.selectRow&&this._gridOptions&&(this._gridOptions.enableCheckboxSelector||this._gridOptions.enableRowSelection)&&this.setSelectedRows(i),a.triggerEvent){this.pubSubService.publish("onItemUpserted",e);const r=u.filter(d=>void 0!==d.added);Array.isArray(r)&&r.length>0&&this.pubSubService.publish("onItemAdded",r);const o=u.filter(d=>void 0!==d.updated);Array.isArray(o)&&o.length>0&&this.pubSubService.publish("onItemUpdated",o)}return u}upsertItemById(e,a,u){let r,o,i=!1;if(u={...cf,...u},!u?.skipError&&void 0===e&&!this.hasRowSelectionEnabled())throw new Error('[Slickgrid-Universal] Calling Upsert of an item requires the item to include a valid and unique "id" property');return void 0===this._dataView.getRowById(e)?(r=this.addItem(a,u),i=!0):(o=this.updateItem(a,{highlightRow:u.highlightRow,selectRow:u.selectRow,triggerEvent:u.triggerEvent}),i=!1),u.triggerEvent&&(this.pubSubService.publish("onItemUpserted",a),i?this.pubSubService.publish("onItemAdded",a):this.pubSubService.publish("onItemUpdated",a)),{added:r,updated:o}}invalidateHierarchicalDataset(e){if(this._gridOptions?.enableTreeData&&this.treeDataService){const a=e??this._dataView.getItems(),u=this.sortService.getCurrentColumnSorts(),i=this.treeDataService.convertFlatParentChildToTreeDatasetAndSort(a||[],this.sharedService.allColumns,this._gridOptions,u);this.sharedService.hierarchicalDataset=i.hierarchical,this.filterService.refreshTreeDataFilters(e),this._dataView.setItems(i.flat),this._grid.invalidate()}}hasRowSelectionEnabled(){const e=this._grid.getSelectionModel();return!(!this._gridOptions.enableRowSelection&&!this._gridOptions.enableCheckboxSelector||!e)}}class Rhe{get eventHandler(){return this._eventHandler}constructor(){this._eventHandler=new Ut}dispose(){this._eventHandler.unsubscribeAll()}bindOnBeforeEditCell(e){const a=e?.getData();this._eventHandler.subscribe(e.onBeforeEditCell,(u,i)=>{if(!(u&&i&&e&&void 0!==i.cell&&e.getColumns&&e.getDataItem))return;const r=e.getColumns()[i.cell];if("function"==typeof r.onBeforeEditCell){const o={row:i.row,cell:i.cell,dataView:a,grid:e,columnDef:r,dataContext:e.getDataItem(i.row)};r.onBeforeEditCell(u instanceof Wt?u.getNativeEvent():u,o)}})}bindOnCellChange(e){const a=e?.getData();this._eventHandler.subscribe(e.onCellChange,(u,i)=>{if(!(u&&i&&e&&void 0!==i.cell&&e.getColumns&&e.getDataItem))return;const r=e.getColumns()[i.cell];if("function"==typeof r.onCellChange){const o={row:i.row,cell:i.cell,dataView:a,grid:e,columnDef:r,dataContext:e.getDataItem(i.row)};r.onCellChange(u instanceof Wt?u.getNativeEvent():u,o)}})}bindOnClick(e){const a=e?.getData();this._eventHandler.subscribe(e.onClick,(u,i)=>{if(!(u&&i&&e&&void 0!==i.cell&&e.getColumns&&e.getDataItem))return;const r=e.getColumns()[i.cell];if("function"==typeof r.onCellClick){const o={row:i.row,cell:i.cell,dataView:a,grid:e,columnDef:r,dataContext:e.getDataItem(i.row)};r.onCellClick(u instanceof Wt?u.getNativeEvent():u,o)}})}}class Hhe{constructor(e,a,u,i,r,o){this.extensionService=e,this.filterService=a,this.pubSubService=u,this.sharedService=i,this.sortService=r,this.treeDataService=o,this._columns=[],this._subscriptions=[],this._selectedRowIndexes=[],this._selectedRowDataContextIds=[],this._wasRecheckedAfterPageChange=!0,this._eventHandler=new Ut}get _dataView(){return this._grid?.getData()??{}}get _gridOptions(){return this._grid?.getOptions()??{}}get selectedRowDataContextIds(){return this._selectedRowDataContextIds}set selectedRowDataContextIds(e){this._selectedRowDataContextIds=e}init(e){this._grid=e,this.subscribeToAllGridChanges(e)}dispose(){this._columns=[],this._eventHandler.unsubscribeAll(),this.pubSubService.unsubscribeAll(this._subscriptions)}changeColumnsArrangement(e,a=!0,u=!1){if(Array.isArray(e)&&e.length>0){const i=this.getAssociatedGridColumns(this._grid,e);if(i&&Array.isArray(i)&&i.length>0){if(Array.isArray(this.sharedService.allColumns)){const r=[];if(this._gridOptions.enableCheckboxSelector){const o=this._gridOptions?.checkboxSelector?.columnIndexPosition??0;r.push({columnId:"_checkbox_selector",columnIndexPosition:o})}if(this._gridOptions.enableRowDetailView){const o=this._gridOptions?.rowDetailView?.columnIndexPosition??0;r.push({columnId:"_detail_selector",columnIndexPosition:o})}if(this._gridOptions.enableRowMoveManager){const o=this._gridOptions?.rowMoveManager?.columnIndexPosition??0;r.push({columnId:"_move",columnIndexPosition:o})}this.addColumnDynamicWhenFeatureEnabled(r,this.sharedService.allColumns,i)}i.forEach(r=>r.originalWidth=r.width||r.originalWidth),this._grid.setColumns(i),this.sharedService.visibleColumns=i,a?this._grid.autosizeColumns():(u||this._gridOptions.enableAutoResizeColumnsByCellContent&&!this._gridOptions.autosizeColumnsByCellContentOnFirstLoad)&&this.pubSubService.publish("onFullResizeByContentRequested",{caller:"GridStateService"})}}}getCurrentGridState(){const{frozenColumn:e,frozenRow:a,frozenBottom:u}=this.sharedService.gridOptions,i={columns:this.getCurrentColumns(),filters:this.getCurrentFilters(),sorters:this.getCurrentSorters(),pinning:{frozenColumn:e,frozenRow:a,frozenBottom:u}},r=this.getCurrentPagination();if(r&&(i.pagination=r),this.hasRowSelectionEnabled()){const o=this.getCurrentRowSelections();o&&(i.rowSelection=o)}if(this._gridOptions?.enableTreeData){const o=this.getCurrentTreeDataToggleState();o&&(i.treeData=o)}return i}getColumns(){return this._columns}getAssociatedCurrentColumns(e){const a=[];return e&&Array.isArray(e)&&e.forEach(u=>{u?.id&&a.push({columnId:u.id,cssClass:u.cssClass||"",headerCssClass:u.headerCssClass||"",width:u.width||0})}),a}getAssociatedGridColumns(e,a){const u=[],i=this.sharedService.allColumns||e.getColumns();return a&&Array.isArray(a)&&a.forEach(r=>{const o=i.find(d=>d.id===r.columnId);o?.id&&u.push({...o,cssClass:r.cssClass||o.cssClass,headerCssClass:r.headerCssClass||o.headerCssClass,width:r.width})}),this._columns=u,u}getCurrentColumns(){return this.getAssociatedCurrentColumns(this._grid.getColumns()||[])}getCurrentFilters(){if(this._gridOptions?.backendServiceApi){const e=this._gridOptions.backendServiceApi.service;if(e?.getCurrentFilters)return e.getCurrentFilters()}else if(this.filterService?.getCurrentLocalFilters)return this.filterService.getCurrentLocalFilters();return null}getCurrentPagination(){if(this._gridOptions?.enablePagination){if(!this._gridOptions.backendServiceApi)return this.sharedService.currentPagination;{const e=this._gridOptions.backendServiceApi.service;if(e?.getCurrentPagination)return e.getCurrentPagination()}}return null}getCurrentRowSelections(){return this._grid&&this._dataView&&this.hasRowSelectionEnabled()?{gridRowIndexes:this._grid.getSelectedRows()||[],dataContextIds:this._dataView.getAllSelectedIds()||[],filteredDataContextIds:this._dataView.getAllSelectedFilteredIds()||[]}:null}getCurrentSorters(){if(this._gridOptions?.backendServiceApi){const e=this._gridOptions.backendServiceApi.service;if(e?.getCurrentSorters)return e.getCurrentSorters()}else if(this.sortService?.getCurrentLocalSorters)return this.sortService.getCurrentLocalSorters();return null}getCurrentTreeDataToggleState(){return this._gridOptions?.enableTreeData&&this.treeDataService?this.treeDataService.getCurrentToggleState():null}needToPreserveRowSelection(){let e=!1;if(this._gridOptions?.dataView&&this._gridOptions.dataView.hasOwnProperty("syncGridSelection")){const a=this._gridOptions.dataView.syncGridSelection;"boolean"==typeof a?e=this._gridOptions.dataView.syncGridSelection:"object"==typeof a&&(e=a.preserveHidden||a.preserveHiddenOnSelectionChange),e&&this._gridOptions.backendServiceApi&&this._gridOptions.dataView.hasOwnProperty("syncGridSelectionWithBackendService")&&(e=this._gridOptions.dataView.syncGridSelectionWithBackendService)}return e}resetColumns(e){const a=e||this._columns,u=this.getAssociatedCurrentColumns(a);this.pubSubService.publish("onGridStateChanged",{change:{newValues:u,type:Er.columns},gridState:this.getCurrentGridState()})}resetToOriginalColumns(e=!0){this._grid.setColumns(this.sharedService.allColumns),this.sharedService.visibleColumns=this.sharedService.allColumns,e&&this._grid.autosizeColumns()}resetRowSelectionWhenRequired(){!this.needToPreserveRowSelection()&&(this._gridOptions.enableRowSelection||this._gridOptions.enableCheckboxSelector)&&this.extensionService?.getExtensionByName?.(Ea.rowSelection)?.instance&&this._grid.setSelectedRows([])}subscribeToAllGridChanges(e){this._subscriptions.push(this.pubSubService.subscribe("onFilterChanged",a=>{this.resetRowSelectionWhenRequired(),this.pubSubService.publish("onGridStateChanged",{change:{newValues:a,type:Er.filter},gridState:this.getCurrentGridState()})})),this._subscriptions.push(this.pubSubService.subscribe("onFilterCleared",()=>{this.resetRowSelectionWhenRequired(),this.pubSubService.publish("onGridStateChanged",{change:{newValues:[],type:Er.filter},gridState:this.getCurrentGridState()})})),this._subscriptions.push(this.pubSubService.subscribe("onSortChanged",a=>{this.resetRowSelectionWhenRequired(),this.pubSubService.publish("onGridStateChanged",{change:{newValues:a,type:Er.sorter},gridState:this.getCurrentGridState()})})),this._subscriptions.push(this.pubSubService.subscribe("onSortCleared",()=>{this.resetRowSelectionWhenRequired(),this.pubSubService.publish("onGridStateChanged",{change:{newValues:[],type:Er.sorter},gridState:this.getCurrentGridState()})})),this.bindExtensionAddonEventToGridStateChange(Ea.columnPicker,"onColumnsChanged"),this.bindExtensionAddonEventToGridStateChange(Ea.gridMenu,"onColumnsChanged"),this.bindSlickGridColumnChangeEventToGridStateChange("onColumnsReordered",e),this.bindSlickGridColumnChangeEventToGridStateChange("onColumnsResized",e),this.bindSlickGridOnSetOptionsEventToGridStateChange(e),(this._gridOptions.enableRowSelection||this._gridOptions.enableCheckboxSelector)&&this._eventHandler.subscribe(this._dataView.onSelectedRowIdsChanged,(a,u)=>{const i=(this._selectedRowIndexes||[]).slice(),r=(this.selectedRowDataContextIds||[]).slice();if(this.selectedRowDataContextIds=u.filteredIds,this._selectedRowIndexes=u.rows,!H0(this.selectedRowDataContextIds,r)||!H0(this._selectedRowIndexes,i)){const o={gridRowIndexes:this._selectedRowIndexes||[],dataContextIds:u.selectedRowIds,filteredDataContextIds:u.filteredIds};this.pubSubService.publish("onGridStateChanged",{change:{newValues:o,type:Er.rowSelection},gridState:this.getCurrentGridState()})}}),this._subscriptions.push(this.pubSubService.subscribe("onHeaderMenuHideColumns",a=>{const u=this.getAssociatedCurrentColumns(a);this.pubSubService.publish("onGridStateChanged",{change:{newValues:u,type:Er.columns},gridState:this.getCurrentGridState()})})),this._subscriptions.push(this.pubSubService.subscribe("onTreeItemToggled",a=>{this.pubSubService.publish("onGridStateChanged",{change:{newValues:a,type:Er.treeData},gridState:this.getCurrentGridState()})})),this._subscriptions.push(this.pubSubService.subscribe("onTreeFullToggleEnd",a=>{this.pubSubService.publish("onGridStateChanged",{change:{newValues:a,type:Er.treeData},gridState:this.getCurrentGridState()})}))}addColumnDynamicWhenFeatureEnabled(e,a,u){e.sort((i,r)=>i.columnIndexPosition-r.columnIndexPosition),e.forEach(i=>{const r=a.findIndex(d=>d.id===i.columnId),o=u.findIndex(d=>d.id===i.columnId);if(r>=0&&-1===o){const d=a[r];0===r?u.unshift(d):u.splice(r,0,d)}})}bindExtensionAddonEventToGridStateChange(e,a){const i=this.extensionService?.getExtensionByName?.(e)?.instance?.[a];i&&"function"==typeof i.subscribe&&this._eventHandler.subscribe(i,(r,o)=>{const d=o?.columns,h=this.getAssociatedCurrentColumns(d);this.pubSubService.publish("onGridStateChanged",{change:{newValues:h,type:Er.columns},gridState:this.getCurrentGridState()})})}bindSlickGridColumnChangeEventToGridStateChange(e,a){const u=a?.[e];u&&"function"==typeof u.subscribe&&this._eventHandler.subscribe(u,()=>{const i=a.getColumns(),r=this.getAssociatedCurrentColumns(i);this.pubSubService.publish("onGridStateChanged",{change:{newValues:r,type:Er.columns},gridState:this.getCurrentGridState()})})}bindSlickGridOnSetOptionsEventToGridStateChange(e){const a=e.onSetOptions;this._eventHandler.subscribe(a,(u,i)=>{const{frozenBottom:r,frozenColumn:o,frozenRow:d}=i.optionsBefore,{frozenBottom:h,frozenColumn:m,frozenRow:g}=i.optionsAfter;if(r!==h||o!==m||d!==g){const v={frozenBottom:h,frozenColumn:m,frozenRow:g},k=this.getCurrentGridState();this.pubSubService.publish("onGridStateChanged",{change:{newValues:v,type:Er.pinning},gridState:k})}})}hasRowSelectionEnabled(){const e=this._grid.getSelectionModel();return!(!this._gridOptions.enableRowSelection&&!this._gridOptions.enableCheckboxSelector||!e)}}class Vhe{constructor(e,a){this.extensionUtility=e,this.pubSubService=a,this._subscriptions=[],this._eventHandler=new Ut}get _dataView(){return this._grid?.getData()??{}}get eventHandler(){return this._eventHandler}get _gridOptions(){return this._grid?.getOptions()??{}}get _columnDefinitions(){return this._grid?.getColumns()??[]}init(e){if(this._grid=e,e&&this._gridOptions&&this._gridOptions.createPreHeaderPanel){this._gridOptions.enableTranslate&&this.translateGroupingAndColSpan(),this._eventHandler.subscribe(e.onSort,()=>this.renderPreHeaderRowGroupingTitles()),this._eventHandler.subscribe(e.onRendered,()=>this.renderPreHeaderRowGroupingTitles()),this._eventHandler.subscribe(e.onAutosizeColumns,()=>this.renderPreHeaderRowGroupingTitles()),this._eventHandler.subscribe(e.onColumnsResized,()=>this.renderPreHeaderRowGroupingTitles()),this._eventHandler.subscribe(e.onColumnsReordered,()=>this.renderPreHeaderRowGroupingTitles()),this._eventHandler.subscribe(this._dataView.onRowCountChanged,()=>this.delayRenderPreHeaderRowGroupingTitles(0)),this._subscriptions.push(this.pubSubService.subscribe("onColumnPickerColumnsChanged",()=>this.renderPreHeaderRowGroupingTitles()),this.pubSubService.subscribe("onHeaderMenuHideColumns",()=>this.delayRenderPreHeaderRowGroupingTitles(0)),this.pubSubService.subscribe("onGridMenuColumnsChanged",()=>this.renderPreHeaderRowGroupingTitles()),this.pubSubService.subscribe("onGridMenuMenuClose",()=>this.renderPreHeaderRowGroupingTitles()));const a=e.getPluginByName("Resizer");a?.onGridAfterResize&&this._eventHandler.subscribe(a.onGridAfterResize,()=>this.renderPreHeaderRowGroupingTitles()),this._eventHandler.subscribe(e.onSetOptions,(u,i)=>{i?.optionsBefore?.frozenColumn!==i?.optionsAfter?.frozenColumn&&this.delayRenderPreHeaderRowGroupingTitles(0)}),this.delayRenderPreHeaderRowGroupingTitles(75)}}dispose(){this._eventHandler.unsubscribeAll(),this.pubSubService.unsubscribeAll(this._subscriptions)}delayRenderPreHeaderRowGroupingTitles(e=0){setTimeout(()=>this.renderPreHeaderRowGroupingTitles(),e)}renderPreHeaderRowGroupingTitles(){const e=this._columnDefinitions.length;if(void 0!==this._gridOptions?.frozenColumn&&this._gridOptions.frozenColumn>=0){const a=this._gridOptions.frozenColumn;this.renderHeaderGroups(this._grid.getPreHeaderPanelLeft(),0,a+1),this.renderHeaderGroups(this._grid.getPreHeaderPanelRight(),a+1,e)}else this.renderHeaderGroups(this._grid.getPreHeaderPanel(),0,e)}renderHeaderGroups(e,a,u){_t(e),e.className="slick-header-columns",e.style.left="-1000px",e.style.width=`${this._grid.getHeadersWidth()}px`,e.parentElement?.classList.add("slick-header");const i=this._grid.getHeaderColumnWidthDiff();let r,o=null,d="",h=0;const m=this._gridOptions?.frozenHeaderWidthCalcDifferential??0,g=void 0!==this._gridOptions?.frozenColumn&&this._gridOptions.frozenColumn>=0;for(let v=a;v0?(h+=r.width||0,o?.style&&(o.style.width=h-i-m+"px")):(h=r.width||0,o=T("div",{className:"slick-state-default slick-header-column "+(g?"frozen":""),dataset:{group:r.columnGroup},style:{width:h-i+"px"}}),T("span",{className:"slick-column-name",textContent:r.columnGroup||""},o),e.appendChild(o)),d=r.columnGroup||"")}translateGroupingAndColSpan(){const e=this._grid.getColumns();this.extensionUtility.translateItems(e,"columnGroupKey","columnGroup"),this._grid.setColumns(e),this.renderPreHeaderRowGroupingTitles()}}class Ohe{constructor(e,a,u,i){this.pubSubService=e,this.sharedService=a,this.backendUtilities=u,this.rxjs=i,this._initialized=!1,this._isLocalGrid=!0,this._dataFrom=1,this._dataTo=1,this._itemsPerPage=0,this._pageCount=1,this._pageNumber=1,this._totalItems=0,this._availablePageSizes=[],this._subscriptions=[],this._isCursorBased=!1,this._eventHandler=new Ut}get dataView(){return this.grid?.getData()??{}}set paginationOptions(e){this._paginationOptions=e}get paginationOptions(){return this._paginationOptions}get availablePageSizes(){return this._availablePageSizes}get dataFrom(){return this._dataFrom}get dataTo(){return this._dataTo}get itemsPerPage(){return this._itemsPerPage}get pageCount(){return this._pageCount}get pageNumber(){return this._pageNumber}get totalItems(){return this._totalItems}set totalItems(e){this._totalItems=e,this._initialized&&this.refreshPagination()}get isCursorBased(){return this._isCursorBased}addRxJsResource(e){this.rxjs=e}init(e,a,u){if(this._availablePageSizes=a.pageSizes||[],this.grid=e,this._backendServiceApi=u,this._paginationOptions=a,this._isLocalGrid=!u,this._pageNumber=a.pageNumber||1,this._isCursorBased=u?.options?.useCursor??!1,u&&(!u.service||!u.process))throw new Error('BackendServiceApi requires the following 2 properties "process" and "service" to be defined.');this._isLocalGrid&&this.dataView&&(this._eventHandler.subscribe(this.dataView.onPagingInfoChanged,(r,o)=>{this._totalItems!==o.totalRows&&(this.updateTotalItems(o.totalRows),this._previousPagination={pageNumber:o.pageNum,pageSize:o.pageSize,pageSizes:this.availablePageSizes,totalItems:o.totalRows})}),queueMicrotask(()=>{this.dataView&&(this.dataView.setRefreshHints({isFilterUnchanged:!0}),this.dataView.setPagingOptions({pageSize:this.paginationOptions.pageSize,pageNum:this._pageNumber-1}))})),this._subscriptions.push(this.pubSubService.subscribe("onFilterChanged",()=>this.resetPagination())),this._subscriptions.push(this.pubSubService.subscribe("onFilterCleared",()=>this.resetPagination())),u?.options?.infiniteScroll&&this._subscriptions.push(this.pubSubService.subscribe("onSortChanged",()=>this.resetPagination())),this.dataView&&(this._subscriptions.push(this.pubSubService.subscribe("onItemAdded",r=>this.processOnItemAddedOrRemoved(r,!0))),this._subscriptions.push(this.pubSubService.subscribe("onItemDeleted",r=>this.processOnItemAddedOrRemoved(r,!1)))),this.refreshPagination(!1,!1,!0);const i=this.getFullPagination();this._previousPagination={pageNumber:i.pageNumber,pageSize:i.pageSize,pageSizes:i.pageSizes,totalItems:this.totalItems},this._initialized=!0,GF(a,"totalItems",r=>this._totalItems=r)}dispose(){this._initialized=!1,this._eventHandler.unsubscribeAll(),this.pubSubService.unsubscribeAll(this._subscriptions)}getCurrentPagination(){return{pageNumber:this._pageNumber,pageSize:this._itemsPerPage,pageSizes:this._availablePageSizes}}getFullPagination(){return{pageCount:this._pageCount,pageNumber:this._pageNumber,pageSize:this._itemsPerPage,pageSizes:this._availablePageSizes,totalItems:this._totalItems,dataFrom:this._dataFrom,dataTo:this._dataTo}}getCurrentPageNumber(){return this._pageNumber}getCurrentItemPerPage(){return this._itemsPerPage}changeItemPerPage(e,a,u=!0){return this._pageNumber=1,this._pageCount=Math.ceil(this._totalItems/e),this._itemsPerPage=e,u?this.processOnPageChanged(this._pageNumber,a):Promise.resolve(this.getFullPagination())}goToFirstPage(e,a=!0){return this._pageNumber=1,a?this.isCursorBased&&this._cursorPageInfo?this.processOnPageChanged(this._pageNumber,e,{newPage:this._pageNumber,pageSize:this._itemsPerPage,first:this._itemsPerPage}):this.processOnPageChanged(this._pageNumber,e):Promise.resolve(this.getFullPagination())}goToLastPage(e,a=!0){return this._pageNumber=this._pageCount||1,a?this.isCursorBased&&this._cursorPageInfo?this.processOnPageChanged(this._pageNumber,e,{newPage:this._pageNumber,pageSize:this._itemsPerPage,last:this._itemsPerPage}):this.processOnPageChanged(this._pageNumber,e):Promise.resolve(this.getFullPagination())}goToNextPage(e,a=!0){return this._pageNumberthis._pageCount?this._pageNumber=this._pageCount:this._pageNumber=e,this._pageNumber!==i?u?this.processOnPageChanged(this._pageNumber,a):Promise.resolve(this.getFullPagination()):Promise.resolve(!1)}goToPreviousPage(e,a=!0){return this._pageNumber>1?(this._pageNumber--,a?this.isCursorBased&&this._cursorPageInfo?this.processOnPageChanged(this._pageNumber,e,{newPage:this._pageNumber,pageSize:this._itemsPerPage,last:this._itemsPerPage,before:this._cursorPageInfo.startCursor}):this.processOnPageChanged(this._pageNumber,e):Promise.resolve(this.getFullPagination())):Promise.resolve(!1)}refreshPagination(e=!1,a=!0,u=!1){const i={...this.getFullPagination()};if(this._paginationOptions){const o=this._paginationOptions;this._itemsPerPage||(this._isLocalGrid?this._itemsPerPage=o.pageSize:this._itemsPerPage=+(this._backendServiceApi?.options?.paginationOptions?.first?this._backendServiceApi.options.paginationOptions.first:o.pageSize)),(e||this._totalItems!==o.totalItems)&&(e?(this._pageNumber=1,this.paginationOptions.pageNumber=1):!this._initialized&&o.pageNumber&&o.pageNumber>1&&(this._pageNumber=o.pageNumber||1),1===this._pageNumber&&this._backendServiceApi&&this._backendServiceApi.service.resetPaginationOptions()),this._availablePageSizes=o.pageSizes||[],!this._totalItems&&o.totalItems&&(this._totalItems=o.totalItems),this.recalculateFromToIndexes()}this._pageCount=Math.ceil(this._totalItems/this._itemsPerPage),this.sharedService.currentPagination=this.getCurrentPagination(),this.pubSubService.publish("onPaginationRefreshed",this.getFullPagination()),a&&!H0(i,this.getFullPagination())&&this.pubSubService.publish("onPaginationChanged",this.getFullPagination()),u&&!H0(i,this.getFullPagination())&&this.pubSubService.publish("onPaginationPresetsInitialized",this.getFullPagination());const r=this.getFullPagination();this._previousPagination={pageNumber:r.pageNumber,pageSize:r.pageSize,pageSizes:r.pageSizes,totalItems:this.totalItems}}resetPagination(e=!0,a=!0){this._isLocalGrid&&this.dataView&&this.sharedService?.gridOptions?.enablePagination&&this.dataView.setPagingOptions({pageSize:this._itemsPerPage,pageNum:0}),this._cursorPageInfo=void 0,this.refreshPagination(!0,e),a&&this.grid.scrollTo(0)}togglePaginationVisibility(e){if(this.grid&&this.sharedService?.gridOptions){const a=void 0!==e?e:!this.sharedService.gridOptions.enablePagination;if(a&&this.goToFirstPage(),this._isLocalGrid&&this.dataView){const u=e?this._itemsPerPage:0;this.dataView.setPagingOptions({pageSize:u,pageNum:0})}this.sharedService.gridOptions.enablePagination=a,this.pubSubService.publish("onPaginationVisibilityChanged",{visible:a})}}processOnPageChanged(e,a,u){return console.assert(!this.isCursorBased||u,"Configured for cursor based pagination - cursorArgs expected"),!1===this.pubSubService.publish("onBeforePaginationChange",this.getFullPagination())?(this.resetToPreviousPagination(),Promise.resolve(this.getFullPagination())):new Promise((i,r)=>{if(this.recalculateFromToIndexes(),this._isLocalGrid&&this.dataView)this.dataView.setPagingOptions({pageSize:this._itemsPerPage,pageNum:e-1}),this.pubSubService.publish("onPaginationChanged",this.getFullPagination()),this.pubSubService.publish("onPaginationRefreshed",this.getFullPagination()),i(this.getFullPagination());else{const o=+this._itemsPerPage,d=new Date;if(this._backendServiceApi?.preProcess&&this._backendServiceApi.preProcess(),this._backendServiceApi?.process){const h=this.isCursorBased&&u?this._backendServiceApi.service.processOnPaginationChanged(a,u):this._backendServiceApi.service.processOnPaginationChanged(a,{newPage:e,pageSize:o}),m=this._backendServiceApi.process(h);m instanceof Promise?m.then(g=>{this.backendUtilities?.executeBackendProcessesCallback(d,g,this._backendServiceApi,this._totalItems);const v=this.getFullPagination();this._previousPagination={pageNumber:v.pageNumber,pageSize:v.pageSize,pageSizes:v.pageSizes,totalItems:this.totalItems},i(this.getFullPagination())}).catch(g=>{this.resetToPreviousPagination(),this.backendUtilities?.onBackendError(g,this._backendServiceApi),(!this._backendServiceApi?.onError||!this.backendUtilities?.onBackendError)&&r(m)}):this.rxjs?.isObservable(m)&&this._subscriptions.push(m.subscribe(g=>{const v=this.getFullPagination();this._previousPagination={pageNumber:v.pageNumber,pageSize:v.pageSize,pageSizes:v.pageSizes,totalItems:this.totalItems},i(this.backendUtilities?.executeBackendProcessesCallback(d,g,this._backendServiceApi,this._totalItems))},g=>{this.resetToPreviousPagination(),this.backendUtilities?.onBackendError(g,this._backendServiceApi),(!this._backendServiceApi?.onError||!this.backendUtilities?.onBackendError)&&r(m)})),this.pubSubService.publish("onPaginationRefreshed",this.getFullPagination()),this.pubSubService.publish("onPaginationChanged",this.getFullPagination())}}})}recalculateFromToIndexes(){((this._pageNumber-1)*this._itemsPerPage>this._totalItems||this._totalItems>0&&0===this._pageNumber)&&(this._pageNumber=1),0===this._totalItems?(this._dataFrom=0,this._dataTo=1,this._pageNumber=0):(this._dataFrom=this._pageNumber>1?this._pageNumber*this._itemsPerPage-this._itemsPerPage+1:1,this._dataTo=this._totalItemsthis._totalItems&&(this._dataTo=this._totalItems)),(this._dataTo>this._totalItems||this._totalItemsthis.resizeColumnsByCellContent(!0))),this.gridOptions.enableColumnResizeOnDoubleClick&&(this._subscriptions.push(this.pubSubService.subscribe("onHeaderMenuColumnResizeByContent",i=>{this.handleSingleColumnResizeByContent(i.columnId)})),this._eventHandler.subscribe(this._grid.onColumnsResizeDblClick,(i,r)=>{this.handleSingleColumnResizeByContent(r.triggeredByColumn)}))}bindAutoResizeDataGrid(e){if("container"===this.gridOptions.autoResize?.resizeDetection){if(!this._pageContainerElm||!this._pageContainerElm)throw new Error('\n [Slickgrid-Universal] Resizer Service requires a container when gridOption.autoResize.resizeDetection="container"\n You can fix this by setting your gridOption.autoResize.container');this._resizeObserver||(this._resizeObserver=new ResizeObserver(()=>this.resizeObserverCallback())),this._resizeObserver.observe(this._pageContainerElm)}else{if(void 0===this._gridDomElm)return null;this.resizeGrid().then(()=>this.resizeGridWhenStylingIsBrokenUntilCorrected()).catch(a=>console.log("Error:",a)),this.resizeGrid(10,e),this._bindingEventService.bind(window,"resize",this.handleResizeGrid.bind(this,e))}}handleResizeGrid(e){this.pubSubService.publish("onGridBeforeResize"),this._resizePaused||(this.resizeGrid(0,e),this.resizeGrid(0,e))}resizeObserverCallback(){this._resizePaused||this.resizeGrid()}calculateGridNewDimensions(e){const a=e?.autoResize??{},u=Lu(this._gridDomElm);if(!window||!this._gridDomElm)return null;let i=void 0!==a?.bottomPadding?a.bottomPadding:20;if(i&&e.enablePagination&&(i+=35),i&&e.showCustomFooter){const C=this.gridOptions?.customFooterOptions?.footerHeight??25;i+=parseInt(`${C}`,10)}let r=0,o=0;"container"===a.calculateAvailableSizeBy?r=WF(this._pageContainerElm,"height")||0:(r=window.innerHeight||0,o=u.top);const d=r-o-i,h=WF(this._pageContainerElm,"width")||window.innerWidth||0,m=a?.maxHeight,g=a?.minHeight??180,v=a?.maxWidth,k=a?.minWidth??300;let x=d,D=a?.rightPadding?h-a.rightPadding:h;return xm&&(x=m),Dv&&(D=v),{height:this._fixedHeight||x,width:this._fixedWidth||D}}getLastResizeDimensions(){return this._lastDimensions}pauseResizer(e){this._resizePaused=e}resizeGrid(e,a){return new Promise(u=>{(e=e||0)>0?(clearTimeout(this._timer),this._timer=setTimeout(()=>u(this.resizeGridCallback(a)),e)):u(this.resizeGridCallback(a))})}resizeGridCallback(e){const a=this.resizeGridWithDimensions(e);return this.pubSubService.publish("onGridAfterResize",a),this.gridOptions.enableAutoResizeColumnsByCellContent&&(!this._lastDimensions?.width||a?.width!==this._lastDimensions?.width)&&this.resizeColumnsByCellContent(!1),this._lastDimensions=a,a}resizeGridWithDimensions(e){const a=this.calculateGridNewDimensions(this.gridOptions);if((e||a)&&this._gridDomElm){const u=e?.height?e.height:a?.height,i=e?.width?e.width:a?.width;this.gridOptions.autoHeight||(this._gridDomElm.style.height=`${u}px`),this._gridDomElm.style.width=`${i}px`,this._gridContainerElm&&(this._gridContainerElm.style.width=`${i}px`),this._grid?.resizeCanvas&&this._gridContainerElm&&this._grid.resizeCanvas(),this._grid&&this.gridOptions?.enableAutoSizeColumns?this.gridUid&&document.querySelector(this.gridUidSelector)&&(!this._lastDimensions||this._lastDimensions.height!==u||this._lastDimensions.width!==i)&&this._grid.autosizeColumns():this.gridOptions.enableAutoResizeColumnsByCellContent&&(!this._lastDimensions?.width||i!==this._lastDimensions?.width)&&this.resizeColumnsByCellContent(!1),this._lastDimensions={height:u||0,width:i||0}}return this._lastDimensions}requestStopOfAutoFixResizeGrid(e=!0){this._isStopResizeIntervalRequested=e}resizeColumnsByCellContent(e=!1){const a=this._grid.getColumns(),u=this.dataView.getItems(),i={};let r=!1,o=0;const d=this._gridContainerElm?.offsetWidth??0;if(!Array.isArray(u)||0===u.length||!e&&this._totalColumnsWidthByContent>0&&this._totalColumnsWidthByContentd?this._grid.reRenderColumns(r):this._grid.autosizeColumns(),this.pubSubService.publish("onAfterResizeByContent",{readItemCount:o,calculateColumnWidths:h})}calculateCellWidthByReadingDataset(e,a,u=1e3,i){const r=Array.isArray(e)?e:[e],o=this.dataView.getItems();let d=0;for(const[h,m]of o.entries()){if(h>u)break;Array.isArray(r)&&"object"==typeof a&&r.forEach((g,v)=>{const k=this.calculateCellWidthByContent(m,g,h,i??v,a[g.id]);void 0!==k&&(a[g.id]=k)}),d=h+1}return d}calculateCellWidthByContent(e,a,u,i,r){const o=this.resizeByContentOptions.cellCharWidthInPx??7;if(!a.originalWidth){const d=a?.resizeCharWidthInPx??o,h=_7(a?.formatter,u,i,a,e,this._grid),m=Bp(h)?Tu(h):"",g=Math.ceil(m.length*d),v=a.resizeMaxWidthThreshold;a&&(void 0===r||g>r)&&(r=void 0!==v&&g>v?v:void 0!==a.maxWidth&&g>a.maxWidth?a.maxWidth:g)}return r}applyNewCalculatedColumnWidthByReference(e,a){const u=this.resizeByContentOptions.cellPaddingWidthInPx??6,i=this.resizeByContentOptions.formatterPaddingWidthInPx??6,r=e?.filter?.type??e?.type??w.string;let o=a;const d=e?.resizeCalcWidthRatio??this.resizeByContentOptions.defaultRatioForStringType??.9;o*="string"===r?d:1,o+=u,e.resizeExtraWidthPadding&&(o+=e.resizeExtraWidthPadding),e.editor&&this.gridOptions.editable&&(o+=i),void 0!==e.maxWidth&&o>e.maxWidth&&(o=e.maxWidth),void 0!==e.resizeMaxWidthThreshold&&o>e.resizeMaxWidthThreshold&&(o=e.resizeMaxWidthThreshold),o=Math.ceil(o),(void 0===e.originalWidth||!0===e.resizeAlwaysRecalculateWidth||!0===this.resizeByContentOptions.alwaysRecalculateColumnWidth)&&(e.width=this.readjustNewColumnWidthWhenOverLimit(e,o))}handleSingleColumnResizeByContent(e){const a=this._grid.getColumns(),u=a.findIndex(i=>i.id===e);if(u>=0){const i=a[u],r={[e]:i.originalWidth??i.minWidth??0};i.originalWidth=void 0,this.calculateCellWidthByReadingDataset(i,r,this.resizeByContentOptions.maxItemToInspectSingleColumnWidthByContent,u),this.applyNewCalculatedColumnWidthByReference(i,r[e]),this._grid.reRenderColumns(i?.rerenderOnResize??!1)}}readjustNewColumnWidthWhenOverLimit(e,a){const u=this.gridOptions.frozenColumn??-1,i=this._grid.getColumns().findIndex(o=>o.id===e.id)??0;let r=a;if(u>=0&&i<=u){const o=Array.from(this._grid.getViewports());if(o){const d=o.find(k=>k.classList.contains("slick-viewport-left"))?.clientWidth??0,h=o.find(k=>k.classList.contains("slick-viewport-right"))?.clientWidth??0,m=d+h,g=d-(e.width??0);if(g+a>m){r=d-g+h-(this.resizeByContentOptions.widthToRemoveFromExceededWidthReadjustment??50)}}}return Math.ceil(r)}checkIsGridShown(){return!!document.querySelector(`${this.gridUidSelector}`)?.offsetParent}resizeGridWhenStylingIsBrokenUntilCorrected(){var e=this;const a=this.gridOptions?.autoFixResizeTimeout??18e3,u=this.gridOptions?.autoFixResizeRequiredGoodCount??5,i=this._gridContainerElm.querySelector(`${this.gridUidSelector} .slick-header`),r=this._gridContainerElm.querySelector(`${this.gridUidSelector} .slick-viewport`);let o=0,d=0;if(i&&r&&this.gridOptions.autoFixResizeWhenBrokenStyleDetected){const h=this.dataView.getItemCount(),m=this._grid.getColumns()||[];this._intervalId=setInterval(Su(function*(){const v=Lu(i);let k=v.top;e.gridOptions?.enableFiltering&&e.gridOptions.headerRowHeight&&(k+=e.gridOptions.headerRowHeight),e.gridOptions?.createPreHeaderPanel&&e.gridOptions.showPreHeaderPanel&&e.gridOptions.preHeaderPanelHeight&&(k+=e.gridOptions.preHeaderPanelHeight),k+=44;const D=Lu(r).top,C=Lu(e._gridContainerElm);let F=0===v?.top||k-D>2||0===C.left&&0===C.top;const A=e._grid.getRenderedRange()?.rightPx??0;!F&&h>0&&0===A&&m.length>1&&(F=!0),e._isStopResizeIntervalRequested&&(F=!1,o=a),e.checkIsGridShown()&&(F||0===C.left||0===C.top)&&(yield e.resizeGrid(),d<5&&e._grid.updateColumns(),e.checkIsGridShown()&&(F=!1)),e.checkIsGridShown()&&d++,e.checkIsGridShown()&&!F&&(d>=u||o++>=a)&&clearInterval(e._intervalId)}),this.intervalRetryDelay)}}}class $he{constructor(){this._hasColumnsReordered=!1,this._hideHeaderRowAfterPageLoad=!1}get allColumns(){return this._allColumns}set allColumns(e){this._allColumns=e}get columnDefinitions(){return this._grid?.getColumns()??[]}get currentPagination(){return this._currentPagination}set currentPagination(e){this._currentPagination=e}get dataView(){return this._dataView}set dataView(e){this._dataView=e}get frozenVisibleColumnId(){return this._frozenVisibleColumnId}set frozenVisibleColumnId(e){this._frozenVisibleColumnId=e}get hasColumnsReordered(){return this._hasColumnsReordered}set hasColumnsReordered(e){this._hasColumnsReordered=e}get slickGrid(){return this._grid}set slickGrid(e){this._grid=e}get gridContainerElement(){return this._gridContainerElm}set gridContainerElement(e){this._gridContainerElm=e}get gridOptions(){return this._gridOptions||this._grid?.getOptions()||{}}set gridOptions(e){this._gridOptions=e}get groupItemMetadataProvider(){return this._groupItemMetadataProvider}set groupItemMetadataProvider(e){this._groupItemMetadataProvider=e}get hideHeaderRowAfterPageLoad(){return this._hideHeaderRowAfterPageLoad}set hideHeaderRowAfterPageLoad(e){this._hideHeaderRowAfterPageLoad=e}get externalRegisteredResources(){return this._externalRegisteredResources}set externalRegisteredResources(e){this._externalRegisteredResources=e}get visibleColumns(){return this._visibleColumns}set visibleColumns(e){this._visibleColumns=e}get hierarchicalDataset(){return this._hierarchicalDataset}set hierarchicalDataset(e){this._hierarchicalDataset=e}}class qhe{constructor(e,a,u,i){this.sharedService=e,this.pubSubService=a,this.backendUtilities=u,this.rxjs=i,this._currentLocalSorters=[],this._isBackendGrid=!1,this._eventHandler=new Ut,this.rxjs&&(this.httpCancelRequests$=this.rxjs.createSubject())}get eventHandler(){return this._eventHandler}get _gridOptions(){return this._grid?.getOptions()??{}}get _columnDefinitions(){return this._grid?.getColumns()??[]}dispose(){this._eventHandler?.unsubscribeAll&&this._eventHandler.unsubscribeAll(),this.httpCancelRequests$&&this.rxjs?.isObservable(this.httpCancelRequests$)&&(this.httpCancelRequests$.next(),this.httpCancelRequests$.complete())}addRxJsResource(e){this.rxjs=e}bindBackendOnSort(e){this._isBackendGrid=!0,this._grid=e,this._dataView=e?.getData(),this._eventHandler.subscribe(e.onSort,this.onBackendSortChanged.bind(this))}bindLocalOnSort(e){this._isBackendGrid=!1,this._grid=e,this._dataView=e?.getData(),this.processTreeDataInitialSort(),this._eventHandler.subscribe(e.onSort,this.handleLocalOnSort.bind(this))}handleLocalOnSort(e,a){const u=a.multiColumnSort?a.sortCols:new Array({columnId:a.sortCol?.id??"",sortAsc:a.sortAsc,sortCol:a.sortCol});this._currentLocalSorters=[],Array.isArray(u)&&u.forEach(i=>{i.sortCol&&this._currentLocalSorters.push({columnId:i.sortCol.id,direction:i.sortAsc?xi.ASC:xi.DESC})}),this.onLocalSortChanged(this._grid,u),this.emitSortChanged(zu.local)}clearSortByColumnId(e,a){const u=this.getCurrentColumnSorts(),i=this.getCurrentColumnSorts(`${a}`);if(Array.isArray(u)&&Array.isArray(i)&&u.length!==i.length){if(this._gridOptions.backendServiceApi)this.onBackendSortChanged(e,{multiColumnSort:!0,sortCols:i,grid:this._grid});else if(this._dataView)this.onLocalSortChanged(this._grid,i,!0,!0);else{const d=this._gridOptions?.multiColumnSort?i:i[0];this._grid.onSort.notify(d)}const r=i.map(o=>({columnId:o?.sortCol?.id??"",sortAsc:o?.sortAsc,sortCol:o?.sortCol}));this._grid.setSortColumns(r)}Array.isArray(i)&&0===i.length&&this.sortLocalGridByDefaultSortFieldId()}clearSorting(e=!0){if(this._grid&&this._gridOptions&&this._dataView)if(this._grid.setSortColumns([]),e)this._isBackendGrid?this.onBackendSortChanged(void 0,{grid:this._grid,multiColumnSort:!0,sortCols:[],clearSortTriggered:!0}):this._columnDefinitions&&Array.isArray(this._columnDefinitions)&&this._columnDefinitions.length>0&&this.sortLocalGridByDefaultSortFieldId();else if(this._isBackendGrid){const a=this._gridOptions?.backendServiceApi?.service;a?.clearSorters&&a.clearSorters()}this._currentLocalSorters=[],this.pubSubService.publish("onSortCleared",!0)}disableSortFunctionality(e=!0,a=!0){const i=!this._gridOptions.enableSorting;let r;this._gridOptions.enableSorting=i,e?(a&&this.clearSorting(),this._eventHandler.unsubscribeAll(),r=this.disableAllSortingCommands(!0)):(r=this.disableAllSortingCommands(!1),this._eventHandler.subscribe(this._grid.onSort,(o,d)=>this.handleLocalOnSort(o,d))),this._grid.setOptions({enableSorting:this._gridOptions.enableSorting},!1,!0),this.sharedService.gridOptions=this._gridOptions,this._grid.setColumns(r)}toggleSortFunctionality(e=!0){const a=this._gridOptions.enableSorting;this.disableSortFunctionality(a,e)}emitSortChanged(e,a){if(e===zu.remote&&this._gridOptions?.backendServiceApi){let u=[];const i=this._gridOptions.backendServiceApi.service;i?.getCurrentSorters&&(u=i.getCurrentSorters()),this.pubSubService.publish("onSortChanged",u)}else e===zu.local&&(a&&(this._currentLocalSorters=a),this.pubSubService.publish("onSortChanged",this.getCurrentLocalSorters()))}getCurrentLocalSorters(){return this._currentLocalSorters}getCurrentColumnSorts(e){if(this._grid){const a=this._grid.getSortColumns();if(Array.isArray(a))return a.reduce((i,r)=>(r&&(!e||r.columnId!==e)&&i.push({columnId:r.columnId||"",sortCol:this._columnDefinitions[this._grid.getColumnIndex(r.columnId||"")],sortAsc:r.sortAsc}),i),[])}return[]}loadGridSorters(e){this._currentLocalSorters=[];const a=[];return Array.isArray(e)&&((this._gridOptions.multiColumnSort?e:e.slice(0,1)).forEach(i=>{const r=this._columnDefinitions.find(o=>o.id===i.columnId);if(r){if(!r.sortable){let o="[Slickgrid-Universal] Cannot add sort icon to a column that is not sortable, please add `sortable: true` to your column or remove it from your list of columns to sort.";throw this._gridOptions.enableTreeData&&(o+=" Also note that TreeData feature requires the column holding the tree (expand/collapse icons) to be sortable."),new Error(o)}a.push({columnId:r.id,sortAsc:i.direction.toUpperCase()===xi.ASC,sortCol:r}),this._currentLocalSorters.push({columnId:String(r.id),direction:i.direction.toUpperCase()})}}),this.onLocalSortChanged(this._grid,a),this._grid.setSortColumns(a.map(i=>({columnId:i.columnId,sortAsc:i.sortAsc})))),a}processTreeDataInitialSort(){if(this._gridOptions?.enableTreeData&&this._gridOptions.treeDataOptions){const e=this._gridOptions.treeDataOptions,a=this._columnDefinitions.find(u=>u.id===e.columnId);if(a){let u=xi.ASC,i={columnId:e.columnId,sortCol:a,sortAsc:!0};if(e?.initialSort?.columnId){const r=e.initialSort.columnId,o=this._columnDefinitions.find(d=>d.id===r);u=(e.initialSort.direction||xi.ASC).toUpperCase(),i={columnId:r,sortCol:o,sortAsc:u===xi.ASC}}i?.columnId&&this.sharedService?.hierarchicalDataset&&this.updateSorting([{columnId:i.columnId||"",direction:u}])}}}onBackendSortChanged(e,a){if(!a||!a.grid)throw new Error('Something went wrong when trying to bind the "onBackendSortChanged(event, args)" function, it seems that "args" is not populated correctly');const u=a.grid?.getOptions()??{},i=u.backendServiceApi;if(!i||!i.process||!i.service)throw new Error('BackendServiceApi requires at least a "process" function and a "service" defined');const r=new Date;i.preProcess&&i.preProcess();const o=i.service.processOnSortChanged(e,a),d=u?.pagination?.totalItems||0;this.backendUtilities?.executeBackendCallback(i,o,a,r,d,{emitActionChangedCallback:this.emitSortChanged.bind(this),errorCallback:()=>{this._grid.setSortColumns(a.previousSortColumns||[]);const h=a.previousSortColumns?.map(m=>({columnId:m.columnId,sortAsc:m.sortAsc,sortCol:this._columnDefinitions.find(g=>g.id===m.columnId)}));i?.service?.updateSorters?.(h||[])},httpCancelRequestSubject:this.httpCancelRequests$})}onLocalSortChanged(e,a,u=!1,i=!1){var r=this;return Su(function*(){const o=r._gridOptions?.datasetIdPropertyName??"id",d=r._gridOptions?.enableTreeData??!1,h=e.getData();if(yield r.pubSubService.publish("onBeforeSortChange",{sortColumns:a},0),e&&h){if(u&&!d&&h.reSort(),d&&r.sharedService&&Array.isArray(r.sharedService.hierarchicalDataset)){const m=r.sortHierarchicalDataset(r.sharedService.hierarchicalDataset,a);r._dataView.setItems(m.flat,o),r._dataView.onRowCountChanged.notify({previous:r._dataView.getFilteredItemCount(),current:r._dataView.getLength(),itemCount:r._dataView.getItemCount(),dataView:r._dataView,callingOnRowsChanged:!0})}else h.sort(r.sortComparers.bind(r,a));e.invalidate(),i&&r.emitSortChanged(zu.local,a.map(m=>({columnId:m.sortCol?.id??"id",direction:m.sortAsc?xi.ASC:xi.DESC})))}})()}sortHierarchicalDataset(e,a,u=!1){this.sortTreeData(e,a);const i=this._gridOptions?.datasetIdPropertyName??"id",r=this._gridOptions?.treeDataOptions??{columnId:""},d=SG(e,{...r,identifierPropName:r.identifierPropName??i,shouldAddTreeLevelNumber:!0});if(u){this._currentLocalSorters=[],a.forEach(m=>{this._currentLocalSorters.push({columnId:m.columnId,direction:m.sortAsc?"ASC":"DESC"})});const h=this._gridOptions?.backendServiceApi?zu.remote:zu.local;this.emitSortChanged(h)}return{hierarchical:e,flat:d}}sortLocalGridByDefaultSortFieldId(){const e=this._gridOptions&&this._gridOptions.defaultColumnSortFieldId||this._gridOptions.datasetIdPropertyName||"id",a={id:e,field:e};this.onLocalSortChanged(this._grid,new Array({columnId:a.id,sortAsc:!0,sortCol:a,clearSortTriggered:!0}),!1,!0)}sortComparers(e,a,u){if(Array.isArray(e))for(const i of e){const r=this.sortComparer(i,a,u);if(void 0!==r)return r}return Gt.neutral}sortComparer(e,a,u,i){if(e?.sortCol){const r=e.sortCol,o=e.sortAsc?Gt.asc:Gt.desc;let d=i||r.queryFieldSorter||r.queryField||r.field,h=d;const m=r.type||w.string;"function"==typeof r.queryFieldNameGetterFn&&(d=r.queryFieldNameGetterFn(a),h=r.queryFieldNameGetterFn(u));let g=a[d],v=u[h];if(d?.indexOf(".")>=0&&(g=ti(a,d)),h?.indexOf(".")>=0&&(v=ti(u,h)),r.sortComparer){const k=r.sortComparer(g,v,o,r,this._gridOptions);if(k!==Gt.neutral)return k}else{const k=Cv(m,g,v,o,r,this._gridOptions);if(k!==Gt.neutral)return k}}}sortTreeData(e,a){Array.isArray(a)&&a.forEach(u=>{this.sortTreeChildren(e,u,0)})}sortTreeChildren(e,a,u){const r=this._gridOptions?.treeDataOptions?.childrenPropName??"children";e.sort((o,d)=>this.sortComparer(a,o,d)??Gt.neutral),e.forEach(o=>{o&&o.hasOwnProperty(r)&&Array.isArray(o[r])&&(u++,this.sortTreeChildren(o[r],a,u),u--)})}updateSorting(e,a=!0,u=!0){if(!this._gridOptions||!this._gridOptions.enableSorting)throw new Error('[Slickgrid-Universal] in order to use "updateSorting" method, you need to have Sortable Columns defined in your grid and "enableSorting" set in your Grid Options');if(Array.isArray(e)){const i=this._gridOptions?.backendServiceApi;if(i){const r=i?.service;r?.updateSorters&&(r.updateSorters(void 0,e),u&&this.backendUtilities?.refreshBackendDataset(this._gridOptions))}else this.loadGridSorters(e);if(a){const r=i?zu.remote:zu.local;this.emitSortChanged(r)}}}disableAllSortingCommands(e=!0){const a=this._grid.getColumns();a.forEach(i=>{void 0!==i.sortable&&(i.sortable=!e),i?.header?.menu&&i.header.menu.commandItems?.forEach(r=>{if(r&&"string"!=typeof r){const o=r.command;("sort-asc"===o||"sort-desc"===o||"clear-sort"===o)&&(r.hidden=e)}})});const u=this._gridOptions?.gridMenu?.commandItems;return u&&u.forEach(i=>{i&&"string"!=typeof i&&"clear-sorting"===i.command&&(i.hidden=e)}),a}}class Yhe{constructor(e,a,u){this.pubSubService=e,this.sharedService=a,this.sortService=u,this._currentToggledItems=[],this._isLastFullToggleCollapsed=!1,this._isOneCpuCyclePassed=!1,this._isTreeDataEnabled=!1,this._subscriptions=[],this._treeDataRecalcHandler=null,this._eventHandler=new Ut,setTimeout(()=>this._isOneCpuCyclePassed=!0)}set currentToggledItems(e){this._currentToggledItems=e}get dataset(){return this.dataView?.getItems()}get datasetHierarchical(){return this.sharedService.hierarchicalDataset}get dataView(){return this._grid?.getData()}get eventHandler(){return this._eventHandler}get gridOptions(){return this._grid?.getOptions()??{}}get treeDataOptions(){return this.gridOptions.treeDataOptions}dispose(){this._eventHandler.unsubscribeAll(),this.pubSubService.unsubscribeAll(this._subscriptions)}init(e){if(this._grid=e,this._isTreeDataEnabled=this.gridOptions?.enableTreeData??!1,this._isLastFullToggleCollapsed=this.treeDataOptions?.initiallyCollapsed??!1,this._currentToggledItems=this.gridOptions.presets?.treeData?.toggledItems??[],this._lastToggleStateChange={type:this._isLastFullToggleCollapsed?"full-collapse":"full-expand",previousFullToggleType:this._isLastFullToggleCollapsed?"full-collapse":"full-expand",toggledItems:this._currentToggledItems},this._isTreeDataEnabled){if(this.gridOptions?.multiColumnSort)throw new Error('[Slickgrid-Universal] It looks like you are trying to use Tree Data with multi-column sorting, unfortunately it is not supported because of its complexity, you can disable it via "multiColumnSort: false" grid option and/or help in providing support for this feature.');if(!this.gridOptions?.enableFiltering)throw new Error('[Slickgrid-Universal] It looks like you are trying to use Tree Data without using the filtering option, unfortunately that is not possible with Tree Data since it relies heavily on the filters to expand/collapse the tree. You need to enable it via "enableFiltering: true"');if(this.gridOptions?.backendServiceApi||this.gridOptions?.enablePagination)throw new Error("[Slickgrid-Universal] It looks like you are trying to use Tree Data with Pagination and/or a Backend Service (OData, GraphQL) but unfortunately that is simply not supported because of its complexity.");if(!this.gridOptions.treeDataOptions||!this.gridOptions.treeDataOptions.columnId)throw new Error('[Slickgrid-Universal] When enabling tree data, you must also provide the "treeDataOption" property in your Grid Options with "childrenPropName" or "parentPropName" (depending if your array is hierarchical or flat) for the Tree Data to work properly.')}this._eventHandler.subscribe(e.onClick,this.handleOnCellClick.bind(this)),this._subscriptions.push(this.pubSubService.subscribe("onGridMenuClearAllSorting",this.clearSorting.bind(this))),this._treeDataRecalcHandler=this.setAutoRecalcTotalsCallbackWhenFeatEnabled(this.gridOptions),this._eventHandler.subscribe(this.dataView.onRowCountChanged,()=>{"function"==typeof this._treeDataRecalcHandler&&this._isOneCpuCyclePassed&&(clearTimeout(this._timer),this._timer=setTimeout(()=>this._treeDataRecalcHandler?.(),this.treeDataOptions?.autoRecalcTotalsDebounce??0))})}applyToggledItemStateChanges(e,a,u=!0,i=!1){if(Array.isArray(e)){const r=this.getTreeDataOptionPropName("collapsedPropName"),o=this.getTreeDataOptionPropName("hasChildrenPropName");this.dataView.beginUpdate(!0);const h="full-collapse"===(a??this._lastToggleStateChange.previousFullToggleType);a&&(this._lastToggleStateChange.previousFullToggleType=a),u&&(this.dataView.getItems()||[]).forEach(m=>{m[o]&&(m[r]=h)}),this.dynamicallyToggleItemState(e,i)}}dynamicallyToggleItemState(e,a=!0){Array.isArray(e)&&(this.dataView.beginUpdate(!0),e.forEach(u=>{const i=this.dataView.getItemById(u.itemId);if(this.updateToggledItem(i,u.isCollapsed),a){const r=this._currentToggledItems.findIndex(o=>o.itemId===u.itemId);r>=0?this._currentToggledItems[r].isCollapsed=u.isCollapsed:this._currentToggledItems.push({itemId:u.itemId,isCollapsed:u.isCollapsed}),this.pubSubService.publish("onTreeItemToggled",{...this._lastToggleStateChange,fromItemId:u.itemId,toggledItems:this._currentToggledItems,type:u.isCollapsed?Sh.toggleCollapse:Sh.toggleExpand})}}),this.dataView.endUpdate(),this.dataView.refresh())}getCurrentToggleState(){return this._lastToggleStateChange}getInitialSort(e,a){const u=a?.treeDataOptions,i=u?.initialSort??{columnId:u?.columnId??"",direction:"ASC"},r=e.find(o=>o.id===i.columnId);return{columnId:i.columnId,sortAsc:"DESC"!==i?.direction?.toUpperCase(),sortCol:r}}getItemCount(e){if(void 0!==e){const a=this.getTreeDataOptionPropName("levelPropName");return this.dataView.getItems().filter(u=>u[a]===e).length}return this.dataView.getItemCount()}getToggledItems(){return this._currentToggledItems}getTreeDataOptionPropName(e){let a="";switch(e){case"childrenPropName":a=this.treeDataOptions?.childrenPropName??ue.treeDataProperties.CHILDREN_PROP;break;case"collapsedPropName":a=this.treeDataOptions?.collapsedPropName??ue.treeDataProperties.COLLAPSED_PROP;break;case"hasChildrenPropName":a=this.treeDataOptions?.hasChildrenPropName??ue.treeDataProperties.HAS_CHILDREN_PROP;break;case"identifierPropName":a=this.treeDataOptions?.identifierPropName??this.gridOptions?.datasetIdPropertyName??"id";break;case"levelPropName":a=this.treeDataOptions?.levelPropName??ue.treeDataProperties.TREE_LEVEL_PROP;break;case"parentPropName":a=this.treeDataOptions?.parentPropName??ue.treeDataProperties.PARENT_PROP}return a}clearSorting(){const e=this.getInitialSort(this.sharedService.columnDefinitions,this.sharedService.gridOptions);this.sortService.loadGridSorters([{columnId:e.columnId,direction:e.sortAsc?"ASC":"DESC"}])}convertFlatParentChildToTreeDatasetAndSort(e,a,u,i){const r=this.convertFlatParentChildToTreeDataset(e,u),o=Array.isArray(i)&&i.length?i[0]:this.getInitialSort(a,u),d=this.sortService.sortHierarchicalDataset(r,[o],!0);return this._grid?.setSortColumns([o]),d}convertFlatParentChildToTreeDataset(e,a){const u=a?.datasetIdPropertyName??"id",i=a?.treeDataOptions??{columnId:"id"};return zG(e,{...i,identifierPropName:i.identifierPropName??u,initiallyCollapsed:this._isLastFullToggleCollapsed})}enableAutoRecalcTotalsFeature(e=!0){e&&this._isTreeDataEnabled?this._treeDataRecalcHandler=this.recalculateTreeTotals.bind(this,this.gridOptions):this._treeDataRecalcHandler=null}recalculateTreeTotals(e){const a=e.treeDataOptions,u=a?.childrenPropName??ue.treeDataProperties.CHILDREN_PROP,i=a?.levelPropName??ue.treeDataProperties.TREE_LEVEL_PROP;a?.aggregators&&(a.aggregators.forEach(r=>{P2(this.sharedService.hierarchicalDataset||[],{childrenPropName:u,levelPropName:i,aggregator:r})}),this._grid.invalidate())}sortHierarchicalDataset(e,a){const u=a??this.getInitialSort(this.sharedService.allColumns,this.gridOptions),i=Array.isArray(u)?u:[u];return this.sortService.sortHierarchicalDataset(e,i)}toggleTreeDataCollapse(e,a=!0){var u=this;return Su(function*(){if(u.gridOptions?.enableTreeData){const r=u.getTreeDataOptionPropName("hasChildrenPropName");a&&(yield u.pubSubService.publish("onTreeFullToggleStart",{collapsing:e})),u.dataView.beginUpdate(!0),(u.dataView.getItems()||[]).forEach(o=>{o[r]&&u.updateToggledItem(o,e)}),u.dataView.endUpdate(),u.dataView.refresh(),u._isLastFullToggleCollapsed=e}const i=e?Sh.fullCollapse:Sh.fullExpand;u._lastToggleStateChange={type:i,previousFullToggleType:i,toggledItems:null},a&&u.pubSubService.publish("onTreeFullToggleEnd",u._lastToggleStateChange)})()}handleOnCellClick(e,a){if(e&&a){const u=e.target||{},i=this.gridOptions.datasetIdPropertyName??"id",r=this.getTreeDataOptionPropName("collapsedPropName"),o=this.getTreeDataOptionPropName("childrenPropName");if("string"==typeof u?.className&&u.className.indexOf("toggle")>=0){const h=this.dataView.getItem(a.row);if(h){h[r]=!h[r];const m=h[r],g=h[i],v=this._currentToggledItems.findIndex(D=>D.itemId===g);v>=0?this._currentToggledItems[v].isCollapsed=m:this._currentToggledItems.push({itemId:g,isCollapsed:m}),this.dataView.updateItem(g,h);const k=D=>D[i]===g,x=zh(this.sharedService.hierarchicalDataset||[],k,o);x&&(x[r]=m),this._grid.invalidate(),this._lastToggleStateChange={type:m?Sh.toggleCollapse:Sh.toggleExpand,previousFullToggleType:this._isLastFullToggleCollapsed?"full-collapse":"full-expand",toggledItems:this._currentToggledItems},this.pubSubService.publish("onTreeItemToggled",{...this._lastToggleStateChange,fromItemId:g})}e.stopImmediatePropagation()}}}updateToggledItem(e,a){const u=this.gridOptions?.datasetIdPropertyName??"id",i=this.getTreeDataOptionPropName("childrenPropName"),r=this.getTreeDataOptionPropName("collapsedPropName");if(e){e[r]=a,this.dataView.updateItem(e[u],e);const o=h=>h[u]===e[u],d=zh(this.sharedService.hierarchicalDataset||[],o,i);d&&(d[r]=a)}}setAutoRecalcTotalsCallbackWhenFeatEnabled(e){return e?.enableTreeData&&e?.treeDataOptions?.autoRecalcTotalsOnFilterChange&&e?.treeDataOptions?.aggregators?this.recalculateTreeTotals.bind(this,e):null}}class Hh{constructor(e){this.translaterService=e,this._debounceTypingDelay=0,this._shouldTriggerQuery=!0,this._inputType="text",this.inputFilterType="single",this.searchTerms=[],this._bindEventService=new Ni}get columnFilter(){return this.columnDef?.filter??{}}get defaultOperator(){return te.empty}get inputType(){return this._inputType}set inputType(e){this._inputType=e}get operator(){return this.columnFilter?.operator??this.defaultOperator}set operator(e){this.columnFilter&&(this.columnFilter.operator=e)}get gridOptions(){return this.grid?.getOptions()??{}}init(e){if(!e)throw new Error('[Slickgrid-Universal] A filter must always have an "init()" with valid arguments.');this.grid=e.grid,this.callback=e.callback,this.columnDef=e.columnDef,"compound"===this.inputFilterType&&(this.operator=e.operator||""),this.searchTerms=e?.searchTerms??[],this._cellContainerElm=e.filterContainerElm;const a=this.gridOptions?.backendServiceApi;this._debounceTypingDelay=(a?a?.filterTypingDebounce??this.gridOptions?.defaultBackendServiceFilterTypingDebounce:this.gridOptions?.filterTypingDebounce)??0;const u=Array.isArray(this.searchTerms)&&this.searchTerms.length>=0?this.searchTerms[0]:"";this.createDomFilterElement(u),this._bindEventService.bind(this._filterInputElm,["keyup","blur","change"],this.onTriggerEvent.bind(this)),this._bindEventService.bind(this._filterInputElm,"wheel",this.onTriggerEvent.bind(this),{passive:!0}),"compound"===this.inputFilterType&&this._selectOperatorElm&&this._bindEventService.bind(this._selectOperatorElm,"change",this.onTriggerEvent.bind(this))}clear(e=!0){this._filterInputElm&&(this._shouldTriggerQuery=e,this.searchTerms=[],this._filterInputElm.value="",this._currentValue=void 0,this.updateFilterStyle(!1),"compound"===this.inputFilterType&&this._selectOperatorElm&&(this._selectOperatorElm.selectedIndex=0),this.onTriggerEvent(void 0,!0))}destroy(){this._bindEventService.unbindAll(),this._selectOperatorElm?.remove?.(),this._filterInputElm?.remove?.()}getValues(){return this._filterInputElm.value}setValues(e,a,u=!1){const i=Array.isArray(e)?e:[e];let r="";for(const o of i)r="single"===this.inputFilterType?a?this.addOptionalOperatorIntoSearchString(o,a):o:`${o}`,this._filterInputElm.value=`${r??""}`,this._currentValue=this._filterInputElm.value;if(this.updateFilterStyle(""!==this.getValues()),this.operator=a||this.defaultOperator,a&&this._selectOperatorElm){const o=bv(this.operator);this._selectOperatorElm.value=o}u&&this.onTriggerEvent(void 0,!1)}addOptionalOperatorIntoSearchString(e,a){let u="",i="",r=null==e?"":`${e}`;if(a&&r){switch(a){case"<>":case"!=":case"=":case"==":case">":case">=":case"<":case"<=":u=a;break;case"EndsWith":case"*z":u="*";break;case"StartsWith":case"a*":i="*"}r=`${u}${r}${i}`}return r}getCompoundOperatorOptionValues(){const e=this.columnDef.type&&this.columnDef.type?this.columnDef.type:w.string;let a,u="text";if(this.columnFilter?.compoundOperatorList)a=this.columnFilter.compoundOperatorList;else switch(e){case w.string:case w.text:case w.readonly:case w.password:u="text",a=function dce(t,e){return[{operator:"",desc:Kl("CONTAINS","TEXT_CONTAINS","Contains",t,e)},{operator:"<>",desc:Kl("NOT_CONTAINS","TEXT_NOT_CONTAINS","Not Contains",t,e)},{operator:"=",desc:Kl("EQUALS","TEXT_EQUALS","Equals",t,e)},{operator:"!=",desc:Kl("NOT_EQUAL_TO","TEXT_NOT_EQUAL_TO","Not equal to",t,e)},{operator:"a*",desc:Kl("STARTS_WITH","TEXT_STARTS_WITH","Starts with",t,e)},{operator:"*z",desc:Kl("ENDS_WITH","TEXT_ENDS_WITH","Ends with",t,e)}]}(this.gridOptions,this.translaterService);break;default:u="numeric",a=FL(this.gridOptions,this.translaterService)}return AL(this.gridOptions,a,u),a}createDomFilterElement(e){const a=this.columnDef?.id??"";_t(this._cellContainerElm);let u=this.gridOptions?.defaultFilterPlaceholder??"";this.columnFilter?.placeholder&&(u=this.columnFilter.placeholder);const i=`${e??""}`;if(this._filterInputElm=T("input",{type:this._inputType||"text",autocomplete:"off",ariaAutoComplete:"none",placeholder:u,ariaLabel:this.columnFilter?.ariaLabel??`${Qs(a+"")} Search Filter`,className:`form-control filter-${a}`,value:i,dataset:{columnid:`${a}`}}),this.updateFilterStyle(!!e),void 0!==e&&(this._currentValue=i),"single"===this.inputFilterType)this._filterContainerElm=this._filterInputElm,this._filterInputElm.classList.add("search-filter"),this._cellContainerElm.appendChild(this._filterInputElm),this._cellContainerElm.appendChild(document.createElement("span"));else{this._filterInputElm.classList.add("compound-input"),this._selectOperatorElm=yL(this.getCompoundOperatorOptionValues(),this.grid),this._filterContainerElm=T("div",{className:`form-group search-filter filter-${a}`});const r=T("div",{className:"input-group"},this._filterContainerElm);T("div",{className:"input-group-addon input-group-prepend operator"},r).appendChild(this._selectOperatorElm),r.appendChild(this._filterInputElm),r.appendChild(T("span")),this.operator&&(this._selectOperatorElm.value=bv(this.operator)),this._filterContainerElm&&this._cellContainerElm.appendChild(this._filterContainerElm)}}onTriggerEvent(e,a=!1){if(a)this.callback(e,{columnDef:this.columnDef,clearFilterTriggered:a,shouldTriggerQuery:this._shouldTriggerQuery}),this.updateFilterStyle(!1);else{const u=e?.type??"",i=this._selectOperatorElm?.value??this.operator;let r=this._filterInputElm.value;const o=this.gridOptions.enableFilterTrimWhiteSpace||this.columnFilter.enableTrimWhiteSpace;"string"==typeof r&&o&&(r=r.trim()),"select"!==e?.target?.tagName.toLowerCase()&&(this._currentValue=r),this.updateFilterStyle(""!==r);const d={columnDef:this.columnDef,operator:i,searchTerms:r?[r]:null,shouldTriggerQuery:this._shouldTriggerQuery},h="keyup"===u&&"Enter"!==e?.key?this._debounceTypingDelay:0,m=this.columnFilter.skipCompoundOperatorFilterWithNullInput??this.gridOptions.skipCompoundOperatorFilterWithNullInput,g=m&&xt(this._currentValue)||""===this._currentValue&&xt(this._lastSearchValue);("single"===this.inputFilterType||!m||g)&&(h>0?(clearTimeout(this._timer),this._timer=setTimeout(()=>this.callback(e,d),h)):this.callback(e,d)),this._lastSearchValue=r}this._shouldTriggerQuery=!0}updateFilterStyle(e){e?(this._filterContainerElm?.classList.add("filled"),this._filterInputElm.classList.add("filled")):(this._filterContainerElm?.classList.remove("filled"),this._filterInputElm.classList.remove("filled"))}}class $W extends Hh{constructor(e){super(e),this.translaterService=e,this.inputType="text",this.inputFilterType="compound"}}const pT="#86bff8";class gT{constructor(e){this.translaterService=e,this._clearFilterTriggered=!1,this._shouldTriggerQuery=!0,this._sliderTrackFilledColor=pT,this.sliderType="double",this.searchTerms=[],this._bindEventService=new Ni}get columnFilter(){return this.columnDef?.filter??{}}get currentValue(){return this._currentValue}get currentValues(){return this._currentValues}get defaultOperator(){return"compound"===this.sliderType?te.empty:"single"===this.sliderType?te.greaterThanOrEqual:this.gridOptions.defaultFilterRangeOperator||te.rangeInclusive}get filterOptions(){return{...this.gridOptions.defaultFilterOptions?.slider,...this.columnFilter?.filterOptions}}get gridOptions(){return this.grid?.getOptions()??{}}get sliderOptions(){return this._sliderOptions}get operator(){return this._operator||(this.columnFilter.operator??this.defaultOperator)}set operator(e){this._operator=e}init(e){if(!e)throw new Error('[Slickgrid-Universal] A filter must always have an "init()" with valid arguments.');this.grid=e.grid,this.callback=e.callback,this.columnDef=e.columnDef,this.operator=e.operator||"",this.searchTerms=e?.searchTerms??[],this._argFilterContainerElm=e.filterContainerElm,this._sliderTrackFilledColor=window.getComputedStyle(document.documentElement).getPropertyValue("--slick-slider-filter-filled-track-color")||pT,this._filterElm=this.createDomFilterElement(this.searchTerms)}clear(e=!0){if(this._filterElm){this._clearFilterTriggered=!0,this._shouldTriggerQuery=e,this.searchTerms=[];const a=+(this.filterOptions?.sliderStartValue??ue.SLIDER_DEFAULT_MIN_VALUE),u=+(this.filterOptions?.sliderEndValue??ue.SLIDER_DEFAULT_MAX_VALUE);"double"===this.sliderType?(this._sliderLeftInputElm&&(this._sliderLeftInputElm.value=`${a}`),this._sliderRightInputElm&&(this._sliderRightInputElm.value=`${u}`),this._currentValues=[a,u],this._sliderLeftInputElm?.dispatchEvent(new Event("change")),this._sliderRightInputElm?.dispatchEvent(new Event("change"))):(this._sliderRightInputElm&&(this._sliderRightInputElm.value=`${a}`),this._selectOperatorElm&&(this._selectOperatorElm.selectedIndex=0),this._currentValue=a,this._sliderRightInputElm?.dispatchEvent(new Event("change"))),(this.filterOptions?.hideSliderNumber??this.filterOptions?.hideSliderNumbers)||("double"===this.sliderType?this.renderSliderValues(a,u):this.renderSliderValues(void 0,a)),this.updateFilterStyle(!1),this.callback(void 0,{columnDef:this.columnDef,clearFilterTriggered:!0,shouldTriggerQuery:e,searchTerms:[]})}}destroy(){this._bindEventService.unbindAll(),this._sliderTrackElm?.remove(),this._sliderLeftInputElm?.remove(),this._sliderRightInputElm?.remove()}renderSliderValues(e,a,u=!0){const i=e?.toString()||"",r=a?.toString()||"";this._leftSliderNumberElm?.textContent&&(this._leftSliderNumberElm.textContent=i),this._rightSliderNumberElm?.textContent&&(this._rightSliderNumberElm.textContent=r),this._sliderRangeContainElm.title="double"===this.sliderType?`${i} - ${r}`:`${r}`,u&&this.grid.onHeaderRowMouseLeave.notify({column:this.columnDef,grid:this.grid})}getValues(){return"double"===this.sliderType?this._currentValues:this._currentValue}setValues(e,a,u=!1){if(e){let o=[];const d=Array.isArray(e)?e?.[0]:e;if(Array.isArray(e)&&2===e.length?o=e:"string"==typeof d&&d.indexOf("..")>0?(o=d.split(".."),this._currentValue=+(o?.[0]??0)):(xt(d)||""===d)&&(this._currentValue=null===d?void 0:+d,o=[d]),"double"!==this.sliderType&&this._sliderRightInputElm)this._sliderRightInputElm.value="string"==typeof e?e:`${d}`,this.renderSliderValues(void 0,this._sliderRightInputElm.value);else if(Array.isArray(o)&&2===o.length&&!this.filterOptions?.hideSliderNumbers){const[h,m]=o;this._sliderLeftInputElm&&(this._sliderLeftInputElm.value=String(h??ue.SLIDER_DEFAULT_MIN_VALUE)),this._sliderRightInputElm&&(this._sliderRightInputElm.value=String(m??ue.SLIDER_DEFAULT_MAX_VALUE)),this.renderSliderValues(...o)}}else this._currentValue=void 0,this._currentValues=void 0;const i=this.getValues(),r=void 0===i?[]:Array.isArray(i)?i:[i];if(this.updateFilterStyle(r.length>0),void 0!==a&&(this.operator=a),this.operator&&this._selectOperatorElm){const o=bv(this.operator);this._selectOperatorElm.value=o}u&&this.callback(void 0,{columnDef:this.columnDef,operator:this.operator,searchTerms:r,shouldTriggerQuery:!0})}createDomFilterElement(e){const a=this.columnDef?.id??"",u=+(this.columnFilter.minValue??ue.SLIDER_DEFAULT_MIN_VALUE),i=+(this.columnFilter.maxValue??ue.SLIDER_DEFAULT_MAX_VALUE),r=+(this.columnFilter.valueStep??ue.SLIDER_DEFAULT_STEP);_t(this._argFilterContainerElm);const o=+((Array.isArray(e)&&e?.[0])??this.filterOptions?.sliderStartValue??u),d=+((Array.isArray(e)&&e?.[1])??this.filterOptions?.sliderEndValue??i);if(this._sliderRangeContainElm=T("div",{className:`filter-input filter-${a} slider-input-container slider-values`,title:"double"===this.sliderType?`${o} - ${d}`:`${o}`}),this._sliderTrackElm=T("div",{className:"slider-track"}),"compound"===this.sliderType){const v=T("span",{className:"input-group-addon input-group-prepend operator"});this._selectOperatorElm=yL(this.getOperatorOptionValues(),this.grid),v.appendChild(this._selectOperatorElm)}"double"===this.sliderType&&(this._sliderLeftInputElm=T("input",{type:"range",className:"slider-filter-input",ariaLabel:this.columnFilter.ariaLabel??`${Qs(a+"")} Search Filter`,defaultValue:`${o}`,value:`${o}`,min:`${u}`,max:`${i}`,step:`${r}`}));const h="double"===this.sliderType?d:o;this._sliderRightInputElm=T("input",{type:"range",className:"slider-filter-input",ariaLabel:this.columnFilter.ariaLabel??`${Qs(a+"")} Search Filter`,defaultValue:`${h}`,value:`${h}`,min:`${u}`,max:`${i}`,step:`${r}`});const m=this.filterOptions?.hideSliderNumber??this.filterOptions?.hideSliderNumbers,g=m?"":"input-group";if(this._divContainerFilterElm=T("div",{className:`${g} search-filter slider-container slider-values filter-${a}`.trim()}),this._sliderRangeContainElm.appendChild(this._sliderTrackElm),"double"===this.sliderType&&this._sliderLeftInputElm&&this._sliderRangeContainElm.appendChild(this._sliderLeftInputElm),this._sliderRangeContainElm.appendChild(this._sliderRightInputElm),m)this._divContainerFilterElm.appendChild(this._sliderRangeContainElm);else{let v;"compound"===this.sliderType&&this._selectOperatorElm?(v=T("span",{className:"input-group-addon input-group-prepend operator"}),v.appendChild(this._selectOperatorElm)):"double"===this.sliderType&&(v=T("div",{className:"input-group-addon input-group-prepend slider-range-value"}),this._leftSliderNumberElm=T("span",{className:`input-group-text lowest-range-${a}`,textContent:`${o}`}),v.appendChild(this._leftSliderNumberElm));const k=T("div",{className:"input-group-addon input-group-append slider-range-value"});this._rightSliderNumberElm=T("span",{className:`input-group-text highest-range-${a}`,textContent:`${h}`},k),v&&this._divContainerFilterElm.appendChild(v),this._divContainerFilterElm.appendChild(this._sliderRangeContainElm),this._divContainerFilterElm.appendChild(k)}return this._sliderOptions={minValue:u,maxValue:i,step:r},this._currentValues=[o,d],Array.isArray(e)&&e.length>0&&""!==e[0]&&(this.updateFilterStyle(!0),this._currentValue=o),(void 0!==this.filterOptions.sliderStartValue||void 0!==this.columnFilter.minValue)&&(this._currentValue=o),this._argFilterContainerElm.appendChild(this._divContainerFilterElm),this.updateTrackFilledColorWhenEnabled(),this._bindEventService.bind(this._sliderTrackElm,"click",this.sliderTrackClicked.bind(this)),this._bindEventService.bind(this._sliderRightInputElm,["input","change"],this.slideRightInputChanged.bind(this)),this._bindEventService.bind(this._sliderRightInputElm,["change","mouseup","touchend"],this.onValueChanged.bind(this)),"compound"===this.sliderType&&this._selectOperatorElm?this._bindEventService.bind(this._selectOperatorElm,["change"],this.onValueChanged.bind(this)):"double"===this.sliderType&&this._sliderLeftInputElm&&(this._bindEventService.bind(this._sliderLeftInputElm,["input","change"],this.slideLeftInputChanged.bind(this)),this._bindEventService.bind(this._sliderLeftInputElm,["change","mouseup","touchend"],this.onValueChanged.bind(this))),this._divContainerFilterElm}getOperatorOptionValues(){let e;return e=this.columnFilter.compoundOperatorList?this.columnFilter.compoundOperatorList:FL(this.gridOptions,this.translaterService),AL(this.gridOptions,e,"numeric"),e}onValueChanged(e){const a=parseInt(this._sliderRightInputElm?.value??"",10);let u,i;if("compound"===this.sliderType||"single"===this.sliderType)"select"!==e?.target?.tagName?.toLowerCase()&&(this._currentValue=+a),u=this._currentValue,i=[u||"0"];else if("double"===this.sliderType){const o=[parseInt(this._sliderLeftInputElm?.value??"",10),a];u=o.join(".."),i=o}if(this._clearFilterTriggered)this.updateFilterStyle(!1),this.callback(e,{columnDef:this.columnDef,clearFilterTriggered:this._clearFilterTriggered,searchTerms:[],shouldTriggerQuery:this._shouldTriggerQuery});else{const r=this._selectOperatorElm?.value??this.operator;this.updateFilterStyle(""!==u);const o=this.columnFilter.skipCompoundOperatorFilterWithNullInput??this.gridOptions.skipCompoundOperatorFilterWithNullInput,d=o&&xt(this._currentValue)||!xt(this._currentValue)&&xt(this._lastSearchValue);("compound"!==this.sliderType||!o||d)&&this.callback(e,{columnDef:this.columnDef,operator:r||"",searchTerms:i,shouldTriggerQuery:this._shouldTriggerQuery})}this._clearFilterTriggered=!1,this._shouldTriggerQuery=!0,this.changeBothSliderFocuses(!1),this.grid.onHeaderRowMouseEnter.notify({column:this.columnDef,grid:this.grid},new Wt(e)),this._lastSearchValue=u}changeBothSliderFocuses(e){const a=e?"add":"remove";this._sliderLeftInputElm?.classList[a]("focus"),this._sliderRightInputElm?.classList[a]("focus")}slideLeftInputChanged(e){const a=parseInt(this._sliderLeftInputElm?.value??"",10),u=parseInt(this._sliderRightInputElm?.value??"",10);this._sliderLeftInputElm&&u-a<=(this.filterOptions?.stopGapBetweenSliderHandles??0)&&(this._sliderLeftInputElm.value=String(a-(this.filterOptions?.stopGapBetweenSliderHandles??0))),this._sliderLeftInputElm&&this._sliderRightInputElm&&(+this._sliderLeftInputElm.value>=+this._sliderRightInputElm.value-20?(this._sliderLeftInputElm.style.zIndex="1",this._sliderRightInputElm.style.zIndex="0"):(this._sliderLeftInputElm.style.zIndex="0",this._sliderRightInputElm.style.zIndex="1")),this.sliderLeftOrRightChanged(e,"left",a,u)}slideRightInputChanged(e){const a=parseInt(this._sliderLeftInputElm?.value??"",10),u=parseInt(this._sliderRightInputElm?.value??"",10);"double"===this.sliderType&&this._sliderRightInputElm&&u-a<=(this.filterOptions?.stopGapBetweenSliderHandles??0)&&(this._sliderRightInputElm.value=String(a+(this.filterOptions?.stopGapBetweenSliderHandles??0))),this.sliderLeftOrRightChanged(e,"right",a,u)}sliderLeftOrRightChanged(e,a,u,i){let r=!0;this.updateTrackFilledColorWhenEnabled(),this.changeBothSliderFocuses(!0),this._sliderRangeContainElm.title="double"===this.sliderType?`${u} - ${i}`:`${i}`,"double"===this.sliderType&&this._sliderLeftInputElm&&this._sliderRightInputElm&&("left"===a&&u>i?(this._sliderLeftInputElm.value=`${i}`,r=!1):"right"===a&&u>i&&(this._sliderRightInputElm.value=`${u}`,r=!1)),(this.filterOptions?.hideSliderNumber??this.filterOptions?.hideSliderNumbers)||(this._leftSliderNumberElm?.textContent&&(this._leftSliderNumberElm.textContent=this._sliderLeftInputElm?.value??""),this._rightSliderNumberElm?.textContent&&(this._rightSliderNumberElm.textContent=this._sliderRightInputElm?.value??"")),r&&this.grid.onHeaderRowMouseEnter.notify({column:this.columnDef,grid:this.grid},new Wt(e))}sliderTrackClicked(e){e.preventDefault();const i=100*(e.offsetX+0)/this._sliderTrackElm.offsetWidth;this._sliderRightInputElm&&"double"!==this.sliderType?(this._sliderRightInputElm.value=`${i}`,this._sliderRightInputElm.dispatchEvent(new Event("change"))):this._sliderLeftInputElm&&this._sliderRightInputElm&&(i<=50?(this._sliderLeftInputElm.value=`${i}`,this._sliderLeftInputElm.dispatchEvent(new Event("change"))):(this._sliderRightInputElm.value=`${i}`,this._sliderRightInputElm.dispatchEvent(new Event("change"))))}updateTrackFilledColorWhenEnabled(){if(this.filterOptions?.enableSliderTrackColoring&&this._sliderRightInputElm){let e=0;this._sliderLeftInputElm&&(e=(+this._sliderLeftInputElm.value-+this._sliderLeftInputElm.min)/(this.sliderOptions?.maxValue??0-+this._sliderLeftInputElm.min)*100);const a=(+this._sliderRightInputElm.value-+this._sliderRightInputElm.min)/(this.sliderOptions?.maxValue??0-+this._sliderRightInputElm.min)*100,u="linear-gradient(to right, %b %p1, %c %p1, %c %p2, %b %p2)".replace(/%b/g,"#eee").replace(/%c/g,this.filterOptions?.sliderTrackFilledColor||this._sliderTrackFilledColor||pT).replace(/%p1/g,`${e}%`).replace(/%p2/g,`${a}%`);this._sliderTrackElm.style.background=u,this._sliderOptions.sliderTrackBackground=u}}updateFilterStyle(e){e?(this._divContainerFilterElm.classList.add("filled"),this._filterElm?.classList.add("filled")):(this._divContainerFilterElm.classList.remove("filled"),this._filterElm?.classList.remove("filled"))}}var rme=Object.defineProperty,ea=(t,e,a)=>((t,e,a)=>e in t?rme(t,e,{enumerable:!0,configurable:!0,writable:!0,value:a}):t[e]=a)(t,"symbol"!=typeof e?e+"":e,a),lme=class{constructor(t){ea(this,"_distinctEvent"),ea(this,"_boundedEvents",[]),this._distinctEvent=t?.distinctEvent??!1}get boundedEvents(){return this._boundedEvents}dispose(){this.unbindAll(),this._boundedEvents=[]}bind(t,e,a,u,i=""){let r=Array.isArray(e)?e:[e];if("function"==typeof t?.forEach)t.forEach(o=>{for(let d of r)(!this._distinctEvent||this._distinctEvent&&!this.hasBinding(o,d))&&(o.addEventListener(d,a,u),this._boundedEvents.push({element:o,eventName:d,listener:a,groupName:i}))});else for(let o of r)(!this._distinctEvent||this._distinctEvent&&!this.hasBinding(t,o))&&(t.addEventListener(o,a,u),this._boundedEvents.push({element:t,eventName:o,listener:a,groupName:i}))}hasBinding(t,e){return this._boundedEvents.some(a=>a.element===t&&(!e||a.eventName===e))}unbind(t,e,a){if(t){let u=Array.isArray(t)?t:[t],i=Array.isArray(e)?e||"":[e||""];for(let r of u){a||(a=this._boundedEvents.find(o=>{if(o.element===r&&(!e||o.eventName===e))return o.listener}));for(let o of i)r?.removeEventListener?.(o,a)}}}unbindAll(t){if(t){let e=Array.isArray(t)?t:[t];for(let a=this._boundedEvents.length-1;a>=0;--a){let u=this._boundedEvents[a];if(e.some(i=>i===u.groupName)){let{element:i,eventName:r,listener:o}=u;this.unbind(i,r,o),this._boundedEvents.splice(a,1)}}}else for(;this._boundedEvents.length>0;){let e=this._boundedEvents.pop(),{element:a,eventName:u,listener:i}=e;this.unbind(a,u,i)}}},qW=typeof window<"u"&&void 0!==window.multipleSelect?window.multipleSelect:{locales:{}},sme={formatSelectAll:()=>"[Select all]",formatAllSelected:()=>"All selected",formatCountSelected:(t,e)=>`${t} of ${e} selected`,formatNoMatchesFound:()=>"No matches found",formatOkButton:()=>"OK"};qW.locales["en-US"]=sme;var YW=qW.locales,QW={name:"",placeholder:"",classes:"",classPrefix:"",data:void 0,locale:void 0,selectAll:!0,single:void 0,singleRadio:!1,multiple:!1,hideOptgroupCheckboxes:!1,multipleWidth:80,width:void 0,dropWidth:void 0,maxHeight:250,maxHeightUnit:"px",position:"bottom",displayValues:!1,displayTitle:!1,displayDelimiter:", ",minimumCountSelected:3,ellipsis:!1,isOpen:!1,keepOpen:!1,openOnHover:!1,container:null,filter:!1,filterGroup:!1,filterPlaceholder:"",filterAcceptOnEnter:!1,filterByDataLength:void 0,customFilter(t){let{text:e,label:a,search:u}=t;return(a||e||"").includes(u)},showClear:!1,autoAdjustDropHeight:!1,autoAdjustDropPosition:!1,autoAdjustDropWidthByTextSize:!1,adjustedHeightPadding:10,useSelectOptionLabel:!1,useSelectOptionLabelToHtml:!1,navigationHighlight:!0,infiniteScroll:!1,virtualScroll:!0,cssStyler:()=>null,textTemplate:t=>t.innerHTML.trim(),labelTemplate:t=>t.label,onOpen:()=>!1,onClose:()=>!1,onCheckAll:()=>!1,onUncheckAll:()=>!1,onFocus:()=>!1,onBlur:()=>!1,onOptgroupClick:()=>!1,onBeforeClick:()=>!0,onClick:()=>!1,onFilter:()=>!1,onFilterClear:()=>!1,onClear:()=>!1,onAfterCreate:()=>!1,onDestroy:()=>!1,onAfterDestroy:()=>!1,onDestroyed:()=>!1};Object.assign(QW,YW["en-US"]);var j0={BLOCK_ROWS:50,CLUSTER_BLOCKS:4,DEFAULTS:QW,METHODS:["init","getOptions","refreshOptions","getSelects","setSelects","enable","disable","open","close","check","uncheck","checkAll","uncheckAll","checkInvert","focus","blur","refresh","destroy"]};function ET(t){let u=Object.prototype.toString.call(t).slice(8,-1).toLowerCase();return"object"===u?(()=>{let i={};for(let r in t)Object.prototype.hasOwnProperty.call(t,r)&&(i[r]=ET(t[r]));return i})():"array"===u?t.map(i=>ET(i)):t}function vT(t){return null!=t&&""!==t}function S7(t,e,a){if(Array.isArray(t))for(let u of t){if(u[e]===a||u[e]===""+ +u[e]&&+u[e]===a)return u;if("optgroup"===u.type)for(let i of u.children)if(i&&(i[e]===a||i[e]===""+ +i[e]&&+i[e]===a))return i}}function bT(t){return Object.keys(t).forEach(e=>void 0===t[e]?delete t[e]:""),t}function Mv(t,e){if("string"!=typeof t)return t;if("function"==typeof e)return e(t);if("function"==typeof t.normalize)return t.normalize("NFD").replace(/[\u0300-\u036F]/g,"");throw new Error("[Multiple-Select-Vanilla] `normalize()` function is not defined, you can optionally provide a custom parser via the `diacriticParser` option.")}function kT(t){let e=0,a=0,u=0,i=0,r=window.innerHeight??0,o=window.innerWidth??0,d=function xme(){return{left:window.pageXOffset||document.documentElement.scrollLeft||0,top:window.pageYOffset||document.documentElement.scrollTop||0}}(),h=d.top,m=d.left,g=DT(t);if(g){let v=g.top??0,k=g.left??0;a=v-h,e=r-(v-h),u=k-m,i=o-(k-m)}return{top:a,bottom:e,left:u,right:i}}function xT(t=""){return t.split(" ").filter(e=>e)}function xr(t,e,a){let u=document.createElement(t);return e&&Object.keys(e).forEach(i=>{let r=e[i];"object"==typeof r?Object.assign(u[i],r):u[i]=e[i]}),a?.appendChild&&a.appendChild(u),u}function XW(t,e,a){let u=t.props?.innerHTML?function kme(t,e){let{[e]:a,...u}=t;return u}(t.props,"innerHTML"):t.props,i=xr(t.tagName,function gme(t,e){return"object"==typeof t?Object.fromEntries(e?Object.entries(t).filter(([a,u])=>!vT(u)&&!e.includes(a)||vT(u)):Object.entries(t).filter(([a,u])=>vT(u))):t}(u,["className","title","style"]),e),r=a;if(r||(r=i),t.props.innerHTML&&(i.innerHTML=t.props.innerHTML),t.attrs)for(let o of Object.keys(t.attrs))i.setAttribute(o,t.attrs[o]);if(t.children)for(let o of t.children)XW(o,i,r);return e?.appendChild(i),i}function fT(t){return t.hasOwnProperty("tagName")?XW(t):document.createElement("li")}function z7(t){for(;t?.firstChild;)t.lastChild&&t.removeChild(t.lastChild);return t}function DT(t){if(!t)return;let e=t?.getBoundingClientRect?.(),a=0,u=0,i=0,r=0;return void 0!==e?.top&&void 0!==e.left&&(a=e.top+window.pageYOffset,u=e.left+window.pageXOffset,r=e.right,i=e.bottom),{top:a,left:u,bottom:i,right:r}}function M7(t,e,a){if(!t)return 0;let u=Number.parseFloat(t.style[a]);if(!u||Number.isNaN(u)){switch(e){case"outer":u=t["width"===a?"offsetWidth":"offsetHeight"];break;case"scroll":u=t["width"===a?"scrollWidth":"scrollHeight"];break;default:u=t["width"===a?"clientWidth":"clientHeight"]}u=t.getBoundingClientRect()[a]}if(!u||Number.isNaN(u)){let i=t.style.display,r=t.style.position;t.style.display="block",t.style.position="absolute";let o=window.getComputedStyle(t)[a];u=Number.parseFloat(o),Number.isNaN(u)&&(u=0),t.style.display=i,t.style.position=r}return u||0}function eU(t,e){let a=null,u=t?.parentElement;for(;u;){let[i,r,o,d]=e.match(/^([a-z]*)([#.]{1})([a-z\-]+)$/i)||[];if(o&&d)for(let h of d.replace(o,"").split(" "))u.classList.contains(h)&&(r?u?.tagName.toLowerCase()===r&&(a=u):a=u);u=u.parentElement}return a}function aU(t,e){t?.style&&(t.style.display="none"===t.style.display&&!1!==e||!0===e?"block":"none")}var fme=class{constructor(t){ea(this,"clusterRows"),ea(this,"cache"),ea(this,"scrollEl"),ea(this,"blockHeight"),ea(this,"clusterHeight"),ea(this,"contentEl"),ea(this,"parentEl"),ea(this,"itemHeight"),ea(this,"lastCluster"),ea(this,"scrollTop"),ea(this,"dataStart"),ea(this,"dataEnd"),ea(this,"rows"),ea(this,"destroy"),ea(this,"callback"),ea(this,"sanitizer"),this.rows=t.rows,this.scrollEl=t.scrollEl,this.contentEl=t.contentEl,this.parentEl=t.contentEl?.parentElement,this.callback=t.callback,this.cache={},this.scrollTop=this.scrollEl.scrollTop,this.initDOM(this.rows),this.scrollEl.scrollTop=this.scrollTop,this.lastCluster=0;let e=()=>{this.lastCluster!==(this.lastCluster=this.getNum())&&(this.initDOM(this.rows),this.callback())};this.scrollEl.addEventListener("scroll",e,!1),this.destroy=()=>{this.scrollEl.removeEventListener("scroll",e,!1),z7(this.contentEl)}}reset(t){this.lastCluster=0,this.cache={},z7(this.contentEl),this.initDOM(t)}initDOM(t){if(typeof this.clusterHeight>"u"){this.cache.scrollTop=this.scrollEl.scrollTop;let r=fT(t[0]);this.contentEl.appendChild(r),this.contentEl.appendChild(r),this.contentEl.appendChild(r),this.cache.data=[t[0]],this.getRowsHeight()}let e=this.initData(t,this.getNum()),a=this.checkChanges("data",e.rows),u=this.checkChanges("top",e.topOffset),i=this.checkChanges("bottom",e.bottomOffset);z7(this.contentEl),a&&u?(e.topOffset&&this.contentEl.appendChild(this.getExtra("top",e.topOffset)),e.rows.forEach(r=>this.contentEl.appendChild(fT(r))),e.bottomOffset&&this.contentEl.appendChild(this.getExtra("bottom",e.bottomOffset))):i&&this.contentEl.lastChild&&(this.contentEl.lastChild.style.height=`${e.bottomOffset}px`)}getRowsHeight(){if(typeof this.itemHeight>"u"){let t=this.parentEl?.style.display||"";this.parentEl&&(""===t||"none"===t)&&(this.parentEl.style.display="block");let e=this.contentEl.children,a=e[Math.floor(e.length/2)];this.itemHeight=a.offsetHeight,this.parentEl&&(this.parentEl.style.display=t)}this.blockHeight=this.itemHeight*j0.BLOCK_ROWS,this.clusterRows=j0.BLOCK_ROWS*j0.CLUSTER_BLOCKS,this.clusterHeight=this.blockHeight*j0.CLUSTER_BLOCKS}getNum(){this.scrollTop=this.scrollEl.scrollTop;let t=(this.clusterHeight||0)-(this.blockHeight||0);return t&&Math.floor(this.scrollTop/t)||0}initData(t,e){if(t.lengthdelete this[e])))}initLocale(){if(this.options.locale){if("object"==typeof this.options.locale)return void Object.assign(this.options,this.options.locale);let t=window.multipleSelect.locales,e=this.options.locale.split(/-|_/);if(e[0]=e[0].toLowerCase(),e[1]&&(e[1]=e[1].toUpperCase()),t[this.options.locale])Object.assign(this.options,t[this.options.locale]);else if(t[e.join("-")])Object.assign(this.options,t[e.join("-")]);else{if(!t[e[0]])throw new Error(`[multiple-select-vanilla] invalid locales "${this.options.locale}", make sure to import it before using it`);Object.assign(this.options,t[e[0]])}}}initContainer(){let t=this.elm.getAttribute("name")||this.options.name||"";this.options.classes&&this.elm.classList.add(this.options.classes),this.options.classPrefix&&(this.elm.classList.add(this.options.classPrefix),this.options.size&&this.elm.classList.add(`${this.options.classPrefix}-${this.options.size}`)),this.elm.style.display="none",this.labelElm=this.elm.closest("label"),!this.labelElm&&this.elm.id&&(this.labelElm=document.createElement("label"),this.labelElm.htmlFor=this.elm.id),this.labelElm?.querySelector("input")&&(this.labelElm=null),typeof this.options.single>"u"&&(this.options.single=!this.elm.multiple),this.parentElm=xr("div",{className:xT(`ms-parent ${this.elm.className||""} ${this.options.classes}`).join(" "),dataset:{test:"sel"}}),this.options.darkMode&&this.parentElm.classList.add("ms-dark-mode");let e=this.elm.getAttribute("title")||"";e&&(this.parentElm.title=e),this.options.placeholder=this.options.placeholder||this.elm.getAttribute("placeholder")||"",this.choiceElm=xr("button",{className:"ms-choice",type:"button"},this.parentElm),this.options.labelId&&(this.choiceElm.id=this.options.labelId,this.choiceElm.setAttribute("aria-labelledby",this.options.labelId)),this.choiceElm.appendChild(xr("span",{className:"ms-placeholder",textContent:this.options.placeholder})),this.options.showClear&&(this.selectClearElm=xr("div",{className:"ms-icon ms-icon-close"}),this.selectClearElm.style.display="none",this.choiceElm.appendChild(this.selectClearElm)),this.choiceElm.appendChild(xr("div",{className:"ms-icon ms-icon-caret"})),this.dropElm=xr("div",{className:`ms-drop ${this.options.position}`,ariaExpanded:"false"},this.parentElm),this.options.darkMode&&this.dropElm.classList.add("ms-dark-mode"),t&&(this.dropElm.dataset.name=t);let a=this.elm.getAttribute("data-test")||this.options.dataTest;a&&(this.parentElm.dataset.test=a,this.dropElm.dataset.test=a),this.closeElm=this.choiceElm.querySelector(".ms-icon-close"),this.options.dropWidth&&(this.dropElm.style.width="string"==typeof this.options.dropWidth?this.options.dropWidth:`${this.options.dropWidth}px`),function bme(t,e){t.parentNode?.insertBefore(e,t.nextSibling)}(this.elm,this.parentElm),this.elm.disabled&&(this.choiceElm.classList.add("disabled"),this.choiceElm.disabled=!0),this.selectAllName=`selectAll${t}`,this.selectGroupName=`selectGroup${t}`,this.selectItemName=`selectItem${t}`,this.options.keepOpen||(this._bindEventService.unbindAll("body-click"),this._bindEventService.bind(document.body,"click",u=>{this.getEventTarget(u)===this.choiceElm||eU(this.getEventTarget(u),".ms-choice")===this.choiceElm||(this.getEventTarget(u)===this.dropElm||eU(this.getEventTarget(u),".ms-drop")!==this.dropElm&&this.getEventTarget(u)!==this.elm)&&this.options.isOpen&&this.close("body.click")},void 0,"body-click"))}initData(){let t=[];if(this.options.data){if(Array.isArray(this.options.data))this.data=this.options.data.map(e=>"string"==typeof e||"number"==typeof e?{text:e,value:e}:e);else if("object"==typeof this.options.data){for(let[e,a]of Object.entries(this.options.data))t.push({value:e,text:`${a}`});this.data=t}}else this.elm.childNodes.forEach(e=>{let a=this.initRow(e);a&&t.push(a)}),this.options.data=t,this.data=t,this.fromHtml=!0;this.dataTotal=function Eme(t){let e=0;return t.forEach((a,u)=>{"optgroup"===a.type?(a._key=`group_${u}`,a.visible=typeof a.visible>"u"||a.visible,a.children.forEach((i,r)=>{i&&(i.visible=typeof i?.visible>"u"||i.visible,i.divider||(i._key=`option_${u}_${r}`,e+=1))})):(a.visible=typeof a.visible>"u"||a.visible,a.divider||(a._key=`option_${u}`,e+=1))}),e}(this.data||[])}initRow(t,e){let a={};return"option"===t.tagName?.toLowerCase()?(a.type="option",a.text=this.options.textTemplate(t),a.value=t.value,a.visible=!0,a.selected=!!t.selected,a.disabled=e||t.disabled,a.classes=t.getAttribute("class")||"",a.title=t.getAttribute("title")||"",t.dataset.value&&(a._value=t.dataset.value),Object.keys(t.dataset).length&&(a._data=t.dataset,a._data.divider&&(a.divider=a._data.divider)),a):"optgroup"===t.tagName?.toLowerCase()?(a.type="optgroup",a.label=this.options.labelTemplate(t),a.visible=!0,a.selected=!!t.selected,a.disabled=t.disabled,a.children=[],Object.keys(t.dataset).length&&(a._data=t.dataset),t.childNodes.forEach(u=>{a.children.push(this.initRow(u,a.disabled))}),a):null}initDrop(){this.initList(),this.update(!0),this.options.isOpen&&this.open(10),this.options.openOnHover&&this.parentElm&&(this._bindEventService.bind(this.parentElm,"mouseover",()=>this.open(null)),this._bindEventService.bind(this.parentElm,"mouseout",()=>this.close("hover.mouseout")))}initFilter(){if(this.filterText="",this.options.filter||!this.options.filterByDataLength)return;let t=0;for(let e of this.data||[])"optgroup"===e.type?t+=e.children.length:t+=1;this.options.filter=t>this.options.filterByDataLength}initList(){if(this.options.filter&&(this.filterParentElm=xr("div",{className:"ms-search"},this.dropElm),this.filterParentElm.appendChild(xr("input",{autocomplete:"off",autocapitalize:"off",spellcheck:!1,type:"text",placeholder:this.options.filterPlaceholder||"\u{1f50e}\ufe0e"})),this.options.showSearchClear&&this.filterParentElm.appendChild(xr("span",{className:"ms-icon ms-icon-close"}))),this.options.selectAll&&!this.options.single){let t=this.elm.getAttribute("name")||this.options.name||"";this.selectAllParentElm=xr("div",{className:"ms-select-all",dataset:{key:"select_all"}});let e=document.createElement("label"),a="ms-icon "+(this.isAllSelected?"ms-icon-check":this.isPartiallyAllSelected?"ms-icon-minus":"ms-icon-uncheck"),u=xr("div",{className:"icon-checkbox-container"},e);xr("input",{type:"checkbox",ariaChecked:String(this.isAllSelected),checked:this.isAllSelected,dataset:{name:`selectAll${t}`}},u),xr("div",{className:a},u),e.appendChild(xr("span",{textContent:this.formatSelectAll()})),this.selectAllParentElm.appendChild(e),this.dropElm?.appendChild(this.selectAllParentElm)}this.ulElm=document.createElement("ul"),this.ulElm.role="combobox",this.ulElm.ariaExpanded="false",this.ulElm.ariaMultiSelectable=String(!this.options.single),this.dropElm?.appendChild(this.ulElm),this.options.showOkButton&&!this.options.single&&(this.okButtonElm=xr("button",{className:"ms-ok-button",type:"button",textContent:this.formatOkButton()},this.dropElm)),this.initListItems()}initListItems(){let t=0,e=this.getListRows();if(this.options.selectAll&&!this.options.single&&(t=-1),e.length>j0.BLOCK_ROWS*j0.CLUSTER_BLOCKS){let a=this.dropElm&&"none"!==this.dropElm?.style.display;!a&&this.dropElm&&(this.dropElm.style.left="-10000",this.dropElm.style.display="block",this.dropElm.ariaExpanded="true");let u=()=>{if(this.virtualScroll){this._currentHighlightIndex=0,this.updateDataStart=this.virtualScroll.dataStart+t,this.updateDataEnd=this.virtualScroll.dataEnd+t,this.updateDataStart<0&&(this.updateDataStart=0,this._currentHighlightIndex=0);let i=this.getDataLength();this.updateDataEnd>i&&(this.updateDataEnd=i),this.ulElm&&(this.isMoveUpRecalcRequired?this.recalculateArrowMove("up"):this.virtualScroll.dataStart>this.updateDataStart&&this.recalculateArrowMove("down"))}};this.ulElm&&(this.virtualScroll?this.virtualScroll.reset(e):this.virtualScroll=new fme({rows:e,scrollEl:this.ulElm,contentEl:this.ulElm,sanitizer:this.options.sanitizer,callback:()=>{u(),this.events()}})),u(),!a&&this.dropElm&&(this.dropElm.style.left="0",this.dropElm.style.display="none",this.dropElm.ariaExpanded="false")}else this.ulElm&&(z7(this.ulElm),e.forEach(a=>this.ulElm.appendChild(fT(a)))),this.updateDataStart=0,this.updateDataEnd=this.updateData.length;return this.events(),e}getEventTarget(t){return t.composedPath?t.composedPath()[0]:t.target}getListRows(){let t=[];return this.updateData=[],this.data?.forEach(e=>t.push(...this.initListItem(e))),this.options.infiniteScroll&&t.push({tagName:"li",props:{className:"ms-infinite-option",role:"option"}}),t.push({tagName:"li",props:{className:"ms-no-results",textContent:this.formatNoMatchesFound()}}),t}initListItem(t,e=0){let a=t?.title||"",u=this.options.multiple?"multiple":"",i=this.options.single?"radio":"checkbox",r=!!t?.selected,o=this.options.single&&!this.options.singleRadio,d="";if(!t?.visible)return[];if(this.updateData.push(t),o&&(d="hide-radio "),t.selected&&(d+="selected "),"optgroup"===t.type){let F,C=[];if(this.options.hideOptgroupCheckboxes||this.options.single)F={tagName:"span",props:{dataset:{name:this.selectGroupName,key:t._key}}};else{let L={tagName:"input",props:{type:"checkbox",dataset:{name:this.selectGroupName,key:t._key},checked:r,disabled:t.disabled}};F=o?L:{tagName:"div",props:{className:"icon-checkbox-container"+("radio"===i?" radio":"")},children:[L,{tagName:"div",props:{className:"ms-icon "+(r?"radio"===i?"ms-icon-radio":"ms-icon-check":"ms-icon-uncheck")}}]}}!d.includes("hide-radio")&&(this.options.hideOptgroupCheckboxes||this.options.single)&&(d+="hide-radio ");let A={tagName:"span",props:{}};this.applyAsTextOrHtmlWhenEnabled(A.props,t.label);let z={tagName:"li",props:{className:xT(`group${this.options.single||t.disabled?" disabled":""} ${d}`).join(" "),role:"option",ariaSelected:String(r),dataset:{key:t._key}},children:[{tagName:"label",props:{className:xT("optgroup"+(this.options.single||t.disabled?" disabled":"")).join(" ")},children:[F,A]}]},M=this.options.cssStyler(t);return M&&(z.props.style=M),C.push(z),t.children.forEach(L=>C.push(...this.initListItem(L,1))),C}if(d+=t.classes||"",e&&this.options.single&&(d+=`option-level-${e} `),t.divider)return[{tagName:"li",props:{className:"option-divider"}}];let h=u||d?(u+d).trim():"";t.disabled&&(h+=" disabled");let m=""+(t.disabled?"disabled":""),g={tagName:"span",props:{}};this.applyAsTextOrHtmlWhenEnabled(g.props,t.text);let v={tagName:"input",props:{type:i,value:encodeURI(t.value),dataset:{key:t._key,name:this.selectItemName},checked:r,disabled:!!t.disabled}};t.selected&&(v.attrs={checked:"checked"});let k={tagName:"div",props:{className:"icon-checkbox-container"+("radio"===i?" radio":"")},children:[v,{tagName:"div",props:{className:"ms-icon "+(v.props.checked?"radio"===i?"ms-icon-radio":"ms-icon-check":"ms-icon-uncheck")}}]},x={tagName:"li",props:{role:"option",title:a,ariaSelected:String(r),dataset:{key:t._key}},children:[{tagName:"label",props:{className:m},children:[o?v:k,g]}]};h&&(x.props.className=h);let D=this.options.cssStyler(t);return D&&(x.props.style=D),[x]}initSelected(t=!1){let e=0;for(let a of this.data||[])if("optgroup"===a.type){let u=a.children.filter(i=>i?.selected&&!i.disabled&&i.visible).length;a.children.length&&(a.selected=!this.options.single&&u&&u===a.children.filter(i=>i&&!i.disabled&&i.visible&&!i.divider).length),e+=u}else e+=a.selected&&!a.disabled&&a.visible?1:0;this.isAllSelected=this.data?.filter(a=>a.selected&&!a.disabled&&a.visible).length===this.data?.filter(a=>!a.disabled&&a.visible&&!a.divider).length,this.isPartiallyAllSelected=!this.isAllSelected&&e>0,t||(this.isAllSelected?this.options.onCheckAll():0===e&&this.options.onUncheckAll())}initView(){let t;window.getComputedStyle?(t=window.getComputedStyle(this.elm).width,"auto"===t&&(t=M7(this.dropElm,"outer","width")+20)):t=M7(this.elm,"outer","width")+20,this.parentElm.style.width=`${this.options.width||t}px`,this.elm.classList.add("ms-offscreen")}events(){this._bindEventService.unbindAll(["ok-button","search-input","select-all-checkbox","input-checkbox-list","group-checkbox-list","hover-highlight","arrow-highlight","option-list-scroll"]),this.clearSearchIconElm=this.filterParentElm?.querySelector(".ms-icon-close"),this.searchInputElm=this.dropElm?.querySelector(".ms-search input"),this.selectAllElm=this.dropElm?.querySelector(`input[data-name="${this.selectAllName}"]`),this.selectGroupElms=this.dropElm?.querySelectorAll(`input[data-name="${this.selectGroupName}"],span[data-name="${this.selectGroupName}"]`),this.selectItemElms=this.dropElm?.querySelectorAll(`input[data-name="${this.selectItemName}"]:enabled`),this.noResultsElm=this.dropElm?.querySelector(".ms-no-results");let t=e=>{e.preventDefault(),!this.getEventTarget(e).classList.contains("ms-icon-close")&&(this.options.isOpen?this.close("toggle.close"):this.open())};this.labelElm&&this._bindEventService.bind(this.labelElm,"click",e=>{"label"===this.getEventTarget(e).nodeName.toLowerCase()&&(t(e),(!this.options.filter||!this.options.isOpen)&&this.focus(),e.stopPropagation())}),this._bindEventService.bind(this.choiceElm,"click",t),this.options.onFocus&&this._bindEventService.bind(this.choiceElm,"focus",this.options.onFocus),this.options.onBlur&&this._bindEventService.bind(this.choiceElm,"blur",this.options.onBlur),this._bindEventService.bind(this.parentElm,"keydown",e=>{"Escape"===e.code&&this.handleEscapeKey()}),this.closeElm&&this._bindEventService.bind(this.closeElm,"click",e=>{e.preventDefault(),this._checkAll(!1,!0),this.initSelected(!1),this.updateSelected(),this.update(),this.options.onClear()}),this.clearSearchIconElm&&this._bindEventService.bind(this.clearSearchIconElm,"click",e=>{e.preventDefault(),this.searchInputElm&&(this.searchInputElm.value="",this.searchInputElm.focus()),this._currentHighlightIndex=-1,this.moveHighlightDown(),this.filter(),this.options.onFilterClear()}),this.searchInputElm&&(this._bindEventService.bind(this.searchInputElm,"keydown",e=>{"Tab"===e.code&&e.shiftKey&&this.close("key.shift+tab")},void 0,"search-input"),this._bindEventService.bind(this.searchInputElm,"keyup",e=>{if(this.options.filterAcceptOnEnter&&["Enter","Space"].includes(e.code)&&this.searchInputElm?.value){if(this.options.single){let a=[];this.selectItemElms?.forEach(u=>{"none"!==u.closest("li")?.style.display&&a.push(u)}),a.length&&a[0].hasAttribute("data-name")&&this.setSelects([a[0].value])}else this.selectAllElm?.click();return this.close(`key.${e.code.toLowerCase()}`),void this.focus()}this.filter()},void 0,"search-input")),this.selectAllElm&&this._bindEventService.bind(this.selectAllElm,"click",e=>this._checkAll(e.currentTarget?.checked),void 0,"select-all-checkbox"),this.okButtonElm&&this._bindEventService.bind(this.okButtonElm,"click",e=>{t(e),e.stopPropagation()},void 0,"ok-button"),this.selectGroupElms&&this._bindEventService.bind(this.selectGroupElms,"click",e=>{let a=e.currentTarget,u=a.checked,i=S7(this.data,"_key",a.dataset.key);this._checkGroup(i,u),this.options.onOptgroupClick(bT({label:i.label,selected:i.selected,data:i._data,children:i.children.map(r=>{if(r)return bT({text:r.text,value:r.value,selected:r.selected,disabled:r.disabled,data:r._data})})}))},void 0,"group-checkbox-list"),this.selectItemElms&&this._bindEventService.bind(this.selectItemElms,"click",e=>{let a=e.currentTarget,u=a.checked,i=S7(this.data,"_key",a.dataset.key),r=()=>{this.options.single&&this.options.isOpen&&!this.options.keepOpen&&this.close("selection")};!1!==this.options.onBeforeClick(i)?(this._check(i,u),this.options.onClick(bT({text:i.text,value:i.value,selected:i.selected,data:i._data})),r()):r()},void 0,"input-checkbox-list"),this.lastFocusedItemKey&&this.dropElm&&this.dropElm.querySelector(`li[data-key=${this.lastFocusedItemKey}]`)?.focus(),this.options.navigationHighlight&&this.dropElm&&(this._bindEventService.bind(this.dropElm,"mouseover",e=>{let a=this.getEventTarget(e).closest(".ms-select-all")||this.getEventTarget(e).closest("li");if(this.dropElm?.contains(a)&&this.lastMouseOverPosition!==`${e.clientX}:${e.clientY}`){let u=this.dropElm?.querySelectorAll(hf)||[],i=Array.from(u).findIndex(r=>r.dataset.key===a.dataset.key);this._currentHighlightIndex!==i&&!a.classList.contains("disabled")&&(this._currentSelectedElm=a,this._currentHighlightIndex=i,this.changeCurrentOptionHighlight(a))}this.lastMouseOverPosition=`${e.clientX}:${e.clientY}`},void 0,"hover-highlight"),this._bindEventService.bind(this.dropElm,"keydown",e=>{switch(e.key){case"ArrowUp":e.preventDefault(),this.moveHighlightUp();break;case"ArrowDown":e.preventDefault(),this.moveHighlightDown();break;case"Escape":this.handleEscapeKey();break;case"Enter":case" ":if(document.activeElement!==this.okButtonElm){let a=this.getEventTarget(e).closest(".ms-select-all")||this.getEventTarget(e).closest("li");if(" "===e.key&&this.options.filter||this.options.filterAcceptOnEnter&&!a)return;e.preventDefault(),this._currentSelectedElm?.querySelector("input")?.click(),this.options.single&&(this.choiceElm.focus(),this.lastFocusedItemKey=this.choiceElm?.dataset.key||"")}break;case"Tab":e.preventDefault(),e.shiftKey?document.activeElement===this.okButtonElm?(this.focusSelectAllOrList(),this.highlightCurrentOption()):(this.close("key.shift+tab"),this.choiceElm.focus()):(this.changeCurrentOptionHighlight(),this.okButtonElm?.focus())}},void 0,"arrow-highlight")),this.ulElm&&this.options.infiniteScroll&&this._bindEventService.bind(this.ulElm,"scroll",this.infiniteScrollHandler.bind(this),void 0,"option-list-scroll")}handleEscapeKey(){this.options.keepOpen||(this.close("key.escape"),this.choiceElm.focus())}infiniteScrollHandler(t,e,a){let u=!1;t&&this.getEventTarget(t)&&this.ulElm&&this.scrolledByMouse?this.getEventTarget(t).scrollTop+this.getEventTarget(t).clientHeight===this.ulElm.scrollHeight&&(u=!0):void 0!==e&&e+1===a&&(u=!0),u&&this.ulElm&&(this.virtualScroll?this.initListItems():this.ulElm.scrollTop=0,this._currentHighlightIndex=0,this.highlightCurrentOption())}open(t=0){return new Promise(e=>{null!==t&&t>=0?(clearTimeout(this.openDelayTimer),this.openDelayTimer=setTimeout(()=>{this.openDrop(),e()},t)):(this.openDrop(),e())})}openDrop(){if(!this.dropElm||this.choiceElm?.classList.contains("disabled"))return;if(this.options.isOpen=!0,this.parentElm.classList.add("ms-parent-open"),this.choiceElm?.querySelector("div.ms-icon-caret")?.classList.add("open"),this.dropElm.style.display="block",this.dropElm.ariaExpanded="true",this.selectAllElm?.parentElement&&(this.selectAllElm.parentElement.style.display="inline-flex"),this.noResultsElm&&(this.noResultsElm.style.display="none"),this.getDataLength()||(this.selectAllElm?.parentElement&&(this.selectAllElm.parentElement.style.display="none"),this.noResultsElm&&(this.noResultsElm.style.display="block")),this.options.container){let i,u=DT(this.dropElm);this.options.container instanceof Node?i=this.options.container:"string"==typeof this.options.container&&(i="body"===this.options.container?document.body:document.querySelector(this.options.container)),i.appendChild(this.dropElm),this.dropElm.style.top=`${u?.top??0}px`,this.dropElm.style.left=`${u?.left??0}px`,this.dropElm.style.minWidth="auto",this.dropElm.style.width=`${M7(this.parentElm,"outer","width")}px`}let t=this.options.minHeight,e=this.options.maxHeight;"row"===this.options.maxHeightUnit&&(e=M7(this.dropElm.querySelector("ul>li"),"outer","height")*this.options.maxHeight),this.ulElm??=this.dropElm.querySelector("ul"),this.ulElm&&(t&&(this.ulElm.style.minHeight=`${t}px`),this.ulElm.style.maxHeight=`${e}px`),this.dropElm.querySelectorAll(".multiple").forEach(u=>{u.style.width=`${this.options.multipleWidth}px`}),this.getDataLength()&&this.options.filter?(this.searchInputElm&&(this.searchInputElm.value="",this.searchInputElm.focus()),this.filter(!0)):this.focusSelectAllOrList(),this._currentHighlightIndex<0?this.moveHighlightDown():this.highlightCurrentOption(),this.options.autoAdjustDropWidthByTextSize&&this.adjustDropWidthByText();let a=this.options.position;if(this.options.autoAdjustDropHeight){if(this.options.autoAdjustDropPosition){let{bottom:u,top:i}=kT(this.dropElm);a=uu?"top":"bottom"}this.adjustDropHeight(a)}this.options.autoAdjustDropPosition&&this.adjustDropPosition(!0),this.options.onOpen()}focusSelectAllOrList(){this.selectAllElm?this.selectAllElm.focus():this.ulElm&&(this.ulElm.tabIndex=0,this.ulElm.focus())}highlightCurrentOption(){let t=this.dropElm?.querySelectorAll(hf)||[];if(this._currentHighlightIndex<=t.length){let e=t[this._currentHighlightIndex];e&&(this.lastFocusedItemKey=e.dataset.key||"",this._currentSelectedElm=e,this.scrolledByMouse=!1,e.scrollIntoView({block:"nearest"}),this.changeCurrentOptionHighlight(e),setTimeout(()=>this.scrolledByMouse=!0,10))}}changeCurrentOptionHighlight(t){t?.classList.add("highlighted"),(this.dropElm?.querySelectorAll(".ms-select-all.highlighted, ul li[data-key].highlighted")||[]).forEach(e=>{e!==t&&e.classList.remove("highlighted")})}moveHighlightDown(){let t=this.dropElm?.querySelectorAll(hf)||[],e=t.length;this._currentHighlightIndex0&&this.ulElm){let a=t[this._currentHighlightIndex+(this.options.single?0:1)],u=a?.dataset.key;return this.lastFocusedItemKey=u,this.ulElm.scrollTop=this.ulElm.scrollTop-a?.getBoundingClientRect().height||10,void(this.isMoveUpRecalcRequired=!0)}this._currentHighlightIndex>0&&(this._currentHighlightIndex--,t[this._currentHighlightIndex]?.classList.contains("disabled")&&this.moveHighlightUp()),this.highlightCurrentOption()}recalculateArrowMove(t){let e=this.dropElm?.querySelectorAll(hf)||[],a=Array.from(e).findIndex(u=>u.dataset.key===this.lastFocusedItemKey);this._currentHighlightIndex=a-1,"down"===t?this.moveHighlightDown():"up"===t&&(this.moveHighlightUp(),this.isMoveUpRecalcRequired=!1)}close(t){this.options.isOpen=!1,this.parentElm.classList.remove("ms-parent-open"),this.choiceElm?.querySelector("div.ms-icon-caret")?.classList.remove("open"),this.dropElm&&(this.dropElm.style.display="none",this.dropElm.ariaExpanded="false",this.options.container&&(this.parentElm.appendChild(this.dropElm),this.dropElm.style.top="auto",this.dropElm.style.left="auto")),this.options.onClose(t)}applyAsTextOrHtmlWhenEnabled(t,e){t||(t={}),this.isRenderAsHtml?t.innerHTML="function"==typeof this.options.sanitizer?this.options.sanitizer(e):e:t.textContent=e}update(t=!1){let e=this.getSelects(),a=this.getSelects("text");this.options.displayValues&&(a=e);let u=this.choiceElm?.querySelector("span"),i=e.length,r=null,o=()=>{if(this.options.useSelectOptionLabel||this.options.useSelectOptionLabelToHtml){let h=e.join(this.options.displayDelimiter);return this.options.useSelectOptionLabelToHtml?function vme(t){return t.replace(/(\b)(on[a-z]+)(\s*)=([^>]*)|javascript:([^>]*)[^>]*|(<\s*)(\/*)script([<>]*).*(<\s*)(\/*)script(>*)|(<|<)(\/*)(script|script defer)(.*)(>|>|>">)/gi,"")}(h):h}return a.join(this.options.displayDelimiter)};if(u){if(0===i){let h=this.options.placeholder||"";u.classList.add("ms-placeholder"),this.applyAsTextOrHtmlWhenEnabled(u,h)}else r=ithis.options.minimumCountSelected?`${a.slice(0,this.options.minimumCountSelected).join(this.options.displayDelimiter)}...`:this.formatCountSelected(i,this.dataTotal)&&i>this.options.minimumCountSelected?this.formatCountSelected(i,this.dataTotal):o();if(null!==r&&(u?.classList.remove("ms-placeholder"),this.applyAsTextOrHtmlWhenEnabled(u,r)),this.options.showClear&&this.selectClearElm){let h=r?"block":"none";this.selectClearElm.style.display=h}if(this.options.displayTitle){let h=this.options.useSelectOptionLabel||this.options.useSelectOptionLabelToHtml?"value":"text";u.title=this.getSelects(h).join(this.options.displayDelimiter)}}let d=this.getSelects();this.options.single?this.elm.value=d.length?d[0]:"":Array.from(this.elm.options).forEach(h=>{h.selected=d.some(m=>m===h.value)}),t||this.elm.dispatchEvent(new Event("change"))}updateSelected(t){for(let a=this.updateDataStart;aa.visible).length;if(this.selectAllElm){this.selectAllElm.ariaChecked=String(this.isAllSelected);let a=this.dropElm?.querySelector(".ms-select-all .icon-checkbox-container div");if(a){let u="";u=this.isAllSelected?"ms-icon-check":this.isPartiallyAllSelected?"ms-icon-minus":"ms-icon-uncheck",a.className=`ms-icon ${u}`}this.selectAllElm.checked=this.isAllSelected,aU(this.selectAllElm.closest("li"),!e)}aU(this.noResultsElm,e),this.virtualScroll&&(this.virtualScroll.rows=t??this.getListRows())}getData(){return this.options.data}getDataLength(){return this.data?.length??0}getOptions(t=!0){let e=Object.assign({},this.options);return delete e.data,t?ET(e):this.options}refreshOptions(t){(function pme(t,e,a=!1){let u=Object.keys(t),i=Object.keys(e);if(a&&u.length!==i.length)return!1;for(let r of u)if(i.includes(r)&&t[r]!==e[r])return!1;return!0})(this.options,t,!0)||(this.options=Object.assign(this.options,t),this.destroy(!1),this.init())}getDropElement(){return this.dropElm}getParentElement(){return this.parentElm}getSelects(t="value"){let e=[];for(let a of this.data||[])if("optgroup"===a.type){let u=a.children.filter(i=>i?.selected);if(!u.length)continue;if("value"===t||this.options.single)e.push(...u.map(i=>"value"===t&&i._value||i[t]));else{let i=[];i.push("["),i.push(a.label),i.push(`: ${u.map(r=>r[t]).join(", ")}`),i.push("]"),e.push(i.join(""))}}else a.selected&&e.push("value"===t&&a._value||a[t]);return e}setSelects(t,e="value",a=!1){let u=!1,i=r=>{for(let o of r){let d=!1;if("text"===e){let h=document.createElement("div");this.applyAsTextOrHtmlWhenEnabled(h,o.text),d=t.includes(h.textContent?.trim()??"")}else d=t.includes(o._value||o.value),!d&&o.value===""+ +o.value&&(d=t.includes(+o.value));o.selected!==d&&(u=!0),o.selected=d}};for(let r of this.data||[])"optgroup"===r.type?i(r.children):i([r]);u&&(this.initSelected(a),this.updateSelected(),this.update(a))}enable(){this.choiceElm&&(this.choiceElm.classList.remove("disabled"),this.choiceElm.disabled=!1)}disable(){this.choiceElm&&(this.choiceElm?.classList.add("disabled"),this.choiceElm.disabled=!0)}check(t){let e=S7(this.data,"value",t);e&&this._check(e,!0)}uncheck(t){let e=S7(this.data,"value",t);e&&this._check(e,!1)}_check(t,e){this.options.single&&this._checkAll(!1,!0),t.selected=e,this.initSelected(),this.updateSelected(),this.update()}checkAll(){this._checkAll(!0)}uncheckAll(){this._checkAll(!1)}_checkAll(t,e){for(let a of this.data||[])"optgroup"===a.type?this._checkGroup(a,t,!0):!a.disabled&&!a.divider&&(e||a.visible)&&(a.selected=t);e||(this.initSelected(),this.updateSelected(),this.update())}_checkGroup(t,e,a){t.selected=e,t.children.forEach(u=>{u&&!u.disabled&&!u.divider&&(a||u.visible)&&(u.selected=e)}),a||(this.initSelected(),this.updateSelected(),this.update())}checkInvert(){if(!this.options.single){for(let t of this.data||[])if("optgroup"===t.type)for(let e of t.children)e&&(e.divider||(e.selected=!e.selected));else t&&!t.divider&&(t.selected=!t.selected);this.initSelected(),this.updateSelected(),this.update()}}focus(){this.choiceElm?.focus(),this.options.onFocus()}blur(){this.choiceElm?.blur(),this.options.onBlur()}refresh(){this.destroy(!1),this.init()}filter(t){let e=this.searchInputElm?.value.trim()??"",a=e.toLowerCase();if(this.filterText===a)return;this.filterText=a;for(let i of this.data||[])if("optgroup"===i.type)if(this.options.filterGroup){let r=`${i?.label??""}`;if(null!=i){let o=this.options.customFilter({label:Mv(r.toString().toLowerCase(),this.options.diacriticParser),search:Mv(a,this.options.diacriticParser),originalLabel:r,originalSearch:e,row:i});i.visible=o;for(let d of i.children)d&&(d.visible=o)}}else{for(let r of i.children)if(null!=r){let o=`${r?.text??""}`;r.visible=this.options.customFilter({text:Mv(o.toString().toLowerCase(),this.options.diacriticParser),search:Mv(a,this.options.diacriticParser),originalText:o,originalSearch:e,row:r,parent:i})}i.visible=i.children.filter(r=>r?.visible).length>0}else{let r=`${i?.text??""}`;i.visible=this.options.customFilter({text:Mv(r.toString().toLowerCase(),this.options.diacriticParser),search:Mv(a,this.options.diacriticParser),originalText:r,originalSearch:e,row:i})}let u=this.initListItems();this.initSelected(t),this.updateSelected(u),t||this.options.onFilter(e)}adjustDropHeight(t){let e="top"!==t,r=(this.filterParentElm?.getBoundingClientRect().height??0)+(this.okButtonElm?.getBoundingClientRect().height??0)+(this.options.single?0:this.selectAllParentElm?.getBoundingClientRect().height??0)+5,{bottom:o,top:d}=kT(this.parentElm),h=this.options.maxHeight;if(h=e?o-r-this.options.adjustedHeightPadding:d-r-this.options.adjustedHeightPadding,!this.options.maxHeight||this.options.maxHeight&&ho)e="bottom";else if(o>a&&u>a){if(this.options.container){let g=i-o;g<0&&(g=0),(g>0||t)&&(e="top",this.dropElm.style.top=`${g<0?0:g}px`)}else e="top",this.dropElm.classList.add(e);this.dropElm.classList.remove("bottom")}h-da.clientHeight?this.getScrollbarWidth():0,o=0;this.dropElm.querySelectorAll("li label").forEach(d=>{d.scrollWidth>o&&(o=d.scrollWidth)}),o+=u+r,othis.options.maxWidth&&(o=this.options.maxWidth),this.options.minWidth&&o"string"==typeof t?CT(document.querySelectorAll(t),e):t instanceof Node?CT([t],e):CT(t,e);function CT(t,e){let a=Array.from(t),u=[];for(let i=0;idelete r._multipleSelect,o.onAfterHardDestroyed=()=>u[i]=null,u.push(r._multipleSelect)}catch(o){console.error(o)}}return 1===u.length?u[0]:u}Lv.defaults=j0.DEFAULTS,Lv.locales={...YW},Lv.methods=j0.METHODS,typeof window<"u"&&(window.multipleSelect=Lv);class tU{constructor(e,a,u,i=!0){this.translaterService=e,this.collectionService=a,this.rxjs=u,this._isMultipleSelect=!0,this._collectionLength=0,this._shouldTriggerQuery=!0,this.isFilled=!1,this.enableTranslateLabel=!1,this.subscriptions=[],this._isMultipleSelect=i}get collectionOptions(){return this.columnDef?.filter?.collectionOptions??{}}get columnFilter(){return this.columnDef?.filter??{}}get customStructure(){return this.columnDef?.filter?.customStructure}get gridOptions(){return this.grid?.getOptions()??{}}get defaultOperator(){return this.isMultipleSelect?te.in:te.equal}get filterOptions(){return{...this.gridOptions.defaultFilterOptions?.select,...this.columnFilter?.filterOptions}}get isMultipleSelect(){return this._isMultipleSelect}get msInstance(){return this._msInstance}get selectOptions(){return this.defaultOptions}get operator(){return this.columnFilter?.operator??this.defaultOperator}set operator(e){this.columnFilter&&(this.columnFilter.operator=e)}init(e){var a=this;if(!e)throw new Error('[Slickgrid-Universal] A filter must always have an "init()" with valid arguments.');if(this.grid=e.grid,this.callback=e.callback,this.columnDef=e.columnDef,this.searchTerms=(e.hasOwnProperty("searchTerms")?e.searchTerms:[])||[],this.filterContainerElm=e.filterContainerElm,!this.grid||!this.columnDef||!this.columnFilter||!this.columnFilter.collection&&!this.columnFilter.collectionAsync)throw new Error("[Slickgrid-Universal] You need to pass a \"collection\" (or \"collectionAsync\") for the MultipleSelect/SingleSelect Filter to work correctly. Also each option should include a value/label pair (or value/labelKey when using Locale). For example:: { filter: model: Filters.multipleSelect, collection: [{ value: true, label: 'True' }, { value: false, label: 'False'}] }");if(this.enableTranslateLabel=this.columnFilter?.enableTranslateLabel??!1,this.labelName=this.customStructure?.label??"label",this.labelPrefixName=this.customStructure?.labelPrefix??"labelPrefix",this.labelSuffixName=this.customStructure?.labelSuffix??"labelSuffix",this.optionLabel=this.customStructure?.optionLabel??"value",this.valueName=this.customStructure?.value??"value",this.enableTranslateLabel&&(!this.translaterService||"function"!=typeof this.translaterService.translate))throw new Error('[select-filter] The Translate Service is required for the Select Filter to work correctly when "enableTranslateLabel" is set.');this._locales=this.gridOptions?.locales??ue.locales,this.initMultipleSelectTemplate();let u=this.gridOptions?.defaultFilterPlaceholder||"";this.columnFilter?.placeholder&&(u=this.columnFilter.placeholder),this.defaultOptions.placeholder=u||"",this._isMultipleSelect&&this.columnDef?.filter&&(this.columnDef.filter.emptySearchTermReturnAllValues=this.columnDef.filter?.emptySearchTermReturnAllValues??!1);const i=this.columnFilter.collection||[];return new Promise(function(){var r=Su(function*(o,d){try{let h;a.columnFilter.collectionAsync&&!a.columnFilter.collection?(h=vK(a.columnFilter.collectionAsync,a.columnDef,a.renderDomElement.bind(a),a.rxjs,a.subscriptions),o(h)):(h=i,a.renderDomElement(i),o(i)),(a.columnFilter.collectionAsync||a.columnFilter.enableCollectionWatch)&&(yield h??a.columnFilter.collectionAsync,a.watchCollectionChanges())}catch(h){d(h)}});return function(o,d){return r.apply(this,arguments)}}())}clear(e=!0){this._msInstance&&this._collectionLength>0&&(this._msInstance.setSelects([]),this.updateFilterStyle(!1),this.searchTerms=[],this._shouldTriggerQuery=e,this.callback(void 0,{columnDef:this.columnDef,clearFilterTriggered:!0,shouldTriggerQuery:this._shouldTriggerQuery}),this._shouldTriggerQuery=!0)}destroy(){"function"==typeof this._msInstance?.destroy&&this._msInstance.destroy(),this.filterElm?.remove(),H2(this.subscriptions)}getValues(){return this._msInstance?.getSelects()??[]}setValues(e,a,u=!1){void 0!==e&&this._msInstance&&(e=Array.isArray(e)?e.every(i=>j2(i))?e.map(String):e:[e],this._msInstance.setSelects(e)),this.updateFilterStyle(this.getValues().length>0),this.operator=a||this.defaultOperator,u&&this.onTriggerEvent()}filterCollection(e){let a=e;if(this.columnFilter&&this.columnFilter.collectionFilterBy){const u=this.columnFilter.collectionFilterBy,i=this.columnFilter.collectionOptions?.filterResultAfterEachPass||null;a=this.collectionService?.filterCollection(a,u,i)||[]}return a}sortCollection(e){let a=e;if(this.columnFilter&&this.columnFilter.collectionSortBy){const u=this.columnFilter.collectionSortBy;a=this.collectionService?.sortCollection(this.columnDef,a,u,this.enableTranslateLabel)||[]}return a}watchCollectionChanges(){this.columnFilter?.collection&&(M2(this.columnFilter.collection,this.watchCallback.bind(this)),GF(this.columnFilter,"collection",this.propertyObserverCallback.bind(this)))}propertyObserverCallback(e){this.renderDomElement(e||[]),this.columnFilter.collection&&M2(this.columnFilter.collection,this.watchCallback.bind(this))}watchCallback(e){this.renderDomElement(this.columnFilter.collection||e||[])}renderDomElement(e){if(!Array.isArray(e)&&this.collectionOptions?.collectionInsideObjectProperty){e=ti(e,this.collectionOptions.collectionInsideObjectProperty||"")}if(!Array.isArray(e))throw new Error('The "collection" passed to the Select Filter is not a valid array.');let a=[];if(e.length>0&&(a=[...e]),this.collectionOptions?.addBlankEntry&&Array.isArray(a)&&a.length>0&&""!==a[0][this.valueName]&&a.unshift(this.createBlankEntry()),this.collectionOptions?.addCustomFirstEntry&&Array.isArray(a)&&a.length>0&&a[0][this.valueName]!==this.collectionOptions.addCustomFirstEntry[this.valueName]&&a.unshift(this.collectionOptions.addCustomFirstEntry),this.collectionOptions?.addCustomLastEntry&&Array.isArray(a)&&a.length>0){a[a.length-1][this.valueName]!==this.collectionOptions.addCustomLastEntry[this.valueName]&&a.push(this.collectionOptions.addCustomLastEntry)}let u=a;u=this.filterCollection(u),u=this.sortCollection(u);const i=ZK("filter",u,this.columnDef,this.grid,this.isMultipleSelect,this.translaterService,this.searchTerms||[]);this.isFilled=i.hasFoundSearchTerm,this.createFilterElement(i.selectElement,i.dataCollection),this._collectionLength=u.length}createBlankEntry(){const e={[this.labelName]:"",[this.valueName]:""};return this.labelPrefixName&&(e[this.labelPrefixName]=""),this.labelSuffixName&&(e[this.labelSuffixName]=""),e}createFilterElement(e,a){const u=this.columnDef?.id??"";this.elementName=`filter-${u}`,this.defaultOptions.name=this.elementName,_t(this.filterContainerElm),this.filterElm=e,this.filterElm.dataset.columnId=`${u}`,this.updateFilterStyle(this.isFilled),this.filterContainerElm.appendChild(e),this.filterElmOptions={...this.defaultOptions,...this.filterOptions,data:a},this._msInstance=Lv(e,this.filterElmOptions)}initMultipleSelectTemplate(){const e=this.gridOptions?.enableTranslate??!1,u={autoAdjustDropHeight:!0,autoAdjustDropPosition:!0,autoAdjustDropWidthByTextSize:!0,name:`${this.columnDef?.id??""}`,container:"body",darkMode:!!this.gridOptions.darkMode,filter:!1,maxHeight:275,single:!0,singleRadio:!0,showSearchClear:!0,renderOptionLabelAsHtml:this.columnFilter?.enableRenderHtml??!1,sanitizer:i=>this.grid.sanitizeHtmlString(i),onClose:()=>this.onTriggerEvent(),onClear:()=>this.clear()};if(this._isMultipleSelect){u.single=!1,u.singleRadio=!1,u.showOkButton=!0,u.displayTitle=!0;const i=Gl(this.gridOptions);u.countSelectedText=e&&this.translaterService?.translate?this.translaterService.translate(`${i}X_OF_Y_SELECTED`):this._locales?.TEXT_X_OF_Y_SELECTED,u.allSelectedText=e&&this.translaterService?.translate?this.translaterService.translate(`${i}ALL_SELECTED`):this._locales?.TEXT_ALL_SELECTED,u.noMatchesFoundText=e&&this.translaterService?.translate?this.translaterService.translate(`${i}NO_MATCHES_FOUND`):this._locales?.TEXT_NO_MATCHES_FOUND,u.okButtonText=e&&this.translaterService?.translate?this.translaterService.translate(`${i}OK`):this._locales?.TEXT_OK,u.selectAllText=e&&this.translaterService?.translate?this.translaterService.translate(`${i}SELECT_ALL`):this._locales?.TEXT_SELECT_ALL}this.defaultOptions=u}onTriggerEvent(){if(this._msInstance){const e=this.getValues();this.updateFilterStyle(Array.isArray(e)&&e.length>1||1===e.length&&""!==e[0]),this.searchTerms=e,this.callback(void 0,{columnDef:this.columnDef,operator:this.operator,searchTerms:e,shouldTriggerQuery:this._shouldTriggerQuery}),this._shouldTriggerQuery=!0}}updateFilterStyle(e){e?(this.isFilled=!0,this.filterElm?.classList.add("filled"),this._msInstance?.getParentElement()?.classList.add("filled")):(this.isFilled=!1,this.filterElm?.classList.remove("filled"),this._msInstance?.getParentElement()?.classList.remove("filled"))}}const ie={autocompleter:class cce{constructor(e,a,u){this.translaterService=e,this.collectionService=a,this.rxjs=u,this._clearFilterTriggered=!1,this._shouldTriggerQuery=!0,this.searchTerms=[],this.isFilled=!1,this.isItemSelected=!1,this.valueName="label",this.enableTranslateLabel=!1,this.subscriptions=[],this._bindEventService=new Ni}get autocompleterOptions(){return this._autocompleterOptions||{}}get collectionOptions(){return this.columnDef?.filter?.collectionOptions??{}}get collection(){return this._collection}get columnFilter(){return this.columnDef?.filter||{}}get filterDomElement(){return this._filterElm}get filterOptions(){return{...this.gridOptions.defaultFilterOptions?.autocompleter,...this.columnFilter?.filterOptions}}get customStructure(){let e=this.columnFilter?.customStructure;const a=this.columnFilter?.type??this.columnDef?.type;return!e&&a===w.object&&this.columnDef?.dataKey&&this.columnDef?.labelKey&&(e={label:this.columnDef.labelKey,value:this.columnDef.dataKey}),e}get defaultOperator(){return te.equal}get gridOptions(){return this.grid?.getOptions()??{}}get instance(){return this._instance}get operator(){return this.columnFilter?.operator??this.defaultOperator}set operator(e){this.columnFilter&&(this.columnFilter.operator=e)}init(e){var a=this;if(!e)throw new Error('[Slickgrid-Universal] A filter must always have an "init()" with valid arguments.');if(this.grid=e.grid,this.callback=e.callback,this.columnDef=e.columnDef,this.searchTerms=(e.hasOwnProperty("searchTerms")?e.searchTerms:[])||[],this.filterContainerElm=e.filterContainerElm,!(this.grid&&this.columnDef&&this.columnFilter&&(this.columnFilter.collection||this.columnFilter.collectionAsync||this.columnFilter.filterOptions)))throw new Error("[Slickgrid-Universal] You need to pass a \"collection\" (or \"collectionAsync\") for the AutoComplete Filter to work correctly. Also each option should include a value/label pair (or value/labelKey when using Locale). For example:: { filter: model: Filters.autocompleter, collection: [{ value: true, label: 'True' }, { value: false, label: 'False'}] }");this.enableTranslateLabel=this.columnFilter?.enableTranslateLabel??!1,this.labelName=this.customStructure?.label??"label",this.valueName=this.customStructure?.value??"value",this.labelPrefixName=this.customStructure?.labelPrefix??"labelPrefix",this.labelSuffixName=this.customStructure?.labelSuffix??"labelSuffix",this._locales=this.gridOptions?.locales??ue.locales;const u=this.columnFilter.collection;return this._collection=u,this.renderDomElement(u),new Promise(function(){var i=Su(function*(r,o){try{const d=a.columnFilter.collectionAsync;let h;d&&!a.columnFilter.collection?(h=vK(d,a.columnDef,a.renderDomElement.bind(a),a.rxjs,a.subscriptions),r(h)):(h=u,r(u)),(d||a.columnFilter.enableCollectionWatch)&&(yield h??d,a.watchCollectionChanges())}catch(d){o(d)}});return function(r,o){return i.apply(this,arguments)}}())}clear(e=!0){this._filterElm&&(this._clearFilterTriggered=!0,this._shouldTriggerQuery=e,this.searchTerms=[],this._filterElm.value="",this._filterElm.dispatchEvent(new CustomEvent("input")),this.updateFilterStyle(!1))}destroy(){"function"==typeof this._instance?.destroy&&this._instance.destroy(),this._filterElm,this._filterElm?.remove?.(),this._collection=void 0,this._bindEventService.unbindAll(),H2(this.subscriptions)}getValues(){return this._filterElm?.value||""}setValues(e,a,u=!1){e&&this._filterElm&&(this._filterElm.value=e),this.updateFilterStyle(""!==this.getValues()),this.operator=a||this.defaultOperator,u&&this.callback(void 0,{columnDef:this.columnDef,operator:this.operator,searchTerms:[this.getValues()],shouldTriggerQuery:!0})}filterCollection(e){let a=e;if(this.columnFilter&&this.columnFilter.collectionFilterBy){const u=this.columnFilter.collectionFilterBy,i=this.columnFilter.collectionOptions&&this.columnFilter.collectionOptions.filterResultAfterEachPass||null;a=this.collectionService?.filterCollection(a,u,i)||[]}return a}sortCollection(e){let a=e;if(this.columnFilter&&this.columnFilter.collectionSortBy){const u=this.columnFilter.collectionSortBy;a=this.collectionService?.sortCollection(this.columnDef,a,u,this.enableTranslateLabel)||[]}return a}watchCollectionChanges(){this.columnFilter?.collection&&(M2(this.columnFilter.collection,e=>{this.renderDomElement(this.columnFilter.collection||e||[])}),GF(this.columnFilter,"collection",e=>{this.renderDomElement(e||[]),this.columnFilter.collection&&M2(this.columnFilter.collection,a=>{this.renderDomElement(this.columnFilter.collection||a||[])})}))}renderDomElement(e){if(!Array.isArray(e)&&this.collectionOptions?.collectionInsideObjectProperty){e=ti(e,this.collectionOptions.collectionInsideObjectProperty||"")}let a=e;a&&(a=this.filterCollection(a),a=this.sortCollection(a));const u=Array.isArray(this.searchTerms)&&this.searchTerms.length>=0?this.searchTerms[0]:"";this._collection=a,this._filterElm=this.createFilterElement(a,u),this._bindEventService.bind(this._filterElm,"input",this.handleOnInputChange.bind(this)),this._bindEventService.bind(this._filterElm,"blur",()=>{this.isItemSelected||this.clear()})}createFilterElement(e,a){this._collection=e;const u=this.columnDef?.id??"";_t(this.filterContainerElm);let i=this.gridOptions?.defaultFilterPlaceholder??"";this.columnFilter?.placeholder&&(i=this.columnFilter.placeholder),this._filterElm=T("input",{type:"text",ariaLabel:this.columnFilter?.ariaLabel??`${Qs(u+"")} Search Filter`,autocomplete:"off",ariaAutoComplete:"none",placeholder:i,className:`form-control search-filter filter-${u} slick-autocomplete-container`,value:a??"",dataset:{columnid:`${u}`}});const r=a;Array.isArray(e)&&(e=e.every(d=>j2(d))?e.map(d=>({label:d,value:d})):e.map(d=>({label:d?.[this.labelName],value:d?.[this.valueName],labelPrefix:d?.[this.labelPrefixName]??"",labelSuffix:d?.[this.labelSuffixName]??""}))),this._autocompleterOptions={input:this._filterElm,debounceWaitMs:200,className:`slick-autocomplete ${this.filterOptions?.className??""}`.trim(),emptyMsg:this.gridOptions.enableTranslate&&this.translaterService?.translate?this.translaterService.translate("NO_ELEMENTS_FOUND"):this._locales?.TEXT_NO_ELEMENTS_FOUND??"No elements found",customize:(d,h,m)=>{m.style.width=""},onSelect:d=>{this.isItemSelected=!0,this.handleSelect(d)},...this.filterOptions},this.gridOptions?.darkMode&&(this._autocompleterOptions.className+=" slick-dark-mode"),this.autocompleterOptions.className=Kt(this.autocompleterOptions.className).join(" "),this._autocompleterOptions.renderItem?.layout?(this._autocompleterOptions.className+=` autocomplete-custom-${fv(this._autocompleterOptions.renderItem.layout)}`,this._autocompleterOptions.render=this.renderCustomItem.bind(this)):Array.isArray(e)?this._autocompleterOptions.render=this._autocompleterOptions.render?.bind(this)??this.renderCollectionItem.bind(this):this._autocompleterOptions.render||(this._autocompleterOptions.render=this.renderRegularItem.bind(this)),this.filterOptions?.fetch?(EK(this._filterElm,this._autocompleterOptions),this._instance=YF(this._autocompleterOptions)):this._instance=YF({...this._autocompleterOptions,fetch:(d,h)=>{e&&h(e.filter(m=>(("string"==typeof m?m:m?.label)||"").toLowerCase().includes(d.toLowerCase())))}}),this._filterElm.value=r??"";const o=T("div",{className:"autocomplete-filter-container"});return o.appendChild(this._filterElm),o.appendChild(T("span")),a&&this._filterElm.classList.add("filled"),this.filterContainerElm.appendChild(o),this.filterContainerElm.appendChild(document.createElement("span")),this._filterElm}handleSelect(e){if(void 0!==e){const u=this.filterOptions?.renderItem??!1,i="string"==typeof e?e:u?e[this.labelName]:e.label;let r="string"==typeof e?e:u?e[this.valueName]:e.value;r=this.trimWhitespaceWhenEnabled(r),this.updateFilterStyle(""!==r),this.setValues(i),this.callback(void 0,{columnDef:this.columnDef,operator:this.operator,searchTerms:[r],shouldTriggerQuery:this._shouldTriggerQuery}),this._clearFilterTriggered=!1,this._shouldTriggerQuery=!0}return!1}handleOnInputChange(e){let a=e?.target?.value??"";const u=this.filterOptions.triggerOnEveryKeyStroke??!1;if(a=this.trimWhitespaceWhenEnabled(a),this._clearFilterTriggered||""===a||u){const i={columnDef:this.columnDef,shouldTriggerQuery:this._shouldTriggerQuery};this._clearFilterTriggered?i.clearFilterTriggered=this._clearFilterTriggered:(i.operator=this.operator,i.searchTerms=[a]),this.updateFilterStyle(""!==a),this.callback(e,i)}this._clearFilterTriggered=!1,this._shouldTriggerQuery=!0}renderRegularItem(e){return T("div",{textContent:("string"==typeof e?e:e?.label??"")||""})}renderCustomItem(e){const a=this._autocompleterOptions?.renderItem?.templateCallback(e)??"",u=document.createElement("div");return this.grid.applyHtmlCode(u,a),u}renderCollectionItem(e){const a=this.columnFilter?.enableRenderHtml??!1,o=(e.labelPrefix||"")+(e.label||"")+(e.labelSuffix||""),d=this.grid.sanitizeHtmlString(o)||"",h=document.createElement("div");return h[a?"innerHTML":"textContent"]=d,h}trimWhitespaceWhenEnabled(e){let a=e;const u=this.gridOptions.enableFilterTrimWhiteSpace||this.columnFilter.enableTrimWhiteSpace;return"string"==typeof e&&u&&(a=e.trim()),a}updateFilterStyle(e){this.isItemSelected=e,e?this._filterElm.classList.add("filled"):this._filterElm.classList.remove("filled")}},compoundDate:class A1e extends UK{constructor(e){super(e),this.translaterService=e,this.inputFilterType="compound"}},compoundInput:$W,compoundInputNumber:class Qhe extends Hh{constructor(e){super(e),this.translaterService=e,this.inputType="number",this.inputFilterType="compound"}},compoundInputPassword:class Xhe extends Hh{constructor(e){super(e),this.translaterService=e,this.inputType="password",this.inputFilterType="compound"}},compoundInputText:$W,compoundSlider:class ame extends gT{constructor(e){super(e),this.translaterService=e,this.sliderType="compound"}},dateRange:class tme extends UK{constructor(e){super(e),this.translaterService=e,this.inputFilterType="range"}},input:Hh,inputMask:class ume extends Hh{constructor(e){super(e),this.translaterService=e,this._inputMask="",this.inputType="text"}get inputMask(){return this._inputMask}init(e){if(!e)throw new Error('[Slickgrid-Universal] A filter must always have an "init()" with valid arguments.');if(this.grid=e.grid,this.callback=e.callback,this.columnDef=e.columnDef,this.searchTerms=(e.hasOwnProperty("searchTerms")?e.searchTerms:[])||[],this._cellContainerElm=e.filterContainerElm,this.columnDef?.params?.mask?this._inputMask=this.columnDef.params.mask:this.columnFilter?.params?.mask&&(this._inputMask=this.columnFilter.params.mask),!this._inputMask)throw new Error("[Slickgrid-Universal] The Filters.inputMask requires the mask to be passed in the filter params or the column definition params\n for example:: this.columnDefinitions: [{ id: 'phone', field: 'phone', filter: { model: Filters.inputMask, params: { mask: '000-000-0000' }}}]");const a=Array.isArray(this.searchTerms)&&this.searchTerms.length>=0?this.searchTerms[0]:"";this.createDomFilterElement(a),this._bindEventService.bind(this._filterInputElm,["keyup","blur","change"],this.onTriggerEvent.bind(this))}onTriggerEvent(e,a=!1){let u="";if(e?.target?.value){let i=e?.target?.value??"";const r=this.gridOptions.enableFilterTrimWhiteSpace||this.columnFilter.enableTrimWhiteSpace;"string"==typeof i&&r&&(i=i.trim());const o=this.unmaskValue(i),d=this.maskValue(o);u=o,e?.keyCode>=48&&(this._filterInputElm.value=d,e.preventDefault())}a?(this.callback(e,{columnDef:this.columnDef,clearFilterTriggered:a,shouldTriggerQuery:this._shouldTriggerQuery}),this._filterInputElm.classList.remove("filled")):(this._filterInputElm.classList.add("filled"),this.callback(e,{columnDef:this.columnDef,operator:this.operator,searchTerms:[u],shouldTriggerQuery:this._shouldTriggerQuery})),this._shouldTriggerQuery=!0}maskValue(e){let a=0,u="";return this._inputMask&&(u=this._inputMask.replace(/[09A]/gi,i=>(("0"===i||"9"===i)&&/\d+/g.test(e[a])||"A"===i.toUpperCase()&&/[^\d]+/gi.test(e[a]))&&e[a++]||"")),u}unmaskValue(e){const a=e.replace(/[^0-9a-z]*/gi,""),u=this._inputMask.replace(/[^0-9a-z]*/gi,"");let i="";for(let r=0;r=r)||"inclusive"===o&&(gr)))h=!1,m=a||ue.VALIDATION_EDITOR_TEXT_LENGTH_BETWEEN.replace(/{{minLength}}|{{maxLength}}/gi,v=>d[v]);else if(void 0!==i&&null!==g&&("exclusive"===o&&g<=i||"inclusive"===o&&null!==g&&gd[k])}else if(void 0!==r&&null!==g&&("exclusive"===o&&g>=r||"inclusive"===o&&null!==g&&g>r)){h=!1;const v="inclusive"===o?ue.VALIDATION_EDITOR_TEXT_MAX_LENGTH_INCLUSIVE:ue.VALIDATION_EDITOR_TEXT_MAX_LENGTH;m=a||v.replace(/{{maxLength}}/gi,k=>d[k])}return{valid:h,msg:m}}function iU(t,e){const a=isNaN(t)?null:parseFloat(t),u=e.decimal||0,i=e.required,r=e.minValue,o=e.maxValue,d=e.operatorConditionalType||"inclusive",h=e.errorMessage,m={"{{minValue}}":r,"{{maxValue}}":o,"{{minDecimal}}":0,"{{maxDecimal}}":u};let g=!0,v="";if("function"==typeof e.validator)return e.validator(t,e.editorArgs);if(i&&""===t)g=!1,v=h||ue.VALIDATION_REQUIRED_FIELD;else if(""!==t&&(isNaN(t)||0===u&&!/^[-+]?(\d*(\.)?(\d)*)$/.test(t)))g=!1,v=h||ue.VALIDATION_EDITOR_VALID_NUMBER;else if(void 0!==r&&void 0!==o&&null!==a&&("exclusive"===d&&(a<=+r||a>=+o)||"inclusive"===d&&(a<+r||a>+o)))g=!1,v=h||ue.VALIDATION_EDITOR_NUMBER_BETWEEN.replace(/{{minValue}}|{{maxValue}}/gi,k=>m[k]);else if(void 0!==r&&null!==a&&("exclusive"===d&&a<=+r||"inclusive"===d&&a<+r)){g=!1;const k="inclusive"===d?ue.VALIDATION_EDITOR_NUMBER_MIN_INCLUSIVE:ue.VALIDATION_EDITOR_NUMBER_MIN;v=h||k.replace(/{{minValue}}/gi,x=>m[x])}else if(void 0!==o&&null!==a&&("exclusive"===d&&a>=+o||"inclusive"===d&&a>+o)){g=!1;const k="inclusive"===d?ue.VALIDATION_EDITOR_NUMBER_MAX_INCLUSIVE:ue.VALIDATION_EDITOR_NUMBER_MAX;v=h||k.replace(/{{maxValue}}/gi,x=>m[x])}else u>0&&!new RegExp(`^[-+]?(\\d*(\\.)?(\\d){0,${u}})$`).test(t)&&(g=!1,v=h||ue.VALIDATION_EDITOR_DECIMAL_BETWEEN.replace(/{{minDecimal}}|{{maxDecimal}}/gi,k=>m[k]));return{valid:g,msg:v}}function nU(t,e){let a=isNaN(t)?null:parseInt(t,10);null!==a&&isNaN(a)&&(a=null);const u=e.errorMessage,i=e.required,r=e.minValue,o=e.maxValue,d=e.operatorConditionalType||"inclusive",h={"{{minValue}}":r,"{{maxValue}}":o};let m=!0,g="";if(e.validator)return e.validator(t,e.editorArgs);if(i&&""===t)m=!1,g=u||ue.VALIDATION_REQUIRED_FIELD;else if(""===t||!isNaN(t)&&/^[+-]?\d+$/.test(t)){if(void 0!==r&&void 0!==o&&null!==a&&("exclusive"===d&&(a<=+r||a>=+o)||"inclusive"===d&&(a<+r||a>+o)))m=!1,g=u||ue.VALIDATION_EDITOR_INTEGER_BETWEEN.replace(/{{minValue}}|{{maxValue}}/gi,v=>h[v]);else if(void 0!==r&&null!==a&&("exclusive"===d&&a<=+r||"inclusive"===d&&null!==a&&a<+r)){m=!1;const v="inclusive"===d?ue.VALIDATION_EDITOR_INTEGER_MIN_INCLUSIVE:ue.VALIDATION_EDITOR_INTEGER_MIN;g=u||v.replace(/{{minValue}}/gi,k=>h[k])}else if(void 0!==o&&null!==a&&("exclusive"===d&&a>=+o||"inclusive"===d&&null!==a&&a>+o)){m=!1;const v="inclusive"===d?ue.VALIDATION_EDITOR_INTEGER_MAX_INCLUSIVE:ue.VALIDATION_EDITOR_INTEGER_MAX;g=u||v.replace(/{{maxValue}}/gi,k=>h[k])}}else m=!1,g=u||ue.VALIDATION_EDITOR_VALID_INTEGER;return{valid:m,msg:g}}class T7{constructor(e,a="text"){if(this.args=e,this._inputType="text",this._isValueTouched=!1,this.disabled=!1,!e)throw new Error("[Slickgrid-Universal] Something is wrong with this grid, an Editor must always have valid arguments.");this.grid=e.grid,this.gridOptions=e.grid&&e.grid.getOptions(),this._bindEventService=new Ni,this.inputType=a,this.init()}get columnDef(){return this.args.column}get columnEditor(){return this.columnDef?.editor||{}}get dataContext(){return this.args.item}get editorDomElement(){return this._input}get hasAutoCommitEdit(){return this.gridOptions.autoCommitEdit??!1}get inputType(){return this._inputType}set inputType(e){this._inputType=e}get validator(){return this.columnEditor?.validator??this.columnDef?.validator}init(){const e=this.columnDef?.id??"",a=this.args.compositeEditorOptions;this._input=T("input",{type:this._inputType||"text",autocomplete:"off",ariaAutoComplete:"none",ariaLabel:this.columnEditor?.ariaLabel??`${Qs(e+"")} Input Editor`,className:`editor-text editor-${e}`,placeholder:this.columnEditor?.placeholder??"",title:this.columnEditor?.title??""}),"number"===this.inputType&&(this._input.step=`${void 0!==this.columnEditor.valueStep?this.columnEditor.valueStep:this.getInputDecimalSteps()}`);const u=this.args.container;u&&"function"==typeof u.appendChild&&u.appendChild(this._input),this._bindEventService.bind(this._input,"focus",()=>this._input?.select()),this._bindEventService.bind(this._input,"keydown",i=>{this._isValueTouched=!0,this._lastInputKeyEvent=i,("ArrowLeft"===i.key||"ArrowRight"===i.key)&&i.stopImmediatePropagation()}),this.hasAutoCommitEdit&&!a&&this._bindEventService.bind(this._input,["focusout","blur"],()=>{this._isValueTouched=!0,this.save()}),a&&(this._bindEventService.bind(this._input,["input","paste"],this.handleOnInputChange.bind(this)),"number"===this.inputType&&this._bindEventService.bind(this._input,"wheel",this.handleOnMouseWheel.bind(this),{passive:!0}))}destroy(){this._bindEventService.unbindAll(),this._input?.remove?.()}disable(e=!0){const a=this.disabled;if(this.disabled=e,this._input)if(e){this._input.setAttribute("disabled","disabled");const u=this.getValue();a!==e&&this.args?.compositeEditorOptions&&""!==u&&this.reset("",!0,!0)}else this._input.removeAttribute("disabled")}focus(){this.grid.focus(),this._input?.focus()}getDecimalPlaces(){let e=this.columnEditor?.decimal??this.columnEditor?.params?.decimalPlaces??void 0;return void 0===e&&(e=0),e||0===e?e:null}getInputDecimalSteps(){const e=this.getDecimalPlaces();let a="";for(let u=1;u0?`0.${a}1`:"1"}show(){this.args?.compositeEditorOptions&&this.applyInputUsabilityState()}getValue(){return this._input?.value||""}setValue(e,a=!1,u=!0){if(this._input&&(this._input.value=`${e}`,a)){this.applyValue(this.args.item,this.serializeValue());const i=this.args.compositeEditorOptions;i&&u&&this.handleChangeOnCompositeEditor(null,i,"system")}}applyValue(e,a){const u=this.columnDef&&this.columnDef.field;if(void 0!==u){const i=u?.indexOf(".")>0,o=this.validate(null,a)?.valid?a:"";if(i){vr(e,this.columnEditor?.complexObjectPath??u??"",o)}else u&&(e[u]=o)}}isValueChanged(){const e=this._input?.value,a=this._lastInputKeyEvent?.key;return!(!this.columnEditor?.alwaysSaveOnEnterKey||"Enter"!==a)||!(""===e&&(null===this._originalValue||void 0===this._originalValue))&&e!==this._originalValue}isValueTouched(){return this._isValueTouched}loadValue(e){const a=this.columnDef?.field;if(e&&void 0!==a&&this._input){const i=a?.indexOf(".")>0?ti(e,a):e.hasOwnProperty(a)&&e[a]||"";this._originalValue=i,this._input.value=this._originalValue,this._input.select()}}reset(e,a=!0,u=!1){const i=e??this._originalValue??"";this._input&&(this._originalValue=i,this._input.value=`${i}`),this._isValueTouched=!1;const r=this.args.compositeEditorOptions;if(r&&a){const o=!u;this.handleChangeOnCompositeEditor(null,r,"user",o)}}save(){const e=this.validate(),a=e&&e.valid||!1;this.hasAutoCommitEdit&&a?this.grid.getEditorLock().commitCurrentEdit():this.args.commitChanges()}serializeValue(){return this._input?.value??""}validate(e,a){if(this.args.compositeEditorOptions&&this.applyInputUsabilityState(),this.disabled)return{valid:!0,msg:""};return L7(void 0!==a?a:this._input&&this._input.value,{editorArgs:this.args,errorMessage:this.columnEditor.errorMessage,minLength:this.columnEditor.minLength,maxLength:this.columnEditor.maxLength,operatorConditionalType:this.columnEditor.operatorConditionalType,required:!this.args?.compositeEditorOptions&&this.columnEditor.required,validator:this.validator})}applyInputUsabilityState(){const e=this.grid.getActiveCell(),a=this.grid.onBeforeEditCell.notify({...e,item:this.dataContext,column:this.args.column,grid:this.grid,target:"composite",compositeEditorOptions:this.args.compositeEditorOptions}).getReturnValue();this.disable(!1===a)}handleChangeOnCompositeEditor(e,a,u="user",i=!1){const r=this.grid.getActiveCell(),o=this.args.column,d=this.columnDef?.id??"",h=this.dataContext,m=this.grid,g=this.serializeValue();this.validate().valid&&this.applyValue(this.dataContext,g),this.applyValue(a.formValues,g);const v=this.gridOptions?.compositeEditorOptions?.excludeDisabledFieldFormValues??!1;(i||this.disabled&&v&&a.formValues.hasOwnProperty(d))&&delete a.formValues[d],m.onCompositeEditorChange.notify({...r,item:h,grid:m,column:o,formValues:a.formValues,editors:a.editors,triggeredBy:u},new Wt(e))}handleOnInputChange(e){this._isValueTouched=!0;const a=this.args.compositeEditorOptions;if(a){const u=this.gridOptions?.editorTypingDebounce??500;clearTimeout(this._timer),this._timer=setTimeout(()=>this.handleChangeOnCompositeEditor(e,a),u)}}handleOnMouseWheel(e){this._isValueTouched=!0;const a=this.args.compositeEditorOptions;a&&this.handleChangeOnCompositeEditor(e,a)}}class rU{constructor(e,a,u=-1){if(this.args=e,this.isMultipleSelect=a,this.delayOpening=u,this._isValueTouched=!1,this._isDisposingOrCallingSave=!1,this.disabled=!1,this.enableTranslateLabel=!1,this.finalCollection=[],!e)throw new Error("[Slickgrid-Universal] Something is wrong with this grid, an Editor must always have valid arguments.");this.grid=e.grid,this.gridOptions=this.grid.getOptions()||{},this.gridOptions?.translater&&(this._translaterService=this.gridOptions.translater),this._locales=this.gridOptions.locales||ue.locales;const i=this.columnDef?.id??"";this.elementName=`editor-${i}`;const r=this.args.compositeEditorOptions,o={autoAdjustDropHeight:!0,autoAdjustDropPosition:!0,autoAdjustDropWidthByTextSize:!0,container:"body",darkMode:!!this.gridOptions.darkMode,filter:!1,maxHeight:275,minHeight:25,name:this.elementName,single:!0,singleRadio:!0,renderOptionLabelAsHtml:this.columnEditor?.enableRenderHtml??!1,sanitizer:d=>this.grid.sanitizeHtmlString(d),onClick:()=>this._isValueTouched=!0,onCheckAll:()=>this._isValueTouched=!0,onUncheckAll:()=>this._isValueTouched=!0,onClose:d=>{"key.escape"!==d&&"body.click"!==d&&(this.hasAutoCommitEdit||this.isValueChanged())?r?this.handleChangeOnCompositeEditor(r):(this._isDisposingOrCallingSave=!0,this.save(this.hasAutoCommitEdit)):"key.escape"===d&&this.cancel()}};if(a)if(o.single=!1,o.singleRadio=!1,o.displayTitle=!0,o.showOkButton=!0,this._translaterService?.getCurrentLanguage()){const d=Gl(this.gridOptions);o.countSelectedText=this._translaterService.translate(`${d}X_OF_Y_SELECTED`),o.allSelectedText=this._translaterService.translate(`${d}ALL_SELECTED`),o.selectAllText=this._translaterService.translate(`${d}SELECT_ALL`),o.okButtonText=this._translaterService.translate(`${d}OK`),o.noMatchesFoundText=this._translaterService.translate(`${d}NO_MATCHES_FOUND`)}else o.countSelectedText=this._locales?.TEXT_X_OF_Y_SELECTED,o.allSelectedText=this._locales?.TEXT_ALL_SELECTED,o.selectAllText=this._locales?.TEXT_SELECT_ALL,o.okButtonText=this._locales?.TEXT_OK,o.noMatchesFoundText=this._locales?.TEXT_NO_MATCHES_FOUND;this.defaultOptions=o,this.init()}get collection(){return this.columnEditor?.collection??[]}get collectionOptions(){return this.columnEditor?.collectionOptions}get columnDef(){return this.args.column}get columnEditor(){return this.columnDef?.editor??{}}get dataContext(){return this.args.item}get editorDomElement(){return this.editorElm}get editorOptions(){return{...this.gridOptions.defaultEditorOptions?.select,...this.columnEditor?.editorOptions}}get isCompositeEditor(){return!!this.args?.compositeEditorOptions}get customStructure(){return this.columnDef?.editor?.customStructure}get hasAutoCommitEdit(){return this.gridOptions.autoCommitEdit??!1}get msInstance(){return this._msInstance}get selectOptions(){return this.defaultOptions}get currentValues(){const e=this._msInstance?.getSelects()??[];if(this.collection.every(i=>"number"==typeof i||"string"==typeof i))return this.collection.filter(i=>e?.some(r=>`${r}`===i?.toString()));const a=this.collectionOptions?.separatorBetweenTextLabels??"",u=this.collectionOptions?.includePrefixSuffixToSelectedValues??!1;return this.collection.filter(i=>e.some(r=>`${r}`===i?.[this.valueName]?.toString())).map(i=>{const r=i[this.valueName];let o=i[this.labelPrefixName]||"",d=i[this.labelSuffixName]||"";const m=(this.columnDef?.field??"")?.indexOf(".")>0,g=this.columnEditor?.serializeComplexValueFormat??"object";return m&&"object"==typeof i&&"object"===g?i:(o=this.enableTranslateLabel&&this._translaterService&&o&&"string"==typeof o?this._translaterService.translate(o||" "):o,d=this.enableTranslateLabel&&this._translaterService&&d&&"string"==typeof d?this._translaterService.translate(d||" "):d,u?[o,r,d].filter(k=>k).join(a):r)})}get currentValue(){const e=this._msInstance?.getSelects()??[],a=e.length?e[0]:"",u=this.columnDef?.field;if(void 0!==u){if(this.collection.every(m=>"number"==typeof m||"string"==typeof m))return zc(this.collection,m=>m?.toString?.()===`${a}`);const i=this.collectionOptions?.separatorBetweenTextLabels??"",r=this.collectionOptions?.includePrefixSuffixToSelectedValues??!1,o=zc(this.collection,m=>m.hasOwnProperty(this.valueName)&&m[this.valueName]?.toString()===`${a}`),d=u?.indexOf(".")>0,h=this.columnEditor?.serializeComplexValueFormat??"object";if(d&&"object"==typeof o&&"object"===h)return o;if(o&&o.hasOwnProperty(this.valueName)){const m=o[this.valueName];if(r){let g=o[this.labelPrefixName]||"",v=o[this.labelSuffixName]||"";return g=this.enableTranslateLabel&&this._translaterService&&g&&"string"==typeof g?this._translaterService.translate(g||" "):g,v=this.enableTranslateLabel&&this._translaterService&&v&&"string"==typeof v?this._translaterService.translate(v||" "):v,[g,m,v].filter(x=>x).join(i)}return m}}return""}get validator(){return this.columnEditor?.validator??this.columnDef?.validator}init(){if(!this.columnDef||!this.columnDef.editor||!this.columnDef.editor.collection&&!this.columnDef.editor.collectionAsync)throw new Error("[Slickgrid-Universal] You need to pass a \"collection\" (or \"collectionAsync\") inside Column Definition Editor for the MultipleSelect/SingleSelect Editor to work correctly.\n Also each option should include a value/label pair (or value/labelKey when using Locale).\n For example: { editor: { collection: [{ value: true, label: 'True' },{ value: false, label: 'False'}] } }");if(this._collectionService=new JK(this._translaterService),this.enableTranslateLabel=this.columnEditor?.enableTranslateLabel??!1,this.labelName=this.customStructure?.label??"label",this.labelPrefixName=this.customStructure?.labelPrefix??"labelPrefix",this.labelSuffixName=this.customStructure?.labelSuffix??"labelSuffix",this.optionLabel=this.customStructure?.optionLabel??"value",this.valueName=this.customStructure?.value??"value",this.enableTranslateLabel&&(!this._translaterService||"function"!=typeof this._translaterService.translate))throw new Error('[Slickgrid-Universal] requires a Translate Service to be installed and configured when the grid option "enableTranslate" is enabled.');this.renderDomElement(this.collection),(this.disabled||this.columnEditor?.collectionAsync&&Array.isArray(this.collection)&&0===this.collection.length)&&this.disable(!0)}getValue(){return this.isMultipleSelect?this.currentValues:this.currentValue}setValue(e,a=!1,u=!0){if(this.isMultipleSelect&&Array.isArray(e)?this.loadMultipleValues(e):this.loadSingleValue(e),a){this.applyValue(this.args.item,this.serializeValue());const i=this.args.compositeEditorOptions;i&&u&&this.handleChangeOnCompositeEditor(i,"system")}}cancel(){this.args?.cancelChanges&&this.args.cancelChanges()}hide(){this._msInstance&&this._msInstance.close()}show(e){!this.isCompositeEditor&&this._msInstance?this._msInstance.open(e):this.isCompositeEditor&&this.applyInputUsabilityState()}applyValue(e,a){const u=this.columnDef?.field,i=this.columnDef?.type;let r=a;if(void 0!==u){(i===w.number||i===w.integer||i===w.boolean)&&!isNaN(parseFloat(a))&&(r=parseFloat(a)),this.isMultipleSelect&&"string"==typeof a&&a.indexOf(",")>=0&&(r=a.split(","));const o=u?.indexOf(".")>0;if(r=this.validate(null,r)?.valid?r:"",o){vr(e,this.columnEditor?.complexObjectPath??u??"",r)}else e[u]=r}}destroy(){this._msInstance&&this.hasAutoCommitEdit&&this.isValueChanged()&&!this._isDisposingOrCallingSave&&!this.isCompositeEditor&&(this._isDisposingOrCallingSave=!0,this.save(!0)),this._isDisposingOrCallingSave=!0,"function"==typeof this._msInstance?.destroy&&this._msInstance.destroy(),this.editorElm?.remove(),this._msInstance=void 0}loadValue(e){const a=this.columnDef?.field,u=void 0!==a&&a?.indexOf(".")>0;if(e&&void 0!==a){const i=this.columnEditor?.complexObjectPath??a,r=u?ti(e,i):e.hasOwnProperty(a)&&e[a],o=u&&r?.hasOwnProperty(this.valueName)?r[this.valueName]:r;this.isMultipleSelect&&Array.isArray(o)?this.loadMultipleValues(o):this.loadSingleValue(o)}}loadMultipleValues(e){if(Array.isArray(e)){this.originalValue=e.map(u=>"number"==typeof u||"boolean"==typeof u?`${u}`:u),this._msInstance?.setSelects(this.originalValue);const a=this.args.compositeEditorOptions;a&&this.handleChangeOnCompositeEditor(a)}}loadSingleValue(e){this.originalValue="number"==typeof e||"boolean"==typeof e?`${e}`:e,this._msInstance?.setSelects([this.originalValue])}serializeValue(){return this.isMultipleSelect?this.currentValues:this.currentValue}changeEditorOption(e,a){this.columnEditor&&(this.columnEditor.editorOptions||(this.columnEditor.editorOptions={}),this.columnEditor.editorOptions[e]=a,this.editorElmOptions={...this.editorElmOptions,[e]:a},this._msInstance?.refreshOptions(this.editorElmOptions))}disable(e=!0){const a=this.disabled;if(this.disabled=e,this._msInstance)if(e){this._msInstance.disable();const u=this.getValue(),i=Array.isArray(u)&&this.isMultipleSelect?""===u?.[0]:""===u;a!==e&&this.isCompositeEditor&&!i&&this.reset("",!0,!0)}else this._msInstance.enable()}focus(){this.grid.focus(),this._msInstance?.focus()}isValueChanged(){const e=this._msInstance?.getSelects();if(this.isMultipleSelect)return!H0(e,this.originalValue);const a=Array.isArray(e)&&e.length>0?e[0]:void 0;return void 0!==a&&a!==this.originalValue}isValueTouched(){return this._isValueTouched}reset(e,a=!0,u=!1){const i=e??this.originalValue;if(this._msInstance){this.originalValue=this.isMultipleSelect?void 0!==i?[i]:[]:i;const o=void 0===this.originalValue?[]:[this.originalValue];this._msInstance.setSelects(o)}this._isValueTouched=!1;const r=this.args.compositeEditorOptions;if(r&&a){const o=!u;this.handleChangeOnCompositeEditor(r,"user",o)}}save(e=!1){const u=this.validate()?.valid??!1;(!this._isDisposingOrCallingSave||e)&&this.hasAutoCommitEdit&&u?this.grid.getEditorLock().commitCurrentEdit():this.args.commitChanges()}validate(e,a){const u=!this.isCompositeEditor&&this.columnEditor?.required,i=void 0!==a?a:this._msInstance?.getSelects(),r=this.columnEditor&&this.columnEditor.errorMessage;if(this.isCompositeEditor&&this.applyInputUsabilityState(),this.disabled)return{valid:!0,msg:""};if(this.validator){const o=void 0!==a?a:this.isMultipleSelect?this.currentValues:this.currentValue;return this.validator(o,this.args)}return u&&(""===i||Array.isArray(i)&&0===i.length)?{valid:!1,msg:r||ue.VALIDATION_REQUIRED_FIELD}:{valid:!0,msg:null}}applyInputUsabilityState(){const e=this.grid.getActiveCell(),a=this.grid.onBeforeEditCell.notify({...e,item:this.dataContext,column:this.args.column,grid:this.grid,target:"composite",compositeEditorOptions:this.args.compositeEditorOptions}).getReturnValue();this.disable(!1===a)}filterCollection(e){let a=e;if(this.columnEditor&&this.columnEditor.collectionFilterBy){const u=this.columnEditor.collectionFilterBy,i=this.columnEditor.collectionOptions?.filterResultAfterEachPass??null;a=this._collectionService.filterCollection(a,u,i)}return a}sortCollection(e){let a=e;if(this.columnDef&&this.columnEditor&&this.columnEditor.collectionSortBy){const u=this.columnEditor.collectionSortBy;a=this._collectionService.sortCollection(this.columnDef,a,u,this.enableTranslateLabel)}return a}renderDomElement(e){if(!Array.isArray(e)&&this.collectionOptions?.collectionInsideObjectProperty){e=ti(e,this.collectionOptions.collectionInsideObjectProperty)}if(!Array.isArray(e))throw new Error('The "collection" passed to the Select Editor is not a valid array.');let a=[];if(e.length>0&&(a=[...e]),this.collectionOptions?.addBlankEntry&&Array.isArray(a)&&a.length>0&&""!==a[0][this.valueName]&&(a.unshift(this.createBlankEntry()),this.collection.unshift(this.createBlankEntry())),this.collectionOptions?.addCustomFirstEntry&&Array.isArray(a)&&a.length>0&&a[0][this.valueName]!==this.collectionOptions.addCustomFirstEntry[this.valueName]&&(a.unshift(this.collectionOptions.addCustomFirstEntry),this.collection.unshift(this.collectionOptions.addCustomFirstEntry)),this.collectionOptions?.addCustomLastEntry&&Array.isArray(a)&&a.length>0){a[a.length-1][this.valueName]!==this.collectionOptions.addCustomLastEntry[this.valueName]&&a.push(this.collectionOptions.addCustomLastEntry)}let u=a;if(u=this.filterCollection(u),u=this.sortCollection(u),this.columnEditor?.collectionOverride){const r={column:this.columnDef,dataContext:this.dataContext,grid:this.grid,originalCollections:this.collection};if(this.args.compositeEditorOptions){const{formValues:o,modalType:d}=this.args.compositeEditorOptions;r.compositeEditorOptions={formValues:o,modalType:d}}u=this.columnEditor.collectionOverride(u,r)}this.finalCollection=u;const i=ZK("editor",u,this.columnDef,this.grid,this.isMultipleSelect,this._translaterService);this.createDomElement(i.selectElement,i.dataCollection)}createBlankEntry(){const e={[this.labelName]:"",[this.valueName]:""};return this.labelPrefixName&&(e[this.labelPrefixName]=""),this.labelSuffixName&&(e[this.labelSuffixName]=""),e}createDomElement(e,a){const u=this.args.container;e&&u&&"function"==typeof u.appendChild&&(_t(u),u.appendChild(e));const i=this.columnEditor?.placeholder??"";this.defaultOptions.placeholder=i||"",this.editorElmOptions={...this.defaultOptions,...this.editorOptions,data:a},this._msInstance=Lv(e,this.editorElmOptions),this.editorElm=this._msInstance.getParentElement(),this.isCompositeEditor||this.show(this.delayOpening)}handleChangeOnCompositeEditor(e,a="user",u=!1){const i=this.grid.getActiveCell(),r=this.args.column,o=this.columnDef?.id??"",d=this.dataContext,h=this.grid,m=this.serializeValue();this.validate().valid&&this.applyValue(this.dataContext,m),this.applyValue(e.formValues,m);const g=this.gridOptions?.compositeEditorOptions?.excludeDisabledFieldFormValues??!1;(u||this.disabled&&g&&e.formValues.hasOwnProperty(o))&&delete e.formValues[o],h.onCompositeEditorChange.notify({...i,item:d,grid:h,column:r,formValues:e.formValues,editors:e.editors,triggeredBy:a},new Wt)}}const qe={autocompleter:class Rme{constructor(e){if(this.args=e,this._isValueTouched=!1,this._lastTriggeredByClearInput=!1,this.disabled=!1,this.forceUserInput=!1,this.finalCollection=[],!e)throw new Error("[Slickgrid-Universal] Something is wrong with this grid, an Editor must always have valid arguments.");this.grid=e.grid,this._bindEventService=new Ni,this.gridOptions?.translater&&(this._translater=this.gridOptions.translater),this._locales=this.gridOptions&&this.gridOptions.locales||ue.locales,this.init()}get autocompleterOptions(){return this._autocompleterOptions||{}}get collection(){return this.columnEditor?.collection??[]}get editorDomElement(){return this._inputElm}get elementCollection(){return this._elementCollection}get columnDef(){return this.args.column}get columnEditor(){return this.columnDef?.editor||{}}get customStructure(){let e=this.columnEditor?.customStructure;const a=this.columnEditor?.type??this.columnDef?.type;return!e&&a===w.object&&this.columnDef?.dataKey&&this.columnDef?.labelKey&&(e={label:this.columnDef.labelKey,value:this.columnDef.dataKey}),e}get dataContext(){return this.args.item}get editorOptions(){return{...this.gridOptions.defaultEditorOptions?.autocompleter,...this.columnEditor?.editorOptions}}get gridOptions(){return this.grid?.getOptions()??{}}get instance(){return this._instance}get hasAutoCommitEdit(){return this.gridOptions.autoCommitEdit??!1}get validator(){return this.columnEditor?.validator??this.columnDef?.validator}init(){this.labelName=this.customStructure?.label??"label",this.valueName=this.customStructure?.value??"value",this.labelPrefixName=this.customStructure?.labelPrefix??"labelPrefix",this.labelSuffixName=this.customStructure?.labelSuffix??"labelSuffix";let e=this.columnEditor.collection;this.columnEditor?.collectionAsync&&!e&&(e=[]),this.renderDomElement(e),(this.disabled||this.columnEditor?.collectionAsync&&Array.isArray(e)&&0===e.length)&&this.disable(!0)}destroy(){this._bindEventService.unbindAll(),"function"==typeof this._instance?.destroy&&this._instance.destroy(),this._inputElm?.remove?.(),this._elementCollection=null}disable(e=!0){const a=this.disabled;if(this.disabled=e,this._inputElm)if(e){this._inputElm.disabled=!0;const u=this.getValue();a!==e&&this.args?.compositeEditorOptions&&""!==u&&this.clear(!0)}else this._inputElm.disabled=!1}focus(){this.grid.focus(),this._inputElm&&(this._inputElm.focus(),this._inputElm.select())}show(){this.args?.compositeEditorOptions&&this.applyInputUsabilityState()}getValue(){return this._inputElm.value}setValue(e,a=!1,u=!0){if(this._inputElm.value=e?.hasOwnProperty(this.labelName)?e[this.labelName]:e,a){this._currentValue=e,this._defaultTextValue="string"==typeof e?e:e?.[this.labelName]??"",this.applyValue(this.args.item,this.serializeValue());const i=this.args.compositeEditorOptions;i&&u&&this.handleChangeOnCompositeEditor(null,i,"system")}}applyValue(e,a){let u=a;const i=this.columnDef?.field;if(void 0!==i){Array.isArray(this.collection)&&this.collection.length>0&&(u=zc(this.collection,d=>d&&Mh(a)&&d.hasOwnProperty(this.valueName)?d[this.valueName].toString()===(a.hasOwnProperty(this.valueName)&&a[this.valueName].toString()):d&&"string"==typeof a&&d.hasOwnProperty(this.valueName)?d[this.valueName].toString()===a:d?.toString()===a,""));const r=i?.indexOf(".")>0;if(u=this.validate(null,u)?.valid?u:"",r){vr(e,this.columnEditor?.complexObjectPath??i??"",u)}else e[i]=u}}isValueChanged(){const e=this._inputElm.value,a=this._lastInputKeyEvent?.key;if(this.columnEditor?.alwaysSaveOnEnterKey&&"Enter"===a)return!0;const u=!(""===e&&(null===this._defaultTextValue||void 0===this._defaultTextValue))&&e!==this._defaultTextValue;return this._lastTriggeredByClearInput||u}isValueTouched(){return this._isValueTouched}loadValue(e){const a=this.columnDef?.field;if(e&&void 0!==a){const i=a?.indexOf(".")>0?ti(e,a):e[a];this._currentValue=i,this._originalValue=i,this._defaultTextValue="string"==typeof i?i:i?.[this.labelName]??"",this._inputElm.value=this._defaultTextValue,this._inputElm.select()}}clear(e=!1){this._inputElm&&(this._currentValue="",this._defaultTextValue="",this.setValue("",!0)),this._isValueTouched=!0,this._lastTriggeredByClearInput=!0;const a=this.args.compositeEditorOptions;if(a){const u=!e;this.handleChangeOnCompositeEditor(null,a,"user",u)}else this.save()}reset(e,a=!0,u=!1){const i=e??this._originalValue??"";this._inputElm&&(this._currentValue=i,this._defaultTextValue="string"==typeof i?i:i?.[this.labelName]??"",this._inputElm.value=this._defaultTextValue),this._isValueTouched=!1;const r=this.args.compositeEditorOptions;if(r&&a){const o=!u;this.handleChangeOnCompositeEditor(null,r,"user",o)}}save(){const a=this.validate()?.valid??!1;this.hasAutoCommitEdit&&a?this.grid.getEditorLock().commitCurrentEdit():this.args.commitChanges()}serializeValue(){if(this._inputElm&&this.editorOptions.forceUserInput){const e=this.editorOptions?.minLength??3;this._currentValue=this._inputElm.value.length>e?this._inputElm.value:this._currentValue}return this.customStructure&&this._currentValue&&this._currentValue.hasOwnProperty(this.valueName)&&this.columnDef?.type!==w.object&&this.columnEditor?.type!==w.object?this._currentValue[this.valueName]:this._currentValue&&void 0!==this._currentValue.value?this.columnDef?.type===w.object||this.columnEditor?.type===w.object?{[this.labelName]:this._currentValue.label,[this.valueName]:this._currentValue.value}:this._currentValue.value:this._currentValue}validate(e,a){if(this.args.compositeEditorOptions&&this.applyInputUsabilityState(),this.disabled)return{valid:!0,msg:""};return L7(void 0!==a?a:this._inputElm?.value,{editorArgs:this.args,errorMessage:this.columnEditor.errorMessage,minLength:this.columnEditor.minLength,maxLength:this.columnEditor.maxLength,operatorConditionalType:this.columnEditor.operatorConditionalType,required:!this.args?.compositeEditorOptions&&this.columnEditor.required,validator:this.validator})}applyInputUsabilityState(){const e=this.grid.getActiveCell(),a=this.grid.onBeforeEditCell.notify({...e,item:this.dataContext,column:this.args.column,grid:this.grid,target:"composite",compositeEditorOptions:this.args.compositeEditorOptions}).getReturnValue();this.disable(!1===a)}handleChangeOnCompositeEditor(e,a,u="user",i=!1){const r=this.grid.getActiveCell(),o=this.args.column,d=this.columnDef?.id??"",h=this.dataContext,m=this.grid,g=this.serializeValue();this.validate().valid&&this.applyValue(this.dataContext,g),this.applyValue(a.formValues,g);const v=this.gridOptions?.compositeEditorOptions?.excludeDisabledFieldFormValues??!1;(i||this.disabled&&v&&a.formValues.hasOwnProperty(d))&&delete a.formValues[d],m.onCompositeEditorChange.notify({...r,item:h,grid:m,column:o,formValues:a.formValues,editors:a.editors,triggeredBy:u},new Wt(e))}handleSelect(e){if(void 0!==e){const u=e;this._currentValue=u,this._isValueTouched=!0;const i=this.args.compositeEditorOptions,r=this.editorOptions?.renderItem??!1,o="string"==typeof u?u:r?u[this.labelName]:u.label;if(this.setValue(o),i?this.handleChangeOnCompositeEditor(null,i):this.save(),"function"==typeof this.editorOptions.onSelectItem){const{row:d,cell:h}=this.grid.getActiveCell()||{};this.editorOptions.onSelectItem(e,d,h,this.args.column,this.args.item)}setTimeout(()=>this._lastTriggeredByClearInput=!1)}return!1}renderRegularItem(e){return T("div",{textContent:("string"==typeof e?e:e?.label??"")||""})}renderCustomItem(e){const a=this._autocompleterOptions?.renderItem?.templateCallback(e)??"",u=document.createElement("div");return this.grid.applyHtmlCode(u,a),u}renderCollectionItem(e){const a=this.columnEditor?.enableRenderHtml??!1,o=(e.labelPrefix||"")+(e.label||"")+(e.labelSuffix||""),d=this.grid.sanitizeHtmlString(o)||"",h=document.createElement("div");return h[a?"innerHTML":"textContent"]=d,h}renderDomElement(e){const a=this.columnDef?.id??"",u=this.columnEditor?.placeholder??"",i=this.columnEditor?.title??"";this._editorInputGroupElm=T("div",{className:"autocomplete-container input-group"});const r=T("span",{className:"input-group-btn input-group-append",dataset:{clear:""}});this._clearButtonElm=T("button",{type:"button",className:"btn btn-default btn-clear"}),this._clearButtonElm.appendChild(T("i",{className:"icon-clear"})),this._inputElm=T("input",{type:"text",placeholder:u,title:i,autocomplete:"off",ariaAutoComplete:"none",className:`autocomplete form-control editor-text input-group-editor editor-${a}`,dataset:{input:""}},this._editorInputGroupElm),this._editorInputGroupElm.appendChild(document.createElement("span")),this.editorOptions?.hideClearButton||(r.appendChild(this._clearButtonElm),this._editorInputGroupElm.appendChild(r),this._bindEventService.bind(this._clearButtonElm,"click",()=>this.clear())),this._bindEventService.bind(this._inputElm,"focus",()=>this._inputElm?.select()),this._bindEventService.bind(this._inputElm,"keydown",d=>{this._lastInputKeyEvent=d,("ArrowLeft"===d.key||"ArrowRight"===d.key)&&d.stopImmediatePropagation(),"Enter"===d.key&&""===d.target.value&&this.columnEditor.alwaysSaveOnEnterKey&&(this._currentValue=null)});let o=e;if(o&&this.columnEditor?.collectionOverride){const d={column:this.columnDef,dataContext:this.dataContext,grid:this.grid,originalCollections:this.collection};if(this.args.compositeEditorOptions){const{formValues:h,modalType:m}=this.args.compositeEditorOptions;d.compositeEditorOptions={formValues:h,modalType:m}}o=this.columnEditor.collectionOverride(o,d)}o&&(this.finalCollection=o),Array.isArray(o)&&(o=this.collection.every(d=>j2(d))?o.map(d=>({label:d,value:d})):o.map(d=>({label:d?.[this.labelName],value:d?.[this.valueName],labelPrefix:d?.[this.labelPrefixName]??"",labelSuffix:d?.[this.labelSuffixName]??""})),this._elementCollection=o),this._autocompleterOptions={input:this._inputElm,debounceWaitMs:200,className:`slick-autocomplete ${this.editorOptions?.className??""}`.trim(),emptyMsg:this.gridOptions.enableTranslate&&this._translater?.translate?this._translater.translate("NO_ELEMENTS_FOUND"):this._locales?.TEXT_NO_ELEMENTS_FOUND??"No elements found",customize:(d,h,m)=>{m.style.width=""},onSelect:this.handleSelect.bind(this),...this.editorOptions},this.gridOptions?.darkMode&&(this._autocompleterOptions.className+=" slick-dark-mode"),this.autocompleterOptions.className=Kt(this.autocompleterOptions.className).join(" "),this._autocompleterOptions.renderItem?.layout?(this._autocompleterOptions.className+=` autocomplete-custom-${fv(this._autocompleterOptions.renderItem.layout)}`,this._autocompleterOptions.render=this.renderCustomItem.bind(this)):Array.isArray(e)?this._autocompleterOptions.render=this._autocompleterOptions.render?.bind(this)??this.renderCollectionItem.bind(this):this._autocompleterOptions.render||(this._autocompleterOptions.render=this.renderRegularItem.bind(this)),this._autocompleterOptions?.fetch?(EK(this._inputElm,this._autocompleterOptions),this._instance=YF(this._autocompleterOptions)):this._instance=YF({...this._autocompleterOptions,fetch:(d,h)=>{o&&h(o.filter(m=>(("string"==typeof m?m:m?.label)||"").toLowerCase().includes(d.toLowerCase())))}}),this.args.container.appendChild(this._editorInputGroupElm),this.args.compositeEditorOptions||setTimeout(()=>this.focus(),50)}},checkbox:class Hme{constructor(e){if(this.args=e,this._isValueTouched=!1,this.disabled=!1,!e)throw new Error("[Slickgrid-Universal] Something is wrong with this grid, an Editor must always have valid arguments.");this.grid=e.grid,this.gridOptions=this.grid.getOptions()||{},this._bindEventService=new Ni,this.init()}get columnDef(){return this.args.column}get columnEditor(){return this.columnDef?.editor||{}}get dataContext(){return this.args.item}get editorDomElement(){return this._input}get hasAutoCommitEdit(){return this.gridOptions.autoCommitEdit??!1}get validator(){return this.columnEditor?.validator??this.columnDef?.validator}init(){const e=this.columnDef?.id??"",a=this.args.compositeEditorOptions;this._checkboxContainerElm=T("div",{className:`checkbox-editor-container editor-${e}`}),this._input=T("input",{type:"checkbox",value:"true",ariaLabel:this.columnEditor?.ariaLabel??`${Qs(e+"")} Checkbox Editor`,className:`editor-checkbox editor-${e}`,title:this.columnEditor?.title??""});const u=this.args?.container;u&&"function"==typeof u.appendChild&&(a?(this._checkboxContainerElm.appendChild(this._input),u.appendChild(this._checkboxContainerElm)):u.appendChild(this._input)),this.hasAutoCommitEdit&&!a&&this._bindEventService.bind(this._input,"click",()=>{this._isValueTouched=!0,this.save()}),a?this._bindEventService.bind(this._input,"change",i=>{this._isValueTouched=!0,this.handleChangeOnCompositeEditor(i,a)}):this.focus()}destroy(){this._bindEventService.unbindAll(),this._input?.remove?.()}disable(e=!0){const a=this.disabled;if(this.disabled=e,this._input)if(e){this._input.setAttribute("disabled","disabled"),this._checkboxContainerElm.classList.add("disabled");const u=this.getValue();a!==e&&this.args?.compositeEditorOptions&&!1!==u&&this.reset(!1,!0,!0)}else this._input.removeAttribute("disabled"),this._checkboxContainerElm.classList.remove("disabled")}focus(){this.grid.focus(),this._input?.focus()}preClick(){this._input&&(this._input.checked=!this._input.checked)}show(){this.args?.compositeEditorOptions&&this.applyInputUsabilityState()}getValue(){return this._input?.checked??!1}setValue(e,a=!1,u=!0){const i=!!e;if(this._input&&(this._input.checked=i),a){this.applyValue(this.args.item,this.serializeValue());const r=this.args.compositeEditorOptions;r&&u&&this.handleChangeOnCompositeEditor(null,r,"system")}}applyValue(e,a){const u=this.columnDef&&this.columnDef.field;if(void 0!==u){const i=u?.indexOf(".")>0,r=this.validate(null,a),o=r&&r.valid?a:"";if(i){vr(e,this.columnEditor?.complexObjectPath??u??"",o)}else e[u]=o}}isValueChanged(){return this.serializeValue()!==this._originalValue}isValueTouched(){return this._isValueTouched}loadValue(e){const a=this.columnDef&&this.columnDef.field;if(e&&void 0!==a&&this._input){const i=a?.indexOf(".")>0?ti(e,a):e[a];this._originalValue=i,this._input.checked=!!this._originalValue}}reset(e,a=!0,u=!1){const i=e??this._originalValue??!1;this._input&&(this._originalValue=i,this._input.checked=!!i),this._isValueTouched=!1;const r=this.args.compositeEditorOptions;if(r&&a){const o=!u;this.handleChangeOnCompositeEditor(null,r,"user",o)}}save(){const e=this.validate(),a=e&&e.valid||!1;this.hasAutoCommitEdit&&a?this.grid.getEditorLock().commitCurrentEdit():this.args.commitChanges()}serializeValue(){return this._input?.checked??!1}validate(e,a){const u=!this.args?.compositeEditorOptions&&this.columnEditor.required,i=void 0!==a?a:this._input?.checked,r=this.columnEditor.errorMessage;return this.args.compositeEditorOptions&&this.applyInputUsabilityState(),this.disabled?{valid:!0,msg:""}:this.validator?this.validator(i,this.args):u&&!i?{valid:!1,msg:r||ue.VALIDATION_REQUIRED_FIELD}:{valid:!0,msg:null}}applyInputUsabilityState(){const e=this.grid.getActiveCell(),a=this.grid.onBeforeEditCell.notify({...e,item:this.dataContext,column:this.args.column,grid:this.grid,target:"composite",compositeEditorOptions:this.args.compositeEditorOptions}).getReturnValue();this.disable(!1===a)}handleChangeOnCompositeEditor(e,a,u="user",i=!1){const r=this.grid.getActiveCell(),o=this.args.column,d=this.columnDef?.id??"",h=this.dataContext,m=this.grid,g=this.serializeValue();this.validate().valid&&this.applyValue(this.dataContext,g),this.applyValue(a.formValues,g);const v=this.gridOptions?.compositeEditorOptions?.excludeDisabledFieldFormValues??!1;(i||this.disabled&&v&&a.formValues.hasOwnProperty(d))&&delete a.formValues[d],m.onCompositeEditorChange.notify({...r,item:h,grid:m,column:o,formValues:a.formValues,editors:a.editors,triggeredBy:u},new Wt(e))}},date:class Vme{constructor(e){if(this.args=e,this._isValueTouched=!1,this._lastClickIsDate=!1,this._lastTriggeredByClearDate=!1,this.hasTimePicker=!1,this.disabled=!1,!e)throw new Error("[Slickgrid-Universal] Something is wrong with this grid, an Editor must always have valid arguments.");this.grid=e.grid,this.gridOptions=this.grid.getOptions()||{},this.gridOptions?.translater&&(this._translaterService=this.gridOptions.translater),this._bindEventService=new Ni,this.init()}get columnDef(){return this.args.column}get columnEditor(){return this.columnDef?.editor||{}}get dataContext(){return this.args.item}get editorDomElement(){return this._inputElm}get editorOptions(){return{...this.gridOptions.defaultEditorOptions?.date,...this.columnEditor?.editorOptions}}get hasAutoCommitEdit(){return this.gridOptions.autoCommitEdit??!1}get pickerOptions(){return this._pickerMergedOptions}get validator(){return this.columnEditor?.validator??this.columnDef?.validator}init(){var e=this;return Su(function*(){if(e.args&&e.columnDef){const a=e.args.compositeEditorOptions,u=e.columnDef?.id??"",i=e.args.grid.getOptions()||{};e.defaultDate=e.args.item?.[e.columnDef.field];const r=e.columnDef.outputType||e.columnEditor.type||e.columnDef.type||w.dateUtc,o=tl(r),d=e._translaterService?.getCurrentLanguage?.()||i.locale||"en";o&&("ISO8601"===o||o.toLowerCase().includes("h"))&&(e.hasTimePicker=!0);const h=tl(e.hasTimePicker?w.dateTimeIsoAM_PM:w.dateIso),m={input:!0,jumpToSelectedDate:!0,sanitizer:k=>e.grid.sanitizeHtmlString(k),toggleSelected:!1,actions:{clickDay:()=>{e._lastClickIsDate=!0},changeToInput:(k,x)=>{if(x.HTMLInputElement){let D="";if(x.selectedDates[0]?(D=x.selectedDates[0],x.HTMLInputElement.value=ed(x.selectedDates[0],void 0,r)):x.HTMLInputElement.value="",D&&e.hasTimePicker){const C=qF(D,h);C.setHours(+(x.selectedHours||0)),C.setMinutes(+(x.selectedMinutes||0)),x.HTMLInputElement.value=ed(C,void 0,r)}e._lastClickIsDate&&(e.handleOnDateChange(),x.hide())}}},settings:{lang:d,iso8601:!1,visibility:{theme:e.gridOptions?.darkMode?"dark":"light",positionToInput:"auto",weekend:!1}}};e.hasTimePicker&&(m.settings.selection={time:24}),e._pickerMergedOptions=cu(!0,{},m,{settings:e.editorOptions,type:"default"});const g=`.editor-text.date-picker.editor-${u}.form-control.input-group-editor`;e._editorInputGroupElm=T("div",{className:"vanilla-picker input-group"});const v=T("span",{className:"input-group-btn input-group-append",dataset:{clear:""}});e._clearButtonElm=T("button",{type:"button",className:"btn btn-default btn-clear"}),e._clearButtonElm.appendChild(T("i",{className:"icon-clear"})),e._inputElm=T("input",{placeholder:e.columnEditor?.placeholder??"",title:e.columnEditor&&e.columnEditor.title||"",className:g.replace(/\./g," "),dataset:{input:"",defaultdate:e.defaultDate},readOnly:!0},e._editorInputGroupElm),e.args.container.appendChild(e._editorInputGroupElm),e.columnEditor.editorOptions?.hideClearButton||(v.appendChild(e._clearButtonElm),e._editorInputGroupElm.appendChild(v),e._bindEventService.bind(e._clearButtonElm,"click",()=>{e.clear(),e.handleOnDateChange()})),queueMicrotask(()=>{e.calendarInstance=new WK(e._inputElm,e._pickerMergedOptions),e.calendarInstance.init(),a||(e.show(),e.focus()),e.calendarInstance&&W2(e.columnEditor,e._inputElm,e.calendarInstance,{columnDef:e.columnDef,newVal:e.defaultDate,updatePickerUI:!0})})}})()}destroy(){queueMicrotask(()=>{this.hide(),this.calendarInstance?.destroy(),_t(this._editorInputGroupElm),_t(this._inputElm),this._editorInputGroupElm?.remove(),this._inputElm?.remove()}),this._bindEventService.unbindAll()}clear(){this._lastTriggeredByClearDate=!0,this.calendarInstance&&(this.calendarInstance.settings.selected.dates=[],this._inputElm.value="")}disable(e=!0){const a=this.disabled;if(this.disabled=e,this._inputElm)if(e){this._inputElm.setAttribute("disabled","disabled"),this._clearButtonElm.disabled=!0;const u=this.getValue();a!==e&&this.args?.compositeEditorOptions&&""!==u&&this.reset("",!0,!0)}else this._inputElm.removeAttribute("disabled"),this._clearButtonElm.disabled=!1}changeEditorOption(e,a){this.columnEditor.editorOptions||(this.columnEditor.editorOptions={}),this.columnEditor.editorOptions[e]=a,this._pickerMergedOptions=cu(!0,{},this._pickerMergedOptions,{settings:{[e]:a}})}focus(){this.grid.focus(),this.show(),this._inputElm?.focus()}hide(){this.calendarInstance?.hide()}show(){const e=!!this.args?.compositeEditorOptions;!e&&this.calendarInstance?this.calendarInstance.show():e&&this.applyInputUsabilityState()}getValue(){return this._inputElm.value}setValue(e,a=!1,u=!0){if(this.calendarInstance&&W2(this.columnEditor,this._inputElm,this.calendarInstance,{columnDef:this.columnDef,newVal:e,updatePickerUI:!0}),a){this.applyValue(this.args.item,this.serializeValue());const i=this.args.compositeEditorOptions;i&&u&&this.handleChangeOnCompositeEditor(i,"system")}}applyValue(e,a){const u=this.columnDef?.field;if(this.columnDef&&void 0!==u){const i=this.columnDef.saveOutputType||this.columnDef.outputType||this.columnEditor.type||this.columnDef.type||w.dateUtc,r=this.columnDef.outputType||this.columnEditor.type||this.columnDef.type||w.dateUtc,o=u.indexOf(".")>0,d=this.validate(null,a),h=a&&d?.valid?ed(a,r,i):"";if(o){vr(e,this.columnEditor?.complexObjectPath??u,h)}else e[u]=h}}isValueChanged(){let e=!1;const a=this.getValue();return this.columnDef&&(e=this._lastTriggeredByClearDate||!(""===a&&""===this._originalDate)&&a!==this._originalDate),e}isValueTouched(){return this._isValueTouched}loadValue(e){const a=this.columnDef?.field;if(e&&this.columnDef&&void 0!==a){const i=a?.indexOf(".")>0?ti(e,a):e[a],r=this.columnEditor.type||this.columnDef?.type||w.dateIso,o=this.columnDef.outputType||this.columnEditor.type||this.columnDef.type||w.dateIso;this._originalDate=ed(i,r,o),this._inputElm.value=this._originalDate}}reset(e,a=!0,u=!1){const i=e??this._originalDate??"";this.calendarInstance&&(this._originalDate=i,this.calendarInstance.settings.selected.dates=[i],i||(this.calendarInstance.settings.selected.dates=[],this._inputElm.value="")),this._isValueTouched=!1;const r=this.args.compositeEditorOptions;if(r&&a){const o=!u;this.handleChangeOnCompositeEditor(r,"user",o)}}save(){const a=this.validate()?.valid??!1;this.hasAutoCommitEdit&&a?this.grid.getEditorLock().commitCurrentEdit():this.args.commitChanges()}serializeValue(){return this.getValue()||""}validate(e,a){const u=!this.args?.compositeEditorOptions&&this.columnEditor.required,i=a??this._inputElm?.value,r=this.columnEditor.errorMessage;return this.args.compositeEditorOptions&&this.applyInputUsabilityState(),this.disabled?{valid:!0,msg:""}:this.validator?this.validator(i,this.args):u&&""===i?{valid:!1,msg:r||ue.VALIDATION_REQUIRED_FIELD}:{valid:!0,msg:null}}applyInputUsabilityState(){const e=this.grid.getActiveCell(),a=this.grid.onBeforeEditCell.notify({...e,item:this.dataContext,column:this.args.column,grid:this.grid,target:"composite",compositeEditorOptions:this.args.compositeEditorOptions}).getReturnValue();this.disable(!1===a)}handleOnDateChange(){if(this._isValueTouched=!0,this.args){const e=this.args.compositeEditorOptions;e?this.handleChangeOnCompositeEditor(e):this.save()}setTimeout(()=>this._lastTriggeredByClearDate=!1)}handleChangeOnCompositeEditor(e,a="user",u=!1){const i=this.grid.getActiveCell(),r=this.args.column,o=this.columnDef?.id??"",d=this.dataContext,h=this.grid,m=this.serializeValue();this.validate().valid&&this.applyValue(this.dataContext,m),this.applyValue(e.formValues,m);const g=this.gridOptions?.compositeEditorOptions?.excludeDisabledFieldFormValues??!1;(u||this.disabled&&g&&e.formValues.hasOwnProperty(o))&&delete e.formValues[o],h.onCompositeEditorChange.notify({...i,item:d,grid:h,column:r,formValues:e.formValues,editors:e.editors,triggeredBy:a},new Wt)}},dualInput:class jme{constructor(e){if(this.args=e,this._isValueSaveCalled=!1,this._isLeftValueTouched=!1,this._isRightValueTouched=!1,this.disabled=!1,!e)throw new Error("[Slickgrid-Universal] Something is wrong with this grid, an Editor must always have valid arguments.");this.grid=e.grid,this.gridOptions=this.grid.getOptions()||{},this._eventHandler=new Ut,this._bindEventService=new Ni,this.init(),this._eventHandler.subscribe(this.grid.onValidationError,()=>this._isValueSaveCalled=!0)}get columnDef(){return this.args.column}get columnEditor(){return this.columnDef?.editor||{}}get dataContext(){return this.args.item}get editorDomElement(){return{leftInput:this._leftInput,rightInput:this._rightInput}}get editorParams(){return this.columnEditor.params||{}}get eventHandler(){return this._eventHandler}get hasAutoCommitEdit(){return this.gridOptions.autoCommitEdit??!1}get isValueSaveCalled(){return this._isValueSaveCalled}get validator(){return this.columnEditor?.validator??this.columnDef?.validator}init(){if(!(this.editorParams&&this.editorParams.leftInput&&this.editorParams.leftInput.field&&this.editorParams.rightInput&&this.editorParams.rightInput.field))throw new Error("[Slickgrid-Universal] Please make sure that your Combo Input Editor has params defined with \"leftInput\" and \"rightInput\" (example: { editor: { model: Editors.comboInput, params: { leftInput: { field: 'firstName' }, { rightSide: { field: 'lastName' } }}}");this._leftFieldName=this.editorParams.leftInput?.field,this._rightFieldName=this.editorParams.rightInput?.field,this._leftInput=this.createInput("leftInput"),this._rightInput=this.createInput("rightInput");const e=this.args?.container;e&&"function"==typeof e.appendChild&&(e.appendChild(this._leftInput),e.appendChild(this._rightInput)),this._bindEventService.bind(this._leftInput,"keydown",u=>this.handleKeyDown(u,"leftInput")),this._bindEventService.bind(this._rightInput,"keydown",u=>this.handleKeyDown(u,"rightInput")),this.hasAutoCommitEdit&&(this._bindEventService.bind(this._leftInput,"focusout",u=>this.handleFocusOut(u,"leftInput")),this._bindEventService.bind(this._rightInput,"focusout",u=>this.handleFocusOut(u,"rightInput"))),this.args?.compositeEditorOptions?(this._bindEventService.bind(this._leftInput,"input",this.handleChangeOnCompositeEditorDebounce.bind(this)),this._bindEventService.bind(this._rightInput,"input",this.handleChangeOnCompositeEditorDebounce.bind(this))):setTimeout(()=>this._leftInput.select(),50)}handleFocusOut(e,a){const u=e.relatedTarget?.className||"";!this.args.compositeEditorOptions&&-1===u.indexOf("dual-editor")&&"focusout-right"!==this._lastEventType&&("rightInput"===a||"leftInput"===a&&"focusout-left"!==this._lastEventType)&&("leftInput"===a?this._isLeftValueTouched=!0:this._isRightValueTouched=!0,this.save());const r="leftInput"===a?"left":"right";this._lastEventType=`${e?.type}-${r}`}handleKeyDown(e,a){"leftInput"===a?this._isLeftValueTouched=!0:this._isRightValueTouched=!0,this._lastInputKeyEvent=e,("ArrowLeft"===e.key||"ArrowRight"===e.key||"Tab"===e.key)&&e.stopImmediatePropagation()}destroy(){this._eventHandler.unsubscribeAll(),this._bindEventService.unbindAll(),this._leftInput?.remove?.(),this._rightInput?.remove?.()}createInput(e){const a=this.editorParams[e],u=this.columnDef?.id??"",i=this.gridOptions.datasetIdPropertyName||"id",r=this.args?.item?.[i]??"";let o=a.type||"text";("float"===o||"integer"===o)&&(o="number");const d=T("input",{type:o||"text",id:`item-${r}-${e}`,ariaLabel:this.columnEditor?.ariaLabel??`${Qs(u+"")} Input Editor`,className:`dual-editor-text editor-${u} ${e.replace(/input/gi,"")}`,autocomplete:"off",ariaAutoComplete:"none",placeholder:a.placeholder||"",title:a.title||""});return"readonly"===o&&(d.readOnly=!0,o="text"),"number"===o&&(d.step=this.getInputDecimalSteps(e)),d}disable(e=!0){const a=this.disabled;this.disabled=e,this._leftInput&&this._rightInput&&(e?(this._leftInput.setAttribute("disabled","disabled"),this._rightInput.setAttribute("disabled","disabled"),a!==e&&this.args?.compositeEditorOptions&&this.reset("",!0,!0)):(this._leftInput.removeAttribute("disabled"),this._rightInput.removeAttribute("disabled")))}focus(){this.grid.focus()}show(){this.args?.compositeEditorOptions&&this.applyInputUsabilityState()}getValues(){const e={},a=this._leftInput.value,u=this._rightInput.value,i=this.editorParams.leftInput&&("float"===this.editorParams.leftInput.type||"integer"===this.editorParams.leftInput.type),r=this.editorParams.rightInput&&("float"===this.editorParams.rightInput.type||"integer"===this.editorParams.rightInput.type),o=""!==a&&i?+this._leftInput.value:a||"",d=""!==u&&r?+this._rightInput.value:u||"";return vr(e,this._leftFieldName,o),vr(e,this._rightFieldName,d),e}setValues(e){Array.isArray(e)&&2===e.length&&(this._leftInput.value=`${e[0]}`,this._rightInput.value=`${e[1]}`)}applyValue(e,a){this.applyValueByPosition(e,a,"leftInput"),this.applyValueByPosition(e,a,"rightInput")}applyValueByPosition(e,a,u){const i="leftInput"===u?this._leftFieldName:this._rightFieldName;if(void 0!==i){const r=i?.indexOf(".")>0;let o=i;if(r){const m=i.split(/\.(.*)/);o=m.length>1?m[1]:m}const d=r?ti(a,o):a[i],h=this.validate(null,{position:u,inputValue:d});if(r){const m=ti(a,o),g=h&&h.valid?m:"";vr(e,this.columnEditor?.complexObjectPath??i??"",g)}else i&&(e[i]=h&&h.valid?a[i]:"")}}isValueChanged(){const e=this._leftInput.value,a=this._rightInput.value,u=this.editorParams?.leftInput,i=this.editorParams?.rightInput,r=this._lastInputKeyEvent?.key;if((u&&u.alwaysSaveOnEnterKey||i&&i.alwaysSaveOnEnterKey)&&"Enter"===r)return!0;const o=!(""===e&&(null===this._originalLeftValue||void 0===this._originalLeftValue))&&e!==this._originalLeftValue,d=!(""===a&&(null===this._originalRightValue||void 0===this._originalRightValue))&&a!==this._originalRightValue;return o||d}isValueTouched(){return this._isLeftValueTouched||this._isRightValueTouched}loadValue(e){this.loadValueByPosition(e,"leftInput"),this.loadValueByPosition(e,"rightInput"),this._leftInput.select()}loadValueByPosition(e,a){const u="leftInput"===a?this._leftFieldName:this._rightFieldName,i="leftInput"===a?"_originalLeftValue":"_originalRightValue",r="leftInput"===a?"_leftInput":"_rightInput";if(e&&void 0!==u){const d=u?.indexOf(".")>0?ti(e,u):e.hasOwnProperty(u)?e[u]:"";if(this[i]=d,"float"===this.editorParams[a].type){const h=this.getDecimalPlaces(a);null!==h&&(this[i]||0===this[i])&&void 0!==this[i]&&(this[i]=(+this[i]).toFixed(h))}this[r]&&(this[r].value=`${this[i]}`)}}reset(e,a=!0,u=!1){const i=e??this._originalLeftValue??"",r=e??this._originalRightValue??"";this._leftInput&&this._rightInput&&(this._originalLeftValue=i,this._originalRightValue=r,this._leftInput.value=`${i}`,this._rightInput.value=`${r}`),this._isLeftValueTouched=!1,this._isRightValueTouched=!1;const o=this.args.compositeEditorOptions;if(o&&a){const d=!u;this.handleChangeOnCompositeEditor(null,o,"user",d)}}save(){const e=this.validate(),a=e&&e.valid||!1;this._isValueSaveCalled||(this.hasAutoCommitEdit&&a?this.grid.getEditorLock().commitCurrentEdit():this.args.commitChanges(),this._isValueSaveCalled=!0)}serializeValue(){const e={},a=this.serializeValueByPosition("leftInput"),u=this.serializeValueByPosition("rightInput");return vr(e,this._leftFieldName,a),vr(e,this._rightFieldName,u),e}serializeValueByPosition(e){const a="leftInput"===e?this._leftInput.value:this._rightInput.value;if(""===a||isNaN(+a))return a;let u=parseFloat(a);const i=this.getDecimalPlaces(e);return null!==i&&(u||0===u)&&u.toFixed&&(u=parseFloat(u.toFixed(i))),u}getDecimalPlaces(e){const u="leftInput"===e?"leftInput":"rightInput",r=this.editorParams[u]?.decimal;return void 0===r?0:r}getInputDecimalSteps(e){const a=this.getDecimalPlaces(e);let u="";for(let i=1;i0?`0.${u}1`:"1"}validate(e,a){if(this.args.compositeEditorOptions&&this.applyInputUsabilityState(),this.disabled)return{valid:!0,msg:""};if(a){const u=this.validateByPosition(a.position,a.inputValue);if(!u.valid)return"leftInput"===a.position?this._leftInput.select():this._rightInput.select(),u}else{const u=this.validateByPosition("leftInput"),i=this.validateByPosition("rightInput");if(!u.valid)return this._leftInput.select(),u;if(!i.valid)return this._rightInput.select(),i}return{valid:!0,msg:""}}validateByPosition(e,a){const u=this.editorParams[e];let i="";if(a)i=a;else{const d="leftInput"===e?this._leftInput:this._rightInput;i=d&&d.value}const r=this.validator;i="function"==typeof r?this.getValues():i;const o={editorArgs:this.args,errorMessage:u.errorMessage,required:!this.args?.compositeEditorOptions&&u.required,validator:"function"==typeof r?r:u.validator};switch(u.type){case"float":return iU(i,{...o,decimal:this.getDecimalPlaces(e),minValue:u.minValue,maxValue:u.maxValue,operatorConditionalType:u.operatorConditionalType});case"integer":return nU(i,{...o,minValue:u.minValue,maxValue:u.maxValue,operatorConditionalType:u.operatorConditionalType});default:return L7(i,o)}}applyInputUsabilityState(){const e=this.grid.getActiveCell(),a=this.grid.onBeforeEditCell.notify({...e,item:this.dataContext,column:this.args.column,grid:this.grid,target:"composite",compositeEditorOptions:this.args.compositeEditorOptions}).getReturnValue();this.disable(!1===a)}handleChangeOnCompositeEditor(e,a,u="user",i=!1){const r=this.grid.getActiveCell(),o=this.args.column,d=this.columnEditor.params?.leftInput?.field??"",h=this.columnEditor.params?.rightInput?.field??"",m=this.dataContext,g=this.grid,v=this.serializeValue();this.validate().valid&&this.applyValue(this.dataContext,v),this.applyValue(a.formValues,v);const k=this.gridOptions?.compositeEditorOptions?.excludeDisabledFieldFormValues??!1;(i||this.disabled&&k&&a.formValues.hasOwnProperty(d))&&delete a.formValues[d],(i||this.disabled&&k&&a.formValues.hasOwnProperty(h))&&delete a.formValues[h],g.onCompositeEditorChange.notify({...r,item:m,grid:g,column:o,formValues:a.formValues,editors:a.editors,triggeredBy:u},new Wt(e))}handleChangeOnCompositeEditorDebounce(e){const a=this.args?.compositeEditorOptions;if(a){const u=this.gridOptions?.editorTypingDebounce??500;clearTimeout(this._timer),this._timer=setTimeout(()=>this.handleChangeOnCompositeEditor(e,a),u)}}},float:class Kme extends T7{constructor(e){super(e,"number"),this.args=e}loadValue(e){const a=this.columnDef&&this.columnDef.field;if(void 0!==a&&e&&void 0!==a&&this._input){const i=a?.indexOf(".")>0?ti(e,a):e[a];this._originalValue=i;const r=this.getDecimalPlaces();null!==r&&(this._originalValue||0===this._originalValue)&&void 0!==this._originalValue&&(this._originalValue=(+this._originalValue).toFixed(r)),this._input.value=`${this._originalValue}`,this._input.select()}}serializeValue(){const e=this._input?.value;if(void 0===e||""===e||isNaN(+e))return e;let a=parseFloat(e);const u=this.getDecimalPlaces();return null!==u&&(a||0===a)&&a.toFixed&&(a=parseFloat(a.toFixed(u))),a}validate(e,a){if(this.args.compositeEditorOptions&&this.applyInputUsabilityState(),this.disabled)return{valid:!0,msg:""};return iU(void 0!==a?a:this._input?.value,{editorArgs:this.args,errorMessage:this.columnEditor.errorMessage,decimal:this.getDecimalPlaces(),minValue:this.columnEditor.minValue,maxValue:this.columnEditor.maxValue,operatorConditionalType:this.columnEditor.operatorConditionalType,required:!this.args?.compositeEditorOptions&&this.columnEditor.required,validator:this.validator})}},integer:class Ume extends T7{constructor(e){super(e,"number"),this.args=e}loadValue(e){const a=this.columnDef?.field;if(void 0!==a&&e&&void 0!==a&&this._input){const i=a?.indexOf(".")>0?ti(e,a):e[a];this._originalValue=isNaN(i)||null==i?i:`${i}`,this._input.value=`${this._originalValue}`,this._input.select()}}serializeValue(){const e=this._input?.value;if(void 0===e||""===e||isNaN(+e))return e;const a=isNaN(+e)?e:parseInt(e,10);return isNaN(+a)?e:a}validate(e,a){if(this.args.compositeEditorOptions&&this.applyInputUsabilityState(),this.disabled)return{valid:!0,msg:""};return nU(void 0!==a?a:this.getValue(),{editorArgs:this.args,errorMessage:this.columnEditor.errorMessage,minValue:this.columnEditor.minValue,maxValue:this.columnEditor.maxValue,operatorConditionalType:this.columnEditor.operatorConditionalType,required:!this.args?.compositeEditorOptions&&this.columnEditor.required,validator:this.validator})}handleOnMouseWheel(e){this._isValueTouched=!0;const a=this.args.compositeEditorOptions;a&&this.handleChangeOnCompositeEditor(e,a)}},longText:class Jme{constructor(e){if(this.args=e,this._isValueTouched=!1,this.disabled=!1,!e)throw new Error("[Slickgrid-Universal] Something is wrong with this grid, an Editor must always have valid arguments.");this.grid=e.grid,this.gridOptions=e.grid?.getOptions();const a=this.gridOptions||this.args.column.params||{};a?.translater&&(this._translater=a.translater),this._locales=this.gridOptions?.locales||ue.locales,this._bindEventService=new Ni,this.init()}get columnDef(){return this.args.column}get columnEditor(){return this.columnDef?.editor??{}}get dataContext(){return this.args.item}get editorDomElement(){return this._textareaElm}get editorOptions(){return{...this.gridOptions.defaultEditorOptions?.longText,...this.columnEditor?.editorOptions}}get hasAutoCommitEdit(){return this.gridOptions?.autoCommitEdit??!1}get validator(){return this.columnEditor?.validator??this.columnDef?.validator}init(){let e="",a="";if(this._translater&&this._translater.translate&&this.gridOptions.enableTranslate){const g=Gl(this.gridOptions),v=this.editorOptions.buttonTexts?.cancelKey??`${g}CANCEL`,k=this.editorOptions.buttonTexts?.saveKey??`${g}SAVE`;e=this._translater.translate(`${g}${v}`),a=this._translater.translate(`${g}${k}`)}else e=this.editorOptions.buttonTexts?.cancel??this._locales?.TEXT_CANCEL??"Cancel",a=this.editorOptions.buttonTexts?.save??this._locales?.TEXT_SAVE??"Save";const u=this.args.compositeEditorOptions,i=this.columnDef?.id??"",r=this.columnEditor?.maxLength,o=this.editorOptions?.rows??4,d=u?this.args.container:document.body;this._wrapperElm=T("div",{className:`slick-large-editor-text editor-${i}`,style:{position:u?"relative":"absolute"}}),this.gridOptions?.darkMode&&this._wrapperElm.classList.add("slick-dark-mode"),d.appendChild(this._wrapperElm),this._textareaElm=T("textarea",{ariaLabel:this.columnEditor?.ariaLabel??`${Qs(i+"")} Text Editor`,cols:this.editorOptions?.cols??40,rows:u&&o>3?3:o,placeholder:this.columnEditor?.placeholder??"",title:this.columnEditor?.title??""},this._wrapperElm);const h=T("div",{className:"editor-footer"}),m=T("span",{className:"counter"});if(this._currentLengthElm=T("span",{className:"text-length",textContent:"0"}),m.appendChild(this._currentLengthElm),void 0!==r&&(m.appendChild(T("span",{className:"separator",textContent:"/"})),m.appendChild(T("span",{className:"max-length",textContent:`${r}`}))),h.appendChild(m),!u){const g=T("button",{className:"btn btn-cancel btn-default btn-xs",textContent:e},h),v=T("button",{className:"btn btn-save btn-primary btn-xs",textContent:a},h);this._bindEventService.bind(g,"click",this.cancel.bind(this)),this._bindEventService.bind(v,"click",this.save.bind(this)),this.position(this.args?.position),this._textareaElm.focus(),this._textareaElm.select()}this._wrapperElm.appendChild(h),this._bindEventService.bind(this._textareaElm,"keydown",this.handleKeyDown.bind(this)),this._bindEventService.bind(this._textareaElm,"input",this.handleOnInputChange.bind(this)),this._bindEventService.bind(this._textareaElm,"paste",this.handleOnInputChange.bind(this))}cancel(){const e=this._defaultTextValue||"";this._textareaElm.value=e,this._currentLengthElm.textContent=`${e.length}`,this.args?.cancelChanges&&this.args.cancelChanges()}hide(){this._wrapperElm.style.display="none"}show(){this.args?.compositeEditorOptions?this.applyInputUsabilityState():this._wrapperElm.style.display="block"}destroy(){this._bindEventService.unbindAll(),this._wrapperElm?.remove?.()}disable(e=!0){const a=this.disabled;if(this.disabled=e,this._textareaElm&&this._wrapperElm)if(e){this._textareaElm.disabled=!0,this._wrapperElm.classList.add("disabled");const u=this.getValue();a!==e&&this.args?.compositeEditorOptions&&""!==u&&this.reset("",!0,!0)}else this._textareaElm.disabled=!1,this._wrapperElm.classList.remove("disabled")}focus(){this.grid.focus(),this._textareaElm&&(this._textareaElm.focus(),this._textareaElm.select())}getValue(){return this._textareaElm.value}setValue(e,a=!1,u=!0){if(this._textareaElm.value=e,this._currentLengthElm.textContent=`${e.length}`,a){this.applyValue(this.args.item,this.serializeValue());const i=this.args.compositeEditorOptions;i&&u&&this.handleChangeOnCompositeEditor(null,i,"system")}}applyValue(e,a){const u=this.columnDef?.field;if(void 0!==u){const i=u?.indexOf(".")>0,o=this.validate(void 0,a)?.valid?a:"";if(i){vr(e,this.columnEditor?.complexObjectPath??u??"",o)}else e[u]=o}}isValueChanged(){const e=this._textareaElm.value;return!(""===e&&(null===this._defaultTextValue||void 0===this._defaultTextValue))&&e!==this._defaultTextValue}isValueTouched(){return this._isValueTouched}loadValue(e){const a=this.columnDef?.field;if(e&&void 0!==a){const i=a?.indexOf(".")>0?ti(e,a):e[a];this._defaultTextValue=i||"",this._textareaElm.value=this._defaultTextValue,this._currentLengthElm.textContent=this._defaultTextValue.length,this._textareaElm.defaultValue=this._defaultTextValue,this._textareaElm.select()}}position(e){const a=Lu(this.args.container),u=this.args.container.offsetHeight,i=this.args.container.offsetWidth,r=this._wrapperElm.getBoundingClientRect().height||this.args.position.height,o=this._wrapperElm.getBoundingClientRect().width||this.args.position.width,d=document.body.offsetHeight||window.innerHeight,h=document.body.offsetWidth||window.innerWidth;let m=this.args.container?a.top:e.top??0,g=this.args.container?a.left:e.left??0;const v=this.editorOptions?.position??"auto";if("left"===v||"auto"===v&&g+o>h){g-=o-i+(this.editorOptions?.marginRight??0)}("top"===v||"auto"===v&&m+r>d)&&(m-=r-u),this._wrapperElm.style.top=`${m}px`,this._wrapperElm.style.left=`${g}px`}reset(e,a=!0,u=!1){const i=e??this._defaultTextValue??"";this._textareaElm&&(this._defaultTextValue=i,this._textareaElm.value=i,this._currentLengthElm.textContent=i.length),this._isValueTouched=!1;const r=this.args.compositeEditorOptions;if(r&&a){const o=!u;this.handleChangeOnCompositeEditor(null,r,"user",o)}}save(){const a=this.validate()?.valid??!1;this.hasAutoCommitEdit&&a?this.grid.getEditorLock().commitCurrentEdit():this.args.commitChanges()}serializeValue(){return this._textareaElm.value}validate(e,a){if(this.args.compositeEditorOptions&&this.applyInputUsabilityState(),this.disabled)return{valid:!0,msg:""};return L7(void 0!==a?a:this._textareaElm?.value,{editorArgs:this.args,errorMessage:this.columnEditor.errorMessage,minLength:this.columnEditor.minLength,maxLength:this.columnEditor.maxLength,operatorConditionalType:this.columnEditor.operatorConditionalType,required:!this.args?.compositeEditorOptions&&this.columnEditor.required,validator:this.validator})}applyInputUsabilityState(){const e=this.grid.getActiveCell(),a=this.grid.onBeforeEditCell.notify({...e,item:this.dataContext,column:this.args.column,grid:this.grid,target:"composite",compositeEditorOptions:this.args.compositeEditorOptions}).getReturnValue();this.disable(!1===a)}handleKeyDown(e){const a=e.key;this._isValueTouched=!0,this.args.compositeEditorOptions||("Enter"===a&&e.ctrlKey||e.ctrlKey&&"S"===e.key.toUpperCase()?(e.preventDefault(),this.save()):"Escape"===a?(e.preventDefault(),this.cancel()):"Tab"===a&&e.shiftKey?(e.preventDefault(),this.args&&this.grid&&this.grid.navigatePrev()):"Tab"===a&&(e.preventDefault(),this.args&&this.grid&&this.grid.navigateNext()))}handleOnInputChange(e){const a=this.args.compositeEditorOptions,u=this.columnEditor?.maxLength;let i=!1;if(u&&(i=this.truncateText(this._textareaElm,u)),i)this._currentLengthElm.textContent=`${u}`;else{const r="paste"===e.type?e.clipboardData.getData("text"):e.target.value;this._currentLengthElm.textContent=`${r.length}`}if(a){const r=this.gridOptions?.editorTypingDebounce??500;clearTimeout(this._timer),this._timer=setTimeout(()=>this.handleChangeOnCompositeEditor(e,a),r)}}handleChangeOnCompositeEditor(e,a,u="user",i=!1){const r=this.grid.getActiveCell(),o=this.args.column,d=this.columnDef?.id??"",h=this.dataContext,m=this.grid,g=this.serializeValue();this.validate().valid&&this.applyValue(this.dataContext,g),this.applyValue(a.formValues,g);const v=this.gridOptions?.compositeEditorOptions?.excludeDisabledFieldFormValues??!1;(i||this.disabled&&v&&a.formValues.hasOwnProperty(d))&&delete a.formValues[d],m.onCompositeEditorChange.notify({...r,item:h,grid:m,column:o,formValues:a.formValues,editors:a.editors,triggeredBy:u},new Wt(e))}truncateText(e,a){const u=e.value+"";return u.length>a&&(e.value=u.substring(0,a),!0)}},multipleSelect:class Zme extends rU{constructor(e,a=0){super(e,!0,a),this.args=e,this.delayOpening=a}},password:class Wme extends T7{constructor(e){super(e,"password"),this.args=e}},singleSelect:class $me extends rU{constructor(e,a=0){super(e,!1,a),this.args=e,this.delayOpening=a}},slider:class qme{constructor(e){if(this.args=e,this._defaultValue=0,this._isValueTouched=!1,this._sliderNumberElm=null,this.disabled=!1,!e)throw new Error("[Slickgrid-Universal] Something is wrong with this grid, an Editor must always have valid arguments.");this.grid=e.grid,this.gridOptions=this.grid.getOptions()||{},this._bindEventService=new Ni,this.init()}get columnDef(){return this.args.column}get columnEditor(){return this.columnDef?.editor??{}}get dataContext(){return this.args.item}get editorDomElement(){return this._editorElm}get editorInputDomElement(){return this._inputElm}get editorOptions(){return{...this.gridOptions.defaultEditorOptions?.slider,...this.columnEditor?.editorOptions}}get hasAutoCommitEdit(){return this.gridOptions.autoCommitEdit??!1}get sliderOptions(){return this._sliderOptions}get validator(){return this.columnEditor.validator??this.columnDef?.validator}init(){if(this._cellContainerElm=this.args?.container,this._cellContainerElm&&this.columnDef){const e=this.args.compositeEditorOptions;this._editorElm=this.buildDomElement(),e||this.focus(),this._cellContainerElm.appendChild(this._editorElm),this._bindEventService.bind(this._sliderTrackElm,["click","mouseup"],this.sliderTrackClicked.bind(this)),this._bindEventService.bind(this._inputElm,["change","mouseup","touchend"],this.handleChangeEvent.bind(this)),this._bindEventService.bind(this._inputElm,["input","change"],this.handleChangeSliderNumber.bind(this))}}cancel(){this._inputElm&&(this._inputElm.value=`${this._originalValue}`),this.args.cancelChanges()}destroy(){this._bindEventService.unbindAll(),this._inputElm?.remove(),this._editorElm?.remove(),this._sliderTrackElm?.remove()}disable(e=!0){const a=this.disabled;if(this.disabled=e,this._inputElm)if(e){this._inputElm.disabled=!0;const u=this.getValue();a!==e&&this.args?.compositeEditorOptions&&""!==u&&this.reset(0,!0,!0)}else this._inputElm.disabled=!1}focus(){this.grid.focus(),this._inputElm?.focus()}show(){this.args?.compositeEditorOptions&&this.applyInputUsabilityState()}getValue(){return this._inputElm?.value??""}setValue(e,a=!1,u=!0){if(this._inputElm&&(this._inputElm.value=`${e}`),this._sliderNumberElm&&(this._sliderNumberElm.textContent=`${e}`),a){this.applyValue(this.args.item,this.serializeValue());const i=this.args.compositeEditorOptions;i&&u&&this.handleChangeOnCompositeEditor(null,i,"system")}}applyValue(e,a){const u=this.columnDef?.field??"";if(void 0!==u){const i=u?.indexOf(".")>0,r=this.validate(void 0,a),o=r&&r.valid?a:"";if(i){vr(e,this.columnEditor.complexObjectPath??u??"",o)}else e&&(e[u]=o)}}isValueChanged(){const e=this._inputElm?.value??"";return!(""===e&&void 0===this._originalValue)&&+e!==this._originalValue}isValueTouched(){return this._isValueTouched}loadValue(e){const a=this.columnDef?.field??"";if(e&&void 0!==a){let i=a?.indexOf(".")>0?ti(e,a):e.hasOwnProperty(a)?e[a]:this._defaultValue;(""===i||null==i)&&(i=this._defaultValue),this._originalValue=+i,this._inputElm&&(this._inputElm.value=`${i}`,this._inputElm.title=`${i}`),this._sliderNumberElm&&(this._sliderNumberElm.textContent=`${i}`)}this.updateTrackFilledColorWhenEnabled()}reset(e,a=!0,u=!1){const i=e??this._originalValue??0;this._inputElm&&(this._inputElm.value=`${i}`),this._sliderNumberElm&&(this._sliderNumberElm.textContent=`${i}`),this._isValueTouched=!1;const r=this.args.compositeEditorOptions;if(r&&a){const o=!u;this.handleChangeOnCompositeEditor(null,r,"user",o)}}save(){const e=this.validate(),a=e&&e.valid||!1;this.hasAutoCommitEdit&&a?this.grid.getEditorLock().commitCurrentEdit():this.args.commitChanges()}serializeValue(){const e=this._inputElm?.value??"";return""!==e?parseInt(e,10):this._originalValue}validate(e,a){if(this.args.compositeEditorOptions&&this.applyInputUsabilityState(),this.disabled)return{valid:!0,msg:""};return function Ome(t,e){const a=e.required,u=e.minValue,i=e.maxValue,r=e.errorMessage,o={"{{minValue}}":u,"{{maxValue}}":i};return e.validator?e.validator(t,e.editorArgs):a&&""===t?{valid:!1,msg:r||ue.VALIDATION_REQUIRED_FIELD}:void 0!==u&&void 0!==i&&null!==t&&(ti)?{valid:!1,msg:r||ue.VALIDATION_EDITOR_NUMBER_BETWEEN.replace(/{{minValue}}|{{maxValue}}/gi,d=>o[d])}:{valid:!0,msg:null}}(void 0!==a?a:this._inputElm?.value,{editorArgs:this.args,errorMessage:this.columnEditor.errorMessage,minValue:this.columnEditor.minValue,maxValue:this.columnEditor.maxValue,required:!this.args?.compositeEditorOptions&&this.columnEditor.required,validator:this.validator})}buildDomElement(){const e=this.columnDef?.id??"",a=this.columnEditor.title??"",u=+(this.columnEditor.minValue??ue.SLIDER_DEFAULT_MIN_VALUE),i=+(this.columnEditor.maxValue??ue.SLIDER_DEFAULT_MAX_VALUE),r=+(this.columnEditor.valueStep??ue.SLIDER_DEFAULT_STEP),o=this.editorOptions.sliderStartValue??u;this._defaultValue=+o,this._sliderTrackElm=T("div",{className:"slider-track"}),this._inputElm=T("input",{type:"range",title:a,defaultValue:`${o}`,value:`${o}`,min:`${u}`,max:`${i}`,step:`${this.columnEditor.valueStep??ue.SLIDER_DEFAULT_STEP}`,ariaLabel:this.columnEditor.ariaLabel??`${Qs(e+"")} Slider Editor`,className:`slider-editor-input editor-${e}`});const d=T("div",{className:"slider-container slider-editor"}),h=T("div",{className:"slider-input-container slider-editor"});if(h.appendChild(this._sliderTrackElm),h.appendChild(this._inputElm),d.appendChild(h),!this.editorOptions.hideSliderNumber){d.classList.add("input-group");const m=T("div",{className:"input-group-addon input-group-append slider-value"});this._sliderNumberElm=T("span",{className:"input-group-text",textContent:`${o}`}),m.appendChild(this._sliderNumberElm),d.appendChild(m)}return this._sliderOptions={minValue:u,maxValue:i,step:r},d}applyInputUsabilityState(){const e=this.grid.getActiveCell(),a=this.grid.onBeforeEditCell.notify({...e,item:this.dataContext,column:this.args.column,grid:this.grid,target:"composite",compositeEditorOptions:this.args.compositeEditorOptions}).getReturnValue();this.disable(!1===a)}handleChangeEvent(e){this._isValueTouched=!0;const a=this.args.compositeEditorOptions;a?this.handleChangeOnCompositeEditor(e,a):this.save()}handleChangeSliderNumber(e){const a=e.target?.value??"";""!==a&&(!this.editorOptions.hideSliderNumber&&this._sliderNumberElm&&(this._sliderNumberElm.textContent=a),this._inputElm.title=a,this.args?.compositeEditorOptions||this.grid.onMouseEnter.notify({column:this.columnDef,grid:this.grid},new Wt(e))),this.updateTrackFilledColorWhenEnabled()}handleChangeOnCompositeEditor(e,a,u="user",i=!1){const r=this.grid.getActiveCell(),o=this.args.column,d=this.columnDef?.id??"",h=this.dataContext,m=this.grid,g=this.serializeValue();this.validate().valid&&this.applyValue(this.dataContext,g),this.applyValue(a.formValues,g);const v=this.gridOptions?.compositeEditorOptions?.excludeDisabledFieldFormValues??!1;(i||this.disabled&&v&&a.formValues.hasOwnProperty(d))&&delete a.formValues[d],m.onCompositeEditorChange.notify({...r,item:h,grid:m,column:o,formValues:a.formValues,editors:a.editors,triggeredBy:u},new Wt(e))}sliderTrackClicked(e){e.preventDefault();const i=100*(e.offsetX+0)/this._sliderTrackElm.offsetWidth;this._inputElm&&(this._inputElm.value=`${i}`,this._inputElm.dispatchEvent(new Event("change")))}updateTrackFilledColorWhenEnabled(){if(this.editorOptions.enableSliderTrackColoring&&this._inputElm){const a=(+this.getValue()-+this._inputElm.min)/(this.sliderOptions?.maxValue??0-+this._inputElm.min)*100,u="linear-gradient(to right, %b %p1, %c %p1, %c %p2, %b %p2)".replace(/%b/g,"#eee").replace(/%c/g,this.editorOptions?.sliderTrackFilledColor??"var(--slick-slider-filter-thumb-color, #86bff8)").replace(/%p1/g,"0%").replace(/%p2/g,`${a}%`);this._sliderTrackElm.style.background=u,this._sliderOptions.sliderTrackBackground=u}}},text:T7},P7=(t,e,a)=>{if(Array.isArray(a)&&a.length>0){const u=a.join(", ");return T("span",{title:u,textContent:u})}return a},oU=(t,e,a,u,i)=>{if(!u)return"";const r=u.params||{},o=r?.complexField??r?.complexFieldLabel??u.field;if(!o)throw new Error("For the Formatters.complexObject to work properly, you need to tell it which property of the complex object to use.\n There are 3 ways to provide it:\n 1- via the generic \"params\" with a \"complexField\" property on your Column Definition, example: this.columnDefs = [{ id: 'user', field: 'user', params: { complexField: 'user.firstName' } }]\n 2- via the generic \"params\" with a \"complexField\" and a \"labelKey\" property on your Column Definition, example: this.columnDefs = [{ id: 'user', field: 'user', labelKey: 'firstName', params: { complexField: 'user' } }]\n 3- via the field name that includes a dot notation, example: this.columnDefs = [{ id: 'user', field: 'user.firstName'}] ");if(u.labelKey&&i.hasOwnProperty(o))return i[o]?.[u.labelKey];if("string"==typeof o&&o.indexOf(".")>0){let d=o.split(".").reduce((h,m)=>h?.hasOwnProperty(m)?h[m]:"",i);return(null==d||"object"==typeof d&&0===Object.entries(d).length&&!(d instanceof Date))&&(d=""),d}return a},j={arrayObjectToCsv:(t,e,a,u,i)=>{const r=u&&u.params||{},o=r.propertyNames,d=r?.includeTitle??!0;let h=r.dataContextProperty;if(h||(h=u?.field?.split(".")[0]||""),!o||!Array.isArray(o)||!h)throw new Error('Formatters.arrayObjectToCsv requires you to pass an array of "propertyNames" (declared in "params") that you want to pull the data from.\n For example, if we have an array of user objects that have the property of firstName & lastName then we need to pass in your column definition:: { params: { propertyNames: [\'firtName\'] }}.\n Optionally, you can also pass the "dataContextProperty" if you wish to run this on another completely different field of the dataContext object.');if(i[h]&&Array.isArray(i[h])&&Array.isArray(i[h])&&i[h].length>0){const m=[];i[h].forEach(k=>{const x=[];o.forEach(D=>{x.push(k[D])}),m.push(x.join(" "))});const g=m.join(", "),v=T("span",{textContent:g});return d&&(v.title=g),v}return a},arrayToCsv:P7,checkmarkMaterial:(t,e,a)=>{let u=!1;const i=Ma(a);return i&&(a=+a),(!0===a||i&&+a>0||"string"==typeof a&&a.length>0&&"false"!==a.toLowerCase()&&"0"!==a)&&(u=!0),u?T("i",{className:"mdi mdi-18px mdi-check checkmark-icon",ariaHidden:"true"}):""},complex:oU,complexObject:oU,collection:(t,e,a,u,i,r)=>{if(!(a&&u&&u.params&&u.params.collection&&u.params.collection.length))return a;const{params:o,params:{collection:d}}=u,h=o.customStructure?o.customStructure.label:"label",m=o.customStructure?o.customStructure.value:"value";return Array.isArray(a)?P7(0,0,a.map(g=>zc(d,v=>v[m]===g)[h])):zc(d,g=>g[m]===a)[h]||""},collectionEditor:(t,e,a,u,i,r)=>{if(!(a&&u&&u.editor&&u.editor.collection&&u.editor.collection.length))return a;const{editor:o,editor:{collection:d}}=u,h=o.customStructure?o.customStructure.label:"label",m=o.customStructure?o.customStructure.value:"value";return Array.isArray(a)?d.every(g=>"string"==typeof g)?P7(0,0,a.map(g=>zc(d,v=>v===g))):P7(0,0,a.map(g=>zc(d,v=>v[m]===g)[h])):zc(d,g=>g[m]===a)[h]||""},currency:(t,e,a,u,i,r)=>{const{currencyPrefix:o,currencySuffix:d,minDecimal:h,maxDecimal:m,numberPrefix:g,numberSuffix:v,decimalSeparator:k,thousandSeparator:x,wrapNegativeNumber:D}=ju(u,r,"decimal","cell");if(Ma(a)){return`${g}${Mu(a,h,m,D,o,d,k,x)}${v}`}return a},dateIso:Gu(w.dateIso,"-"),dateTimeIso:Gu(w.dateTimeIso,"-"),dateTimeShortIso:Gu(w.dateTimeShortIso,"-"),dateTimeIsoAmPm:Gu(w.dateTimeIsoAmPm,"-"),dateTimeIsoAM_PM:Gu(w.dateTimeIsoAM_PM,"-"),dateEuro:Gu(w.dateEuro,"/"),dateEuroShort:Gu(w.dateEuroShort,"/"),dateTimeEuro:Gu(w.dateTimeEuro,"/"),dateTimeEuroShort:Gu(w.dateTimeEuroShort,"/"),dateTimeShortEuro:Gu(w.dateTimeShortEuro,"/"),dateTimeEuroAmPm:Gu(w.dateTimeEuroAmPm,"/"),dateTimeEuroAM_PM:Gu(w.dateTimeEuroAM_PM,"/"),dateTimeEuroShortAmPm:Gu(w.dateTimeEuroShortAmPm,"/"),dateTimeEuroShortAM_PM:Gu(w.dateTimeEuroShortAM_PM,"/"),dateUs:Gu(w.dateUs,"/"),dateTimeUs:Gu(w.dateTimeUs,"/"),dateTimeShortUs:Gu(w.dateTimeShortUs,"/"),dateTimeUsAmPm:Gu(w.dateTimeUsAmPm,"/"),dateTimeUsAM_PM:Gu(w.dateTimeUsAM_PM,"/"),dateTimeUsShort:Gu(w.dateTimeUsShort,"/"),dateTimeUsShortAmPm:Gu(w.dateTimeUsShortAmPm,"/"),dateTimeUsShortAM_PM:Gu(w.dateTimeUsShortAM_PM,"/"),dateUsShort:Gu(w.dateUsShort,"/"),dateUtc:Gu(w.dateUtc,"-"),decimal:(t,e,a,u,i,r)=>{const{minDecimal:o,maxDecimal:d,numberPrefix:h,numberSuffix:m,decimalSeparator:g,thousandSeparator:v,wrapNegativeNumber:k}=ju(u,r,"decimal","cell");return Ma(a)?Mu(a,o,d,k,h,m,g,v):a},dollar:(t,e,a,u,i,r)=>{const{minDecimal:o,maxDecimal:d,decimalSeparator:h,thousandSeparator:m,wrapNegativeNumber:g}=ju(u,r,"currency","cell");return Ma(a)?Mu(a,o,d,g,"$","",h,m):a},dollarColored:(t,e,a,u,i,r)=>{const{minDecimal:o,maxDecimal:d,decimalSeparator:h,thousandSeparator:m,wrapNegativeNumber:g}=ju(u,r,"currency","cell");if(Ma(a)){const v=a>=0?"green":"red",x=T("span",{ariaHidden:"true",textContent:Mu(a,o,d,g,"$","",h,m)});return x.style.color=v,x}return a},dollarColoredBold:(t,e,a,u,i,r)=>{const{minDecimal:o,maxDecimal:d,decimalSeparator:h,thousandSeparator:m,wrapNegativeNumber:g}=ju(u,r,"currency","cell");if(Ma(a)){const v=a>=0?"green":"red",x=T("span",{ariaHidden:"true",textContent:Mu(a,o,d,g,"$","",h,m)});return x.style.color=v,x.style.fontWeight="bold",x}return a},hyperlink:(t,e,a,u,i,r)=>{const o=u&&u.params||{};let d=o.hyperlinkText?o.hyperlinkText:a;d=r.sanitizeHtmlString(d);let h=o.hyperlinkUrl?o.hyperlinkUrl:a;h=r.sanitizeHtmlString(h);const m=h.match(/^(http|ftp|https):\/\/[\w\-_]+(\.[\w\-_]+)+([\w\-.,@?^=%&:/~+#]*[\w\-@?^=%&/~+#])?/i);if(m&&Array.isArray(m)&&m.length>0){return T("a",{href:m[0],textContent:d})}return a},icon:(t,e,a,u)=>{const i=u?.params??{},r=i.iconCssClass||i.icon||i.formatterIcon;if(!r)throw new Error('[Slickgrid-Universal] When using `Formatters.icon`, you must provide the "iconCssClass" via the generic "params". (e.g.: `{ formatter: Formatters.icon, params: { iconCssClass: "mdi mdi-magnify" }}`');return T("i",{className:r,ariaHidden:"true",title:i.title||null})},iconBoolean:(t,e,a,u)=>{const r=(u?.params||{}).cssClass;if(!r)throw new Error('[Slickgrid-Universal] When using `Formatters.iconBoolean`, you must provide You must provide the "cssClass", e.g.: { formatter: Formatters.iconBoolean, params: { cssClass: "mdi mdi-check" }}');let o=!1;const d=!isNaN(a);return(!0===a||d&&parseFloat(a)>0||!d&&"string"==typeof a&&"false"!==a.toLowerCase()&&"0"!==a)&&(o=!0),o?T("i",{className:r,ariaHidden:"true"}):""},mask:(t,e,a,u,i,r)=>{const d=(u.params||{}).mask;if(!d)throw new Error('You must provide a "mask" via the generic "params" options (e.g.: { formatter: Formatters.mask, params: { mask: \'000-000\' }}');if(a){let h=0;const m=a.toString(),v=(r.getOptions()||{})?.preventDocumentFragmentUsage?document.createElement("span"):new DocumentFragment;return v.textContent=d.replace(/[09A]/gi,()=>m[h++]||""),v}return a},multiple:y7,percent:(t,e,a,u,i,r)=>{const{minDecimal:o,maxDecimal:d,decimalSeparator:h,thousandSeparator:m,wrapNegativeNumber:g}=ju(u,r,"percent","cell");if(Ma(a)){return Mu(100*a,o,d,g,"","%",h,m)}return a},percentComplete:(t,e,a,u,i,r)=>{const{minDecimal:o,maxDecimal:d,decimalSeparator:h,thousandSeparator:m,wrapNegativeNumber:g}=ju(u,r,"percent","cell");if(Ma(a)){const v=a<50?"red":"green",k=Mu(a,o,d,g,"","%",h,m);return T("span",{textContent:a>100?"100%":k,style:{color:v}})}return a},percentCompleteBar:(t,e,a)=>{if(!Ma(a))return"";let u="",i=parseFloat(a);return i>100&&(i=100),u=i<30?"red":i<70?"silver":"green",T("span",{className:"percent-complete-bar",title:`${i}%`,style:{background:u,width:`${i}%`}})},percentCompleteBarWithText:(t,e,a)=>{if(!Ma(a))return"";let u="",i=parseFloat(a);return i>100&&(i=100),u=i<30?"red":i<70?"silver":"green",T("div",{className:"percent-complete-bar-with-text",title:`${i}%`,textContent:`${i}%`,style:{background:u,width:`${i}%`}})},percentSymbol:(t,e,a,u,i,r)=>{const{minDecimal:o,maxDecimal:d,decimalSeparator:h,thousandSeparator:m,wrapNegativeNumber:g}=ju(u,r,"percent","cell");return Ma(a)?Mu(a,o,d,g,"","%",h,m):a},progressBar:(t,e,a)=>{if(!Ma(a))return"";let u="",i=parseFloat(a);i>100&&(i=100),u=i<30?"danger":i<70?"warning":"success";const r=T("div",{className:"progress"});return r.appendChild(T("div",{className:`progress-bar progress-bar-${u} bg-${u}`,role:"progressbar",ariaValueNow:String(i),ariaValueMin:"0",ariaValueMax:"100",textContent:`${i}%`,style:{minWidth:"2em",width:`${i}%`}})),r},translate:(t,e,a,u,i,r)=>{const d=(r?.getOptions()??{}).translater||u&&u.params&&u.params.translater;if(!d||"function"!=typeof d.translate)throw new Error('"Formatters.translate" requires the Translate Service to be provided as a Grid Options "translater" (or "i18n" depending on which framework you use).\n For example: this.gridOptions = { enableTranslate: true, translater: this.translateService }');return null!=a&&"string"!=typeof a&&(a+=""),a?d.translate(a):""},translateBoolean:(t,e,a,u,i,r)=>{const d=(r?.getOptions()??{}).translater||u&&u.params&&u.params.translater;if(!d||"function"!=typeof d.translate)throw new Error('"Formatters.translateBoolean" requires the Translate Service to be provided as a Grid Options "translater" (or "i18n" depending on which framework you use).\n For example: this.gridOptions = { enableTranslate: true, translater: this.translateService }');return null!=a&&"string"!=typeof a&&(a+=""),a?d.translate(a.toUpperCase()):""},tree:(t,e,a,u,i,r)=>{const o=r.getOptions(),d=o?.treeDataOptions,h=d?.indentMarginLeft??15,m=d?.collapsedPropName??ue.treeDataProperties.COLLAPSED_PROP,g=d?.hasChildrenPropName??ue.treeDataProperties.HAS_CHILDREN_PROP,v=d?.levelPropName??ue.treeDataProperties.TREE_LEVEL_PROP;let k=a;if(k=N2(u,i,a),null==k||void 0===i)return"";if(!i.hasOwnProperty(v))throw new Error('[Slickgrid-Universal] You must provide valid "treeDataOptions" in your Grid Options, however it seems that we could not find any tree level info on the current item datacontext row.');const x=i?.[v]??0,D=document.createElement("span");D.style.display="inline-block",D.style.width=h*x+"px";const C=`slick-tree-level-${x}`;let F="";i[g]&&(F=i?.[m]?"collapsed":"expanded"),d?.titleFormatter&&(k=_7(d.titleFormatter,t,e,u,i,r));const z=T("div",{className:`slick-group-toggle ${F}`.trim(),ariaExpanded:String("expanded"===F)}),M=T("span",{className:"slick-tree-title"});r.applyHtmlCode(M,k),M.setAttribute("level",x);const L=o?.preventDocumentFragmentUsage?document.createElement("span"):new DocumentFragment;return L.appendChild(D),L.appendChild(z),L.appendChild(M),{addClasses:C,html:L}},treeParseTotals:(t,e,a,u,i,r)=>{const d=r.getOptions()?.treeDataOptions?.hasChildrenPropName??ue.treeDataProperties.HAS_CHILDREN_PROP,{groupTotalsFormatter:h,treeTotalsFormatter:m,params:g}=u;if(!h&&!m)throw new Error('[Slickgrid-Universal] When using Formatters.treeParseTotals, you must provide a total formatter via "groupTotalsFormatter" or "treeTotalsFormatter".');if(i[d]&&i?.__treeTotals&&(h||m))return(m??h)(i?.__treeTotals,u,r);if(g.formatters){let v=a;for(const k of g.formatters)!i[d]&&!i?.__treeTotals&&"function"==typeof k&&(v=k(t,e,v,u,i,r)||a);return v}return a},treeExport:(t,e,a,u,i,r)=>{const o=r.getOptions(),d=o?.treeDataOptions,h=d?.collapsedPropName??ue.treeDataProperties.COLLAPSED_PROP,m=d?.hasChildrenPropName??ue.treeDataProperties.HAS_CHILDREN_PROP,g=d?.levelPropName??ue.treeDataProperties.TREE_LEVEL_PROP,v=d?.exportIndentMarginLeft??5,k=d?.exportIndentationLeadingChar??".",x=d?.exportIndentationLeadingSpaceCount??3,D=o?.excelExportOptions?.groupCollapsedSymbol??"\u2b9e",C=o?.excelExportOptions?.groupExpandedSymbol??"\u2b9f";let F=a;if(F=N2(u,i,a),null==F||void 0===i)return"";if(!i.hasOwnProperty(g))throw new Error('[Slickgrid-Universal] You must provide valid "treeDataOptions" in your Grid Options, however it seems that we could not find any tree level info on the current item datacontext row.');const A=i?.[g]??0;let z="",M=0;i[m]?(z=i?.[h]?D:C,M=0===A?0:v*A):M=v*(0===A?0:A+1);const L=kv(M);return d?.titleFormatter&&(F=_7(d.titleFormatter,t,e,u,i,r)),F=`${0===A&&z?"":0===A?`${k}${kv(x)}`:k}${L}${z} ${F}`,Tu(F)}},Wa={avgTotals:(t,e,a)=>{const u=e.field??"";let i=t.avg?.[u];const r=e?.params;let o=r?.groupFormatterPrefix||"";const d=r?.groupFormatterSuffix||"",{minDecimal:h,maxDecimal:m,decimalSeparator:g,thousandSeparator:v,wrapNegativeNumber:k}=ju(e,a,"regular","group");if(Ma(i)){if(i<0){if(i=Math.abs(i),k){if(isNaN(h)&&isNaN(m)){return`${o}(${Sc(Math.round(i),v)})${d}`}return`${o}(${I0(i,h,m,g,v)})${d}`}o+="-"}if(isNaN(h)&&isNaN(m)){return`${o}${Sc(Math.round(i),v)}${d}`}return`${o}${I0(i,h,m,g,v)}${d}`}return""},avgTotalsCurrency:(t,e,a)=>{const u=e.field??"",i=t.avg?.[u],r=e?.params,o=r?.groupFormatterPrefix||"",d=r?.groupFormatterSuffix||"",h=r?.groupFormatterCurrencyPrefix||"",m=r?.groupFormatterCurrencySuffix||"",{minDecimal:g,maxDecimal:v,decimalSeparator:k,thousandSeparator:x,wrapNegativeNumber:D}=ju(e,a,"currency","group");if(Ma(i)){return`${o}${Mu(i,g,v,D,h,m,k,x)}${d}`}return""},avgTotalsDollar:(t,e,a)=>{const u=e.field??"",i=t.avg?.[u],r=e?.params,o=r?.groupFormatterPrefix||"",d=r?.groupFormatterSuffix||"",{minDecimal:h,maxDecimal:m,decimalSeparator:g,thousandSeparator:v,wrapNegativeNumber:k}=ju(e,a,"currency","group");if(Ma(i)){return`${o}${Mu(i,h,m,k,"$","",g,v)}${d}`}return""},avgTotalsPercentage:(t,e,a)=>{const u=e.field??"";let i=t.avg?.[u];const r=e?.params;let o=r?.groupFormatterPrefix||"";const d=r?.groupFormatterSuffix||"",{minDecimal:h,maxDecimal:m,decimalSeparator:g,thousandSeparator:v,wrapNegativeNumber:k}=ju(e,a,"percent","group");if(Ma(i)){if(i<0){if(i=Math.abs(i),k){if(isNaN(h)&&isNaN(m)){return`${o}(${Sc(Math.round(i),v)}%)${d}`}return`${o}(${I0(i,h,m,g,v)}%)${d}`}o+="-"}if(isNaN(h)&&isNaN(m)){return`${o}${Sc(Math.round(i),v)}%${d}`}return`${o}${I0(i,h,m,g,v)}%${d}`}return""},maxTotals:(t,e,a)=>{const u=e.field??"",i=t.max?.[u],r=e?.params,o=r?.groupFormatterPrefix||"",d=r?.groupFormatterSuffix||"",{minDecimal:h,maxDecimal:m,decimalSeparator:g,thousandSeparator:v,wrapNegativeNumber:k}=ju(e,a,"regular","group");if(Ma(i)){return`${o}${Mu(i,h,m,k,"","",g,v)}${d}`}return""},minTotals:(t,e,a)=>{const u=e.field??"",i=t.min?.[u],r=e?.params,o=r?.groupFormatterPrefix||"",d=r?.groupFormatterSuffix||"",{minDecimal:h,maxDecimal:m,decimalSeparator:g,thousandSeparator:v,wrapNegativeNumber:k}=ju(e,a,"regular","group");if(Ma(i)){return`${o}${Mu(i,h,m,k,"","",g,v)}${d}`}return""},sumTotals:(t,e,a)=>{const u=e.field??"",i=t.sum?.[u],r=e?.params,o=r?.groupFormatterPrefix||"",d=r?.groupFormatterSuffix||"",{minDecimal:h,maxDecimal:m,decimalSeparator:g,thousandSeparator:v,wrapNegativeNumber:k}=ju(e,a,"regular","group");if(Ma(i)){return`${o}${Mu(i,h,m,k,"","",g,v)}${d}`}return""},sumTotalsBold:(t,e,a)=>{const u=e.field??"",i=t.sum?.[u],r=e?.params,o=r?.groupFormatterPrefix||"",d=r?.groupFormatterSuffix||"",{minDecimal:h,maxDecimal:m,decimalSeparator:g,thousandSeparator:v,wrapNegativeNumber:k}=ju(e,a,"regular","group");if(Ma(i)){return T("span",{style:{fontWeight:"bold"},textContent:`${o}${Mu(i,h,m,k,"","",g,v)}${d}`})}return""},sumTotalsColored:(t,e,a)=>{const u=e.field??"",i=t.sum?.[u],r=e?.params,o=r?.groupFormatterPrefix||"",d=r?.groupFormatterSuffix||"",{minDecimal:h,maxDecimal:m,decimalSeparator:g,thousandSeparator:v,wrapNegativeNumber:k}=ju(e,a,"regular","group");if(Ma(i)){return T("span",{style:{color:i>=0?"green":"red"},textContent:`${o}${Mu(i,h,m,k,"","",g,v)}${d}`})}return""},sumTotalsCurrency:(t,e,a)=>{const u=e.field??"",i=t.sum?.[u],r=e?.params,o=r?.groupFormatterPrefix||"",d=r?.groupFormatterSuffix||"",h=r?.groupFormatterCurrencyPrefix||"",m=r?.groupFormatterCurrencySuffix||"",{minDecimal:g,maxDecimal:v,decimalSeparator:k,thousandSeparator:x,wrapNegativeNumber:D}=ju(e,a,"currency","group");if(Ma(i)){return`${o}${Mu(i,g,v,D,h,m,k,x)}${d}`}return""},sumTotalsCurrencyColored:(t,e,a)=>{const u=e.field??"",i=t.sum?.[u],r=e?.params,o=r?.groupFormatterPrefix||"",d=r?.groupFormatterSuffix||"",h=r?.groupFormatterCurrencyPrefix||"",m=r?.groupFormatterCurrencySuffix||"",{minDecimal:g,maxDecimal:v,decimalSeparator:k,thousandSeparator:x,wrapNegativeNumber:D}=ju(e,a,"currency","group");if(Ma(i)){return T("span",{style:{color:i>=0?"green":"red"},textContent:`${o}${Mu(i,g,v,D,h,m,k,x)}${d}`})}return""},sumTotalsDollar:(t,e,a)=>{const u=e.field??"",i=t.sum?.[u],r=e?.params,o=r?.groupFormatterPrefix||"",d=r?.groupFormatterSuffix||"",{minDecimal:h,maxDecimal:m,decimalSeparator:g,thousandSeparator:v,wrapNegativeNumber:k}=ju(e,a,"currency","group");if(Ma(i)){return`${o}${Mu(i,h,m,k,"$","",g,v)}${d}`}return""},sumTotalsDollarBold:(t,e,a)=>{const u=e.field??"",i=t.sum?.[u],r=e?.params,o=r?.groupFormatterPrefix||"",d=r?.groupFormatterSuffix||"",{minDecimal:h,maxDecimal:m,decimalSeparator:g,thousandSeparator:v,wrapNegativeNumber:k}=ju(e,a,"currency","group");if(Ma(i)){return T("span",{style:{fontWeight:"bold"},textContent:`${o}${Mu(i,h,m,k,"$","",g,v)}${d}`})}return""},sumTotalsDollarColored:(t,e,a)=>{const u=e.field??"",i=t.sum?.[u],r=e?.params,o=r?.groupFormatterPrefix||"",d=r?.groupFormatterSuffix||"",{minDecimal:h,maxDecimal:m,decimalSeparator:g,thousandSeparator:v,wrapNegativeNumber:k}=ju(e,a,"currency","group");if(Ma(i)){return T("span",{style:{color:i>=0?"green":"red"},textContent:`${o}${Mu(i,h,m,k,"$","",g,v)}${d}`})}return""},sumTotalsDollarColoredBold:(t,e,a)=>{const u=e.field??"",i=t.sum?.[u],r=e?.params,o=r?.groupFormatterPrefix||"",d=r?.groupFormatterSuffix||"",{minDecimal:h,maxDecimal:m,decimalSeparator:g,thousandSeparator:v,wrapNegativeNumber:k}=ju(e,a,"currency","group");if(Ma(i)){return T("span",{style:{color:i>=0?"green":"red",fontWeight:"bold"},textContent:`${o}${Mu(i,h,m,k,"$","",g,v)}${d}`})}return""}};class f4e{constructor(){this.options=Bme}}let ol=class{constructor(e){this.vcr=e}createInteractiveAngularComponent(e,a,u,i){const r=this.vcr.createComponent(e,i);r?.instance&&u&&Object.assign(r.instance,u);let o=null;const d=r.hostView;return d&&Array.isArray(d.rootNodes)&&d.rootNodes[0]&&(o=d.rootNodes[0],a&&o&&a.replaceChildren(r.location.nativeElement)),{componentRef:r,domElement:o}}createAngularComponent(e,a,u,i){const r=this.vcr.createComponent(e,i);r?.instance&&u&&(Object.assign(r.instance,u),r.changeDetectorRef.detectChanges());let o=null;const d=r.hostView;return d&&Array.isArray(d.rootNodes)&&d.rootNodes[0]&&(o=d.rootNodes[0],a&&o&&(a.innerHTML=o.innerHTML)),{componentRef:r,domElement:o}}createAngularComponentAppendToDom(e,a,u,i){const r=this.createAngularComponent(e,a,u,i);return a?.replaceChildren?a.replaceChildren(r.domElement):document.body.appendChild(r.domElement),r}static#e=this.ctorParameters=()=>[{type:sr}]};ol=Ze([P3(),Ct("design:paramtypes",[sr])],ol);let mf=class{constructor(){this.dependencies=[]}get(e){const a=this.dependencies.find(u=>u.key===e);return a?.instance?a.instance:null}dispose(){this.dependencies=[]}registerInstance(e,a){this.dependencies.some(i=>i.key===e)||this.dependencies.push({key:e,instance:a})}};mf=Ze([P3()],mf);let pf=class{constructor(e){this.translateService=e}getCurrentLanguage(){return this.translateService?.currentLang??""}use(e){var a=this;return Su(function*(){return a.translateService?.use?.(e)})()}translate(e){return this.translateService?.instant?.(e||" ")}static#e=this.ctorParameters=()=>[{type:at,decorators:[{type:is}]}]};function rd(t){if(Array.isArray(t)){let e=t.pop();for(;e;)"function"==typeof e.unsubscribe&&e.unsubscribe(),e=t.pop()}return t}pf=Ze([P3(),Ct("design:paramtypes",[at])],pf);class D4e{constructor(e){this.pubSubService=e,this.pluginName="RowDetailView",this._dataViewIdProperty="id",this._expandableOverride=null,this._expandedRows=[],this._gridRowBuffer=0,this._gridUid="",this._keyPrefix="",this._lastRange=null,this._outsideRange=5,this._rowIdsOutOfViewport=[],this._visibleRenderedCellCount=0,this._defaults={alwaysRenderColumn:!0,columnId:"_detail_selector",field:"_detail_selector",cssClass:"detailView-toggle",collapseAllOnSort:!0,collapsedClass:void 0,expandedClass:void 0,keyPrefix:"_",loadOnce:!1,maxRows:void 0,reorderable:!1,saveDetailViewOnScroll:!0,singleRowExpand:!1,useSimpleViewportCalc:!1,toolTip:"",width:30},this._eventHandler=new Ut,this.onAsyncEndUpdate=new be("onAsyncEndUpdate"),this.onAsyncResponse=new be("onAsyncResponse"),this.onAfterRowDetailToggle=new be("onAfterRowDetailToggle"),this.onBeforeRowDetailToggle=new be("onBeforeRowDetailToggle"),this.onRowBackToViewportRange=new be("onRowBackToViewportRange"),this.onRowOutOfViewportRange=new be("onRowOutOfViewportRange")}get addonOptions(){return this._addonOptions}get dataView(){return this._grid?.getData()}get dataViewIdProperty(){return this._dataViewIdProperty}get eventHandler(){return this._eventHandler}get gridOptions(){return this._grid?.getOptions()||{}}get gridUid(){return this._gridUid||this._grid?.getUID()||""}set lastRange(e){this._lastRange=e}set rowIdsOutOfViewport(e){this._rowIdsOutOfViewport=e}get visibleRenderedCellCount(){return this._visibleRenderedCellCount}init(e){if(this._grid=e,!e)throw new Error('[Slickgrid-Universal] RowDetailView Plugin requires the Grid instance to be passed as argument to the "init()" method.');this._grid=e,this._gridUid=e.getUID(),this._addonOptions||(this._addonOptions=cu(!0,{},this._defaults,this.gridOptions.rowDetailView)),this._keyPrefix=this._addonOptions?.keyPrefix||"_",W.addSlickEventPubSubWhenDefined(this.pubSubService,this),this._gridRowBuffer=this.gridOptions.minRowBuffer||0,this.gridOptions.minRowBuffer=this._addonOptions.panelRows+3,this._eventHandler.subscribe(this._grid.onClick,this.handleClick.bind(this)).subscribe(this._grid.onBeforeEditCell,()=>this.collapseAll()).subscribe(this._grid.onScroll,this.handleScroll.bind(this)),this._addonOptions.collapseAllOnSort&&(this.pubSubService.subscribe("onSortChanged",()=>this.collapseAll()),this._expandedRows=[],this._rowIdsOutOfViewport=[]),this._eventHandler.subscribe(this.dataView.onRowCountChanged,()=>{this._grid.updateRowCount(),this._grid.render()}),this._eventHandler.subscribe(this.dataView.onRowsChanged,(a,u)=>{this._grid.invalidateRows(u.rows),this._grid.render()}),this._eventHandler.subscribe(this.onAsyncResponse,this.handleOnAsyncResponse.bind(this)),this._eventHandler.subscribe(this.dataView.onSetItemsCalled,()=>{this._dataViewIdProperty=this.dataView?.getIdPropertyName()||"id"}),this._addonOptions.useSimpleViewportCalc&&this._eventHandler.subscribe(this._grid.onRendered,(a,u)=>{u?.endRow&&(this._visibleRenderedCellCount=u.endRow-u.startRow)})}dispose(){this._eventHandler?.unsubscribeAll()}create(e,a){if(!a.rowDetailView)throw new Error('[Slickgrid-Universal] The Row Detail View requires options to be passed via the "rowDetailView" property of the Grid Options');if(this._addonOptions=cu(!0,{},this._defaults,a.rowDetailView),"function"==typeof this._addonOptions.expandableOverride&&this.expandableOverride(this._addonOptions.expandableOverride),Array.isArray(e)&&a){const u=this.getColumnDefinition();if(!e.some(i=>i.id===u.id)){const r=Array.isArray(e)&&e.find(d=>"selectAndMove"===d?.behavior)||u,o=a?.rowDetailView?.columnIndexPosition??0;o>0?e.splice(o,0,r):e.unshift(r),this.pubSubService.publish("onPluginColumnsChanged",{columns:e,pluginName:this.pluginName})}}return this}getOptions(){return this._addonOptions}setOptions(e){this._addonOptions=cu(!0,{},this._addonOptions,e),this._addonOptions?.singleRowExpand&&this.collapseAll()}collapseAll(){this.dataView.beginUpdate(),this._expandedRows.forEach(e=>{this.collapseDetailView(e,!0)}),this.dataView.endUpdate()}collapseDetailView(e,a=!1){a||this.dataView.beginUpdate(),this._addonOptions.loadOnce&&this.saveDetailView(e),e[`${this._keyPrefix}collapsed`]=!0;for(let u=1;u<=e[`${this._keyPrefix}sizePadding`];u++)this.dataView.deleteItem(`${e[this._dataViewIdProperty]}.${u}`);e[`${this._keyPrefix}sizePadding`]=0,this.dataView.updateItem(e[this._dataViewIdProperty],e),this._expandedRows=this._expandedRows.filter(u=>u[this._dataViewIdProperty]!==e[this._dataViewIdProperty]),a||this.dataView.endUpdate()}expandDetailView(e){if(this._addonOptions?.singleRowExpand&&this.collapseAll(),e[`${this._keyPrefix}collapsed`]=!1,this._expandedRows.push(e),e[`${this._keyPrefix}detailContent`]||(e[`${this._keyPrefix}detailViewLoaded`]=!1),e[`${this._keyPrefix}detailViewLoaded`]&&!0===this._addonOptions.loadOnce)return this.onAsyncResponse.notify({item:e,itemDetail:e,detailView:e[`${this._keyPrefix}detailContent`],grid:this._grid}),this.applyTemplateNewLineHeight(e),void this.dataView.updateItem(e[this._dataViewIdProperty],e);e[`${this._keyPrefix}detailContent`]=this._addonOptions?.preTemplate?.(e),this.applyTemplateNewLineHeight(e),this.dataView.updateItem(e[this._dataViewIdProperty],e),this._addonOptions.process(e)}saveDetailView(e){const a=document.querySelector(`.${this.gridUid} .innerDetailView_${e[this._dataViewIdProperty]}`);if(a){const u=a.innerHTML;void 0!==u&&(e[`${this._keyPrefix}detailContent`]=u)}}handleOnAsyncResponse(e,a){if(!a||!a.item&&!a.itemDetail)return void console.error('SlickRowDetailView plugin requires the onAsyncResponse() to supply "args.item" property.');const u=a.item||a.itemDetail;u[`${this._keyPrefix}detailContent`]=a.detailView??this._addonOptions?.postTemplate?.(u),u[`${this._keyPrefix}detailViewLoaded`]=!0,this.dataView.updateItem(u[this._dataViewIdProperty],u),this.onAsyncEndUpdate.notify({grid:this._grid,item:u,itemDetail:u},e,this)}expandableOverride(e){this._expandableOverride=e}getExpandableOverride(){return this._expandableOverride}getColumnDefinition(){const e=String(this._addonOptions?.columnId??this._defaults.columnId);return{id:e,field:e,name:"",alwaysRenderColumn:this._addonOptions?.alwaysRenderColumn,cssClass:this._addonOptions.cssClass||"",excludeFromExport:!0,excludeFromColumnPicker:!0,excludeFromGridMenu:!0,excludeFromQuery:!0,excludeFromHeaderMenu:!0,formatter:this.detailSelectionFormatter.bind(this),reorderable:this._addonOptions.reorderable,resizable:!1,sortable:!1,toolTip:this._addonOptions.toolTip,width:this._addonOptions.width}}getExpandedRows(){return this._expandedRows}getOutOfViewportRows(){return this._rowIdsOutOfViewport}getFilterItem(e){return e[`${this._keyPrefix}isPadding`]&&e[`${this._keyPrefix}parent`]&&(e=e[`${this._keyPrefix}parent`]),e}resizeDetailView(e){if(!e)return;const a=document.querySelector(`.${this.gridUid} .detailViewContainer_${e[this._dataViewIdProperty]}`),u=document.querySelector(`.${this.gridUid} .cellDetailView_${e[this._dataViewIdProperty]}`),i=document.querySelector(`.${this.gridUid} .innerDetailView_${e[this._dataViewIdProperty]}`);if(!a||!u||!i)return;for(let v=1;v<=e[`${this._keyPrefix}sizePadding`];v++)this.dataView.deleteItem(`${e[this._dataViewIdProperty]}.${v}`);const r=this.gridOptions.rowHeight;a.style.minHeight="";const d=a.scrollHeight,h=Math.ceil(d/r);e[`${this._keyPrefix}sizePadding`]=Math.ceil(2*h*13/r),e[`${this._keyPrefix}height`]=d;let m=e[`${this._keyPrefix}sizePadding`]*r;void 0!==this._addonOptions.maxRows&&e[`${this._keyPrefix}sizePadding`]>this._addonOptions.maxRows&&(m=this._addonOptions.maxRows*r,e[`${this._keyPrefix}sizePadding`]=this._addonOptions.maxRows),this.gridOptions.minRowBuffer0&&(e="DOWN",this._lastRange)){if(this._lastRange.top===a.top&&this._lastRange.bottom===a.bottom)return;(this._lastRange.top>a.top||0===this._lastRange.top&&0===a.top&&this._lastRange.bottom>a.bottom)&&(e="UP")}this._expandedRows.forEach(u=>{const i=this.dataView.getRowById(u[this._dataViewIdProperty]),r=u[`${this._keyPrefix}sizePadding`],o=this._rowIdsOutOfViewport.some(d=>d===u[this._dataViewIdProperty]);"UP"===e?(this._addonOptions.saveDetailViewOnScroll&&i>=a.bottom-this._gridRowBuffer&&this.saveDetailView(u),o&&i-this._outsideRange=a.top?this.notifyBackToViewportWhenDomExist(u,u[this._dataViewIdProperty]):!o&&i+r>a.bottom&&this.notifyOutOfViewport(u,u[this._dataViewIdProperty])):"DOWN"===e&&(this._addonOptions.saveDetailViewOnScroll&&i<=a.top+this._gridRowBuffer&&this.saveDetailView(u),o&&i+r+this._outsideRange>a.bottom&&i{const u=this.dataView.getRowById(a[this._dataViewIdProperty]),i=this.checkIsRowOutOfViewportRange(u,e);!i&&this._rowIdsOutOfViewport.some(r=>r===a[this._dataViewIdProperty])?this.notifyBackToViewportWhenDomExist(a,a[this._dataViewIdProperty]):i&&this.notifyOutOfViewport(a,a[this._dataViewIdProperty])})}}checkExpandableOverride(e,a,u){return"function"!=typeof this._expandableOverride||this._expandableOverride(e,a,u)}checkIsRowOutOfViewportRange(e,a){return Math.abs(a.bottom-this._gridRowBuffer-e)>2*this._visibleRenderedCellCount}getPaddingItem(e,a){const u={};return Object.keys(this.dataView).forEach(i=>{i&&(u[i]=null)}),u[this._dataViewIdProperty]=`${e[this._dataViewIdProperty]}.${a}`,u[`${this._keyPrefix}collapsed`]=!0,u[`${this._keyPrefix}isPadding`]=!0,u[`${this._keyPrefix}parent`]=e,u[`${this._keyPrefix}offset`]=a,u}detailSelectionFormatter(e,a,u,i,r,o){if(!this.checkExpandableOverride(e,r,o))return"";if(void 0===r[`${this._keyPrefix}collapsed`]&&(r[`${this._keyPrefix}collapsed`]=!0,r[`${this._keyPrefix}sizePadding`]=0,r[`${this._keyPrefix}height`]=0,r[`${this._keyPrefix}isPadding`]=!1,r[`${this._keyPrefix}parent`]=void 0,r[`${this._keyPrefix}offset`]=0),!r[`${this._keyPrefix}isPadding`]){if(r[`${this._keyPrefix}collapsed`]){let d=`${this._addonOptions.cssClass||""} expand `;return this._addonOptions.collapsedClass&&(d+=this._addonOptions.collapsedClass),T("div",{className:Kt(d).join(" ")})}{const d=this.gridOptions.rowHeight||0;let h=(r[`${this._keyPrefix}sizePadding`]||0)*this.gridOptions.rowHeight;null!==this._addonOptions.maxRows&&(r[`${this._keyPrefix}sizePadding`]||0)>this._addonOptions.maxRows&&(h=this._addonOptions.maxRows*d,r[`${this._keyPrefix}sizePadding`]=this._addonOptions.maxRows);let m=`${this._addonOptions.cssClass||""} collapse `;this._addonOptions.expandedClass&&(m+=this._addonOptions.expandedClass);const g=T("div",{className:`dynamic-cell-detail cellDetailView_${r[this._dataViewIdProperty]}`,style:{height:`${h}px`,top:`${d}px`}}),v=T("div",{className:`detail-container detailViewContainer_${r[this._dataViewIdProperty]}`}),k=T("div",{className:`innerDetailView_${r[this._dataViewIdProperty]}`});return r[`${this._keyPrefix}detailContent`]instanceof HTMLElement?k.appendChild(r[`${this._keyPrefix}detailContent`]):k.innerHTML=this._grid.sanitizeHtmlString(r[`${this._keyPrefix}detailContent`]),v.appendChild(k),g.appendChild(v),{html:T("div",{className:Kt(m).join(" ")}),insertElementAfterTarget:g}}}return""}handleAccordionShowHide(e){e&&(e[`${this._keyPrefix}collapsed`]?this.expandDetailView(e):this.collapseDetailView(e))}handleClick(e,a){const u=this._grid.getDataItem(a.row);if(this.checkExpandableOverride(a.row,u,this._grid)){const i=this._grid.getColumns()[a.cell];if(this._addonOptions.useRowClick||i.id===this._addonOptions.columnId&&e.target.classList.contains(this._addonOptions.cssClass||"")){if(this._grid.getEditorLock().isActive()&&!this._grid.getEditorLock().commitCurrentEdit())return e.preventDefault(),void e.stopImmediatePropagation();if(!1===this.onBeforeRowDetailToggle.notify({grid:this._grid,item:u},e,this,!0).getReturnValue())return;this.toggleRowSelection(a.row,u),this.onAfterRowDetailToggle.notify({grid:this._grid,item:u,expandedRows:this._expandedRows},e,this),e.stopPropagation(),e.stopImmediatePropagation()}}}handleScroll(){this._addonOptions.useSimpleViewportCalc?this.calculateOutOfRangeViewsSimplerVersion():this.calculateOutOfRangeViews()}notifyOutOfViewport(e,a){const u=e.rowIndex||this.dataView.getRowById(e[this._dataViewIdProperty]);this.onRowOutOfViewportRange.notify({grid:this._grid,item:e,rowId:a,rowIndex:u,expandedRows:this._expandedRows,rowIdsOutOfViewport:this.syncOutOfViewportArray(a,!0)},null,this)}notifyBackToViewportWhenDomExist(e,a){const u=e.rowIndex||this.dataView.getRowById(e[this._dataViewIdProperty]);setTimeout(()=>{document.querySelector(`.${this.gridUid} .cellDetailView_${e[this._dataViewIdProperty]}`)&&this.onRowBackToViewportRange.notify({grid:this._grid,item:e,rowId:a,rowIndex:u,expandedRows:this._expandedRows,rowIdsOutOfViewport:this.syncOutOfViewportArray(a,!1)},null,this)},100)}syncOutOfViewportArray(e,a){const u=this._rowIdsOutOfViewport.findIndex(i=>i===e);return a&&u<0?this._rowIdsOutOfViewport.push(e):!a&&u>=0&&this._rowIdsOutOfViewport.splice(u,1),this._rowIdsOutOfViewport}toggleRowSelection(e,a){this.checkExpandableOverride(e,a,this._grid)&&(this.dataView.beginUpdate(),this.handleAccordionShowHide(a),this.dataView.endUpdate())}}const yT="container_",lU="container_loading";class C4e extends D4e{constructor(e,a,u,i,r){super(u),this.angularUtilService=e,this.appRef=a,this.eventPubSubService=u,this.gridContainerElement=i,this.rxjs=r,this._views=[],this._subscriptions=[]}get addonOptions(){return this.getOptions()}get datasetIdPropName(){return this.gridOptions.datasetIdPropertyName||"id"}get eventHandler(){return this._eventHandler}set eventHandler(e){this._eventHandler=e}get gridOptions(){return this._grid?.getOptions()||{}}get rowDetailViewOptions(){return this.gridOptions.rowDetailView}addRxJsResource(e){this.rxjs=e}dispose(){this.disposeAllViewComponents(),this._subscriptions=H2(this._subscriptions),super.dispose()}disposeAllViewComponents(){this._views.forEach(e=>this.disposeViewComponent(e)),this._views=[]}getAddonInstance(){return this}init(e){this._grid=e,super.init(this._grid),this.register(e?.getSelectionModel())}register(e){if("function"!=typeof this.gridOptions.rowDetailView?.process)throw new Error('[Angular-Slickgrid] You need to provide a "process" function for the Row Detail Extension to work properly');return this._userProcessFn=this.gridOptions.rowDetailView.process,this.addonOptions.process=a=>this.onProcessing(a),this._grid&&this.gridOptions?.rowDetailView&&(this.gridOptions.rowDetailView.preTemplate||(this._preloadComponent=this.gridOptions?.rowDetailView?.preloadComponent,this.addonOptions.preTemplate=()=>this._grid.sanitizeHtmlString(`
`)),this.gridOptions.rowDetailView.postTemplate||(this._viewComponent=this.gridOptions?.rowDetailView?.viewComponent,this.addonOptions.postTemplate=a=>this._grid.sanitizeHtmlString(`
`)),(!e||!this._grid.getSelectionModel())&&(e=new D7(this.gridOptions.rowSelectionOptions||{selectActiveRow:!0}),this._grid.setSelectionModel(e)),this._grid&&this.rowDetailViewOptions&&(this.rowDetailViewOptions.onExtensionRegistered&&this.rowDetailViewOptions.onExtensionRegistered(this),this.onAsyncResponse&&this.eventHandler.subscribe(this.onAsyncResponse,(a,u)=>{this.rowDetailViewOptions&&"function"==typeof this.rowDetailViewOptions.onAsyncResponse&&this.rowDetailViewOptions.onAsyncResponse(a,u)}),this.onAsyncEndUpdate&&this.eventHandler.subscribe(this.onAsyncEndUpdate,(a,u)=>{this.renderViewModel(u?.item),this.rowDetailViewOptions&&"function"==typeof this.rowDetailViewOptions.onAsyncEndUpdate&&this.rowDetailViewOptions.onAsyncEndUpdate(a,u)}),this.onAfterRowDetailToggle&&this.eventHandler.subscribe(this.onAfterRowDetailToggle,(a,u)=>{this.renderPreloadView(),this.renderAllViewComponents(),this.rowDetailViewOptions&&"function"==typeof this.rowDetailViewOptions.onAfterRowDetailToggle&&this.rowDetailViewOptions.onAfterRowDetailToggle(a,u)}),this.onBeforeRowDetailToggle&&this.eventHandler.subscribe(this.onBeforeRowDetailToggle,(a,u)=>(this.handleOnBeforeRowDetailToggle(a,u),!this.rowDetailViewOptions||"function"!=typeof this.rowDetailViewOptions.onBeforeRowDetailToggle||this.rowDetailViewOptions.onBeforeRowDetailToggle(a,u))),this.onRowBackToViewportRange&&this.eventHandler.subscribe(this.onRowBackToViewportRange,(a,u)=>{this.handleOnRowBackToViewportRange(a,u),this.rowDetailViewOptions&&"function"==typeof this.rowDetailViewOptions.onRowBackToViewportRange&&this.rowDetailViewOptions.onRowBackToViewportRange(a,u)}),this.onRowOutOfViewportRange&&this.eventHandler.subscribe(this.onRowOutOfViewportRange,(a,u)=>{this.rowDetailViewOptions&&"function"==typeof this.rowDetailViewOptions.onRowOutOfViewportRange&&this.rowDetailViewOptions.onRowOutOfViewportRange(a,u)}),this.eventHandler.subscribe(this._grid.onColumnsReordered,this.redrawAllViewComponents.bind(this)),(this.gridOptions.enableRowSelection||this.gridOptions.enableCheckboxSelector)&&this.eventHandler.subscribe(this._grid.onSelectedRowsChanged,this.redrawAllViewComponents.bind(this)),this.eventHandler.subscribe(this._grid.onSort,this.disposeAllViewComponents.bind(this)),this._subscriptions.push(this.eventPubSubService?.subscribe("onFilterChanged",this.redrawAllViewComponents.bind(this)),this.eventPubSubService?.subscribe("onGridMenuClearAllFilters",()=>setTimeout(()=>this.redrawAllViewComponents())),this.eventPubSubService?.subscribe("onGridMenuClearAllSorting",()=>setTimeout(()=>this.redrawAllViewComponents()))))),this}redrawAllViewComponents(){this._views.forEach(e=>{this.redrawViewComponent(e)})}renderAllViewComponents(){this._views.forEach(e=>{e?.dataContext&&this.renderViewModel(e.dataContext)})}redrawViewComponent(e){this.gridContainerElement.getElementsByClassName(`${yT}${e.id}`)?.length>=0&&this.renderViewModel(e.dataContext)}renderPreloadView(){const e=this.gridContainerElement.getElementsByClassName(`${lU}`);this._preloadComponent&&e?.length>=0&&this.angularUtilService.createAngularComponentAppendToDom(this._preloadComponent,e[e.length-1])}renderViewModel(e){const a=this.gridContainerElement.getElementsByClassName(`${yT}${e[this.datasetIdPropName]}`);if(this._viewComponent&&a?.length>0){const u=this.angularUtilService.createAngularComponentAppendToDom(this._viewComponent,a[a.length-1],{model:e,addon:this,grid:this._grid,dataView:this.dataView,parent:this.rowDetailViewOptions?.parent});if(u?.componentRef){const i=this._views.find(r=>r.id===e[this.datasetIdPropName]);return i&&(i.componentRef=u.componentRef),i}}}disposeViewComponent(e){const a=e?.componentRef;if(a)return this.appRef.detachView(a.hostView),a?.destroy&&a.destroy(),e}notifyTemplate(e){this.onAsyncResponse&&this.onAsyncResponse.notify({item:e,itemDetail:e},void 0,this)}onProcessing(e){var a=this;return Su(function*(){if(e&&"function"==typeof a._userProcessFn){let u;const r=yield a._userProcessFn(e);if(r.hasOwnProperty(a.datasetIdPropName)?u=r:(r&&r instanceof ht||r instanceof Promise)&&(u=yield sL(a.rxjs,r)),!u||!u.hasOwnProperty(a.datasetIdPropName))throw new Error(`[Angular-Slickgrid] could not process the Row Detail, you must make sure that your "process" callback\n (a Promise or an HttpClient call returning an Observable) returns an item object that has an "${a.datasetIdPropName}" property`);a.notifyTemplate(u||{})}})()}handleOnBeforeRowDetailToggle(e,a){if(a?.item?.__collapsed){const u={id:a.item[this.datasetIdPropName],dataContext:a.item},i=this.gridOptions.datasetIdPropertyName||"id";JG(this._views,u,i)}else{const u=this._views.findIndex(i=>i.id===a.item[this.datasetIdPropName]);if(u>=0&&this._views.hasOwnProperty(u)){const i=this._views[u].componentRef;i&&(this.appRef.detachView(i.hostView),i.destroy()),this._views.splice(u,1)}}}handleOnRowBackToViewportRange(e,a){a?.item&&this.redrawAllViewComponents()}}const _T={alwaysShowVerticalScroll:!0,autoEdit:!1,asyncEditorLoading:!1,autoFitColumnsOnFirstLoad:!0,autoResize:{applyResizeToContainer:!0,calculateAvailableSizeBy:"window",bottomPadding:20,minHeight:180,minWidth:300,rightPadding:0},cellHighlightCssClass:"slick-cell-modified",checkboxSelector:{cssClass:"slick-cell-checkboxsel"},columnPicker:{hideForceFitButton:!1,hideSyncResizeButton:!0,headerColumnValueExtractor:sU},cellMenu:{autoAdjustDrop:!0,autoAlignSide:!0,hideCloseButton:!0,hideCommandSection:!1,hideOptionSection:!1},contextMenu:{autoAdjustDrop:!0,autoAlignSide:!0,hideCloseButton:!0,hideClearAllGrouping:!1,hideCollapseAllGroups:!1,hideCommandSection:!1,hideCopyCellValueCommand:!1,hideExpandAllGroups:!1,hideExportCsvCommand:!1,hideExportExcelCommand:!1,hideExportTextDelimitedCommand:!0,hideMenuOnScroll:!0,hideOptionSection:!1,iconCollapseAllGroupsCommand:"mdi mdi-arrow-collapse",iconExpandAllGroupsCommand:"mdi mdi-arrow-expand",iconClearGroupingCommand:"mdi mdi-close",iconCopyCellValueCommand:"mdi mdi-content-copy",iconExportCsvCommand:"mdi mdi-download",iconExportExcelCommand:"mdi mdi-file-excel-outline",iconExportTextDelimitedCommand:"mdi mdi-download",showBulletWhenIconMissing:!0,subItemChevronClass:"mdi mdi-chevron-down mdi-rotate-270"},customFooterOptions:{dateFormat:"YYYY-MM-DD, hh:mm a",hideRowSelectionCount:!1,hideTotalItemCount:!1,hideLastUpdateTimestamp:!0,footerHeight:25,leftContainerClass:"col-xs-12 col-sm-5",rightContainerClass:"col-xs-6 col-sm-7",metricSeparator:"|",metricTexts:{items:"items",itemsKey:"ITEMS",itemsSelected:"items selected",itemsSelectedKey:"ITEMS_SELECTED",of:"of",ofKey:"OF"}},dataView:{syncGridSelection:{preserveHidden:!1,preserveHiddenOnSelectionChange:!0},syncGridSelectionWithBackendService:!1},datasetIdPropertyName:"id",defaultFilter:ie.input,defaultBackendServiceFilterTypingDebounce:500,defaultColumnSortFieldId:"id",defaultFilterPlaceholder:"\u{1f50e}\ufe0e",defaultFilterRangeOperator:te.rangeInclusive,editable:!1,enableAutoResize:!0,enableAutoSizeColumns:!0,enableCellNavigation:!1,enableColumnPicker:!0,enableColumnReorder:!0,enableColumnResizeOnDoubleClick:!0,enableContextMenu:!0,enableExcelExport:!1,enableTextExport:!1,enableFilterTrimWhiteSpace:!1,enableGridMenu:!0,enableHeaderMenu:!0,enableEmptyDataWarningMessage:!0,emptyDataWarning:{className:"slick-empty-data-warning",message:"No data to display.",messageKey:"EMPTY_DATA_WARNING_MESSAGE",hideFrozenLeftWarning:!1,hideFrozenRightWarning:!1,leftViewportMarginLeft:"40%",rightViewportMarginLeft:"40%",frozenLeftViewportMarginLeft:"0px",frozenRightViewportMarginLeft:"40%"},enableMouseHoverHighlightRow:!0,enableSorting:!0,enableTextSelectionOnCells:!0,eventNamingStyle:R0.camelCase,explicitInitialization:!0,excelExportOptions:{addGroupIndentation:!0,exportWithFormatter:!1,filename:"export",format:yt.xlsx,groupingColumnHeaderTitle:"Group By",groupCollapsedSymbol:"\u2b9e",groupExpandedSymbol:"\u2b9f",groupingAggregatorRowText:"",sanitizeDataExport:!1},textExportOptions:{delimiter:$r.comma,exportWithFormatter:!1,filename:"export",format:yt.csv,groupingColumnHeaderTitle:"Group By",groupingAggregatorRowText:"",sanitizeDataExport:!1,useUtf8WithBom:!0},filterTypingDebounce:0,forceFitColumns:!1,frozenHeaderWidthCalcDifferential:0,gridMenu:{dropSide:"left",commandLabels:{clearAllFiltersCommandKey:"CLEAR_ALL_FILTERS",clearAllSortingCommandKey:"CLEAR_ALL_SORTING",clearFrozenColumnsCommandKey:"CLEAR_PINNING",exportCsvCommandKey:"EXPORT_TO_CSV",exportExcelCommandKey:"EXPORT_TO_EXCEL",exportTextDelimitedCommandKey:"EXPORT_TO_TAB_DELIMITED",refreshDatasetCommandKey:"REFRESH_DATASET",toggleDarkModeCommandKey:"TOGGLE_DARK_MODE",toggleFilterCommandKey:"TOGGLE_FILTER_ROW",togglePreHeaderCommandKey:"TOGGLE_PRE_HEADER_ROW"},hideClearAllFiltersCommand:!1,hideClearAllSortingCommand:!1,hideClearFrozenColumnsCommand:!0,hideExportCsvCommand:!1,hideExportExcelCommand:!1,hideExportTextDelimitedCommand:!0,hideForceFitButton:!1,hideRefreshDatasetCommand:!1,hideSyncResizeButton:!0,hideToggleDarkModeCommand:!0,hideToggleFilterCommand:!1,hideTogglePreHeaderCommand:!1,iconCssClass:"mdi mdi-menu",iconClearAllFiltersCommand:"mdi mdi-filter-remove-outline",iconClearAllSortingCommand:"mdi mdi-sort-variant-off",iconClearFrozenColumnsCommand:"mdi mdi-pin-off-outline",iconExportCsvCommand:"mdi mdi-download",iconExportExcelCommand:"mdi mdi-file-excel-outline",iconExportTextDelimitedCommand:"mdi mdi-download",iconRefreshDatasetCommand:"mdi mdi-sync",iconToggleDarkModeCommand:"mdi mdi-brightness-4",iconToggleFilterCommand:"mdi mdi-flip-vertical",iconTogglePreHeaderCommand:"mdi mdi-flip-vertical",menuWidth:16,resizeOnShowHeaderRow:!0,subItemChevronClass:"mdi mdi-chevron-down mdi-rotate-270",headerColumnValueExtractor:sU},headerMenu:{autoAlign:!0,autoAlignOffset:12,minWidth:140,iconClearFilterCommand:"mdi mdi-filter-remove-outline",iconClearSortCommand:"mdi mdi-sort-variant-off",iconFreezeColumns:"mdi mdi-pin-outline",iconSortAscCommand:"mdi mdi-sort-ascending",iconSortDescCommand:"mdi mdi-sort-descending",iconColumnHideCommand:"mdi mdi-close",iconColumnResizeByContentCommand:"mdi mdi-arrow-expand-horizontal",hideColumnResizeByContentCommand:!1,hideColumnHideCommand:!1,hideClearFilterCommand:!1,hideClearSortCommand:!1,hideFreezeColumnsCommand:!0,hideSortCommands:!1,subItemChevronClass:"mdi mdi-chevron-down mdi-rotate-270"},headerRowHeight:35,multiColumnSort:!0,numberedMultiColumnSort:!0,tristateMultiColumnSort:!1,sortColNumberInSeparateSpan:!0,suppressActiveCellChangeOnEdit:!1,pagination:{pageSizes:[10,15,20,25,30,40,50,75,100],pageSize:25,totalItems:0},rowDetailView:{collapseAllOnSort:!0,cssClass:"detail-view-toggle",panelRows:1,keyPrefix:"__",useRowClick:!1,useSimpleViewportCalc:!0,saveDetailViewOnScroll:!1},rowHeight:35,topPanelHeight:35,preHeaderPanelWidth:"100%",translationNamespaceSeparator:":",resetFilterSearchValueAfterOnBeforeCancellation:!0,resizeByContentOnlyOnFirstLoad:!0,resizeByContentOptions:{alwaysRecalculateColumnWidth:!1,cellCharWidthInPx:7.8,cellPaddingWidthInPx:14,defaultRatioForStringType:.88,formatterPaddingWidthInPx:0,maxItemToInspectCellContentWidth:1e3,maxItemToInspectSingleColumnWidthByContent:5e3,widthToRemoveFromExceededWidthReadjustment:50},treeDataOptions:{exportIndentMarginLeft:5,exportIndentationLeadingChar:"\u034f\u034f\u034f\u034f\u034f\u034f\u034f\u034f\u034f\xb7"}};function sU(t,e){let a=t?.columnPickerLabel??t?.name??"";(a instanceof HTMLElement||a instanceof DocumentFragment)&&(a=a.textContent||"");const u=t?.columnGroup||"";return u?u+(e?.columnGroupSeparator??" - ")+a:a}class _4e{constructor(){this._isPreviouslyShown=!1,this._warningLeftElement=null,this._warningRightElement=null}get gridOptions(){return this._grid?.getOptions()??{}}init(e,a){this._grid=e,this._translaterService=a.get("TranslaterService")}dispose(){this._warningLeftElement?.remove(),this._warningRightElement?.remove(),this._warningLeftElement=null,this._warningRightElement=null}showEmptyDataMessage(e=!0,a){if(!this._grid||!this.gridOptions||this._isPreviouslyShown===e)return!1;this._isPreviouslyShown=e;const u=this._grid.getUID(),r={message:"No data to display.",...this.gridOptions.emptyDataWarning,...a},o=r?.className??"slick-empty-data-warning";this._warningLeftElement=document.querySelector(`.${u} .${o}`);const d=document.querySelector(`.${u} .grid-canvas.grid-canvas-left`),h=document.querySelector(`.${u} .grid-canvas.grid-canvas-right`),m=r.leftViewportMarginLeft??0,g=r.rightViewportMarginLeft??0,v=r.frozenLeftViewportMarginLeft??0,k=r.frozenRightViewportMarginLeft??0,x=void 0!==this.gridOptions?.frozenColumn&&this.gridOptions.frozenColumn>=0,D="string"==typeof m?m:`${m}px`,C="string"==typeof g?g:`${g}px`;if(this.gridOptions.autoHeight){const A=document.querySelector(`.${u} .slick-pane.slick-pane-top.slick-pane-left`);if(A&&A.style&&d&&d.style){const z=parseInt(A.style.height,10)||0,M=this.gridOptions?.rowHeight??0,L=this.gridOptions.enableFiltering?this.gridOptions?.headerRowHeight??0:0,R=this.gridOptions.createPreHeaderPanel?this.gridOptions?.preHeaderPanelHeight??0:0;if(e){let G=null!==z&&z<100?z:100;G+=L+R,A.style.minHeight=`${G}px`,d.style.minHeight=`${M}px`}}}let F=r.message;if(this.gridOptions.enableTranslate&&this._translaterService&&r?.messageKey&&(F=this._translaterService.translate(r.messageKey)),!this._warningLeftElement&&d&&h&&(this._warningLeftElement=document.createElement("div"),this._warningLeftElement.classList.add(...Kt(o)),this._warningLeftElement.classList.add("left"),this._grid.applyHtmlCode(this._warningLeftElement,F),this._warningRightElement=this._warningLeftElement.cloneNode(!0),this._warningRightElement.classList.add("right"),h.appendChild(this._warningRightElement),d.appendChild(this._warningLeftElement)),this._warningLeftElement){let A=e?"flex":"none";x&&e&&(A=r.hideFrozenLeftWarning?"none":"flex"),this._warningLeftElement.style.display=A;const z="string"==typeof v?v:`${v}px`;this._warningLeftElement.style.marginLeft=x?z:D}if(this._warningRightElement){let A=e?"flex":"none";x&&e&&(A=r.hideFrozenRightWarning?"none":"flex"),this._warningRightElement.style.display=A;const z="string"==typeof k?k:`${k}px`;this._warningRightElement.style.marginLeft=x?z:C}return e}}class F4e{constructor(e){this._value=null,this._boundedEventWithListeners=[],this._elementBindings=[],this._binding=e,this._property=e.property||"",this._elementBindings=[],e.property&&e.variable&&(e.variable.hasOwnProperty(e.property)||e.property in e.variable)?this._value=e.variable[e.property]:this._value=e.variable,"object"==typeof e.variable&&Object.defineProperty(e.variable,e.property,{get:this.valueGetter.bind(this),set:this.valueSetter.bind(this)})}get boundedEventWithListeners(){return this._boundedEventWithListeners}get elementBindings(){return this._elementBindings}get property(){return this._property}dispose(){this.unbindAll(),this._boundedEventWithListeners=[],this._elementBindings=[]}valueGetter(){return this._value}valueSetter(e){if(this._value=e,Array.isArray(this._elementBindings))for(const a of this._elementBindings)a?.element&&a?.attribute&&(a.element[a.attribute]=e)}bind(e,a,u,i){return e&&e.forEach?e.forEach(r=>this.bindSingleElement(r,a,u,i)):e&&this.bindSingleElement(e,a,u,i),this}unbind(e,a,u,i,r){if(e){e.removeEventListener(a,u,i);const o=this._boundedEventWithListeners.findIndex(d=>d.uid===r);o>=0&&this._boundedEventWithListeners.splice(o,1)}}unbindAll(){let e=this._boundedEventWithListeners.pop();for(;e;){const{element:a,eventName:u,listener:i,uid:r}=e;this.unbind(a,u,i,void 0,r),e=this._boundedEventWithListeners.pop()}this._boundedEventWithListeners=[]}bindSingleElement(e,a,u,i){const r={element:e,attribute:a};if(e){if(u){const o=()=>{let d=e[a];if(this.hasData(d)&&"number"===e?.type&&(d=+d),this.valueSetter(d),(this._binding.variable.hasOwnProperty(this._binding.property)||this._binding.property in this._binding.variable)&&(this._binding.variable[this._binding.property]=this.valueGetter()),"function"==typeof i)return i(this.valueGetter())};r.event=u,r.listener=o,e.addEventListener(u,o),this._boundedEventWithListeners.push({element:e,eventName:u,listener:o,uid:this.generateUuidV4()})}this._elementBindings.push(r),e[a]=this._value}}generateUuidV4(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const a=16*Math.random()|0;return("x"===e?a:3&a|8).toString(16)})}hasData(e){return null!=e&&""!==e}}class dU{constructor(){this._observers=[],this._querySelectorPrefix=""}get querySelectorPrefix(){return this._querySelectorPrefix||""}set querySelectorPrefix(e){this._querySelectorPrefix=e}get observers(){return this._observers}dispose(){let e=this._observers.pop();for(;e;)e.dispose(),e=this._observers.pop();this._observers=[]}addElementBinding(e,a,u,i,r,o){const d=document.querySelectorAll(`${this.querySelectorPrefix}${u}`);let h=this._observers.find(m=>m.property===e);h||(h=new F4e({variable:e,property:a})),Array.isArray(r)?r.forEach(m=>h?.bind(d,i,m,o)):h?.bind(d,i,r,o),this._observers.push(h)}bindEventHandler(e,a,u,i){document.querySelectorAll(`${this.querySelectorPrefix}${e}`).forEach(o=>{o?.addEventListener&&o.addEventListener(a,u,i)})}setElementAttributeValue(e,a,u){document.querySelectorAll(`${this.querySelectorPrefix}${e}`).forEach(r=>{r.textContent="",r&&a in r&&(r[a]=u)})}}class A4e{get eventHandler(){return this._eventHandler}get gridUid(){return this.grid?.getUID()??""}get gridUidSelector(){return this.gridUid?`.${this.gridUid}`:""}get gridOptions(){return this.grid?.getOptions()??{}}get locales(){return this.gridOptions?.locales??ue.locales}set metrics(e){this.renderMetrics(e)}get leftFooterText(){return document.querySelector(`.slick-custom-footer${this.gridUidSelector} .left-footer`)?.textContent??""}set leftFooterText(e){this.renderLeftFooterText(e)}get rightFooterText(){return document.querySelector(`.slick-custom-footer${this.gridUidSelector} .right-footer`)?.textContent??""}set rightFooterText(e){this.renderRightFooterText(e)}constructor(e,a,u,i){if(this.grid=e,this.customFooterOptions=a,this.pubSubService=u,this.translaterService=i,this._enableTranslate=!1,this._isLeftFooterOriginallyEmpty=!0,this._isLeftFooterDisplayingSelectionRowCount=!1,this._isRightFooterOriginallyEmpty=!0,this._selectedRowCount=0,this._subscriptions=[],this._bindingHelper=new dU,this._bindingHelper.querySelectorPrefix=`.${this.gridUid} `,this._eventHandler=new Ut,this._enableTranslate=this.gridOptions?.enableTranslate??!1,this._isLeftFooterOriginallyEmpty=!this.gridOptions.customFooterOptions?.leftFooterText,this._isRightFooterOriginallyEmpty=!this.gridOptions.customFooterOptions?.rightFooterText,this.registerOnSelectedRowsChangedWhenEnabled(a),this._enableTranslate&&(!this.translaterService||!this.translaterService.translate))throw new Error('[Slickgrid-Universal] requires a Translate Service to be installed and configured when the grid option "enableTranslate" is enabled.');if(this.translateCustomFooterTexts(),this._enableTranslate&&this.pubSubService?.subscribe){const r=this.translaterService?.eventName??"onLanguageChange";this._subscriptions.push(this.pubSubService.subscribe(r,()=>this.translateCustomFooterTexts()))}}dispose(){this._eventHandler.unsubscribeAll(),this.pubSubService.unsubscribeAll(this._subscriptions),this._bindingHelper.dispose(),this._footerElement?.remove()}renderFooter(e){this.translateCustomFooterTexts(),this.createFooterContainer(e)}renderMetrics(e){const a=e?.endTime?Pi(e.endTime,this.customFooterOptions.dateFormat,"en-US"):"";this._bindingHelper.setElementAttributeValue("span.last-update-timestamp","textContent",a),this._bindingHelper.setElementAttributeValue("span.item-count","textContent",e.itemCount),this._bindingHelper.setElementAttributeValue("span.total-count","textContent",e.totalItemCount),this.customFooterOptions.metricTexts?.lastUpdate&&this._bindingHelper.addElementBinding(this.customFooterOptions.metricTexts,"lastUpdate","span.text-last-update","textContent"),this._bindingHelper.addElementBinding(this.customFooterOptions.metricTexts,"items","span.text-items","textContent"),this._bindingHelper.addElementBinding(this.customFooterOptions.metricTexts,"of","span.text-of","textContent")}renderLeftFooterText(e){this._bindingHelper.setElementAttributeValue("div.left-footer","textContent",e)}renderRightFooterText(e){this._bindingHelper.setElementAttributeValue("div.right-footer","textContent",e)}translateCustomFooterTexts(){if(this.gridOptions.enableTranslate&&this.translaterService?.translate){this.customFooterOptions.metricTexts=this.customFooterOptions.metricTexts||{};for(const e of Object.keys(this.customFooterOptions.metricTexts))if(e.lastIndexOf("Key")>0){const a=e.substring(0,e.lastIndexOf("Key"));this.customFooterOptions.metricTexts[a]=this.translaterService.translate(this.customFooterOptions.metricTexts[e]||" ")}this._isLeftFooterDisplayingSelectionRowCount&&(this.leftFooterText=`${this._selectedRowCount} ${this.customFooterOptions.metricTexts.itemsSelected}`)}else this.locales&&(this.customFooterOptions.metricTexts=this.customFooterOptions.metricTexts||{},this.customFooterOptions.metricTexts.lastUpdate=this.customFooterOptions.metricTexts.lastUpdate||this.locales?.TEXT_LAST_UPDATE||"TEXT_LAST_UPDATE",this.customFooterOptions.metricTexts.items=this.customFooterOptions.metricTexts.items||this.locales?.TEXT_ITEMS||"TEXT_ITEMS",this.customFooterOptions.metricTexts.itemsSelected=this.customFooterOptions.metricTexts.itemsSelected||this.locales?.TEXT_ITEMS_SELECTED||"TEXT_ITEMS_SELECTED",this.customFooterOptions.metricTexts.of=this.customFooterOptions.metricTexts.of||this.locales?.TEXT_OF||"TEXT_OF")}createFooterContainer(e){const a=T("div",{className:`slick-custom-footer ${this.gridUid}`,style:{width:"100%",height:`${this.customFooterOptions.footerHeight||20}px`}}),u=T("div",{className:`left-footer ${this.customFooterOptions.leftContainerClass}`});this.grid.applyHtmlCode(u,this.customFooterOptions.leftFooterText),a.appendChild(u),a.appendChild(this.createFooterRightContainer()),this._footerElement=a,e?.appendChild&&this._footerElement&&e.appendChild(this._footerElement)}createFooterRightContainer(){const e=T("div",{className:`right-footer ${this.customFooterOptions.rightContainerClass||""}`});if(this._isRightFooterOriginallyEmpty){if(!this.customFooterOptions.hideMetrics){e.classList.add("metrics");const a=T("span",{className:"timestamp"},e);if(!this.customFooterOptions.hideLastUpdateTimestamp){const u=this.createFooterLastUpdate();u&&a.appendChild(u)}e.appendChild(T("span",{className:"item-count",textContent:`${this.metrics?.itemCount??"0"}`})),this.customFooterOptions.hideTotalItemCount||(e.appendChild(document.createTextNode("\r\n")),e.appendChild(T("span",{className:"text-of",textContent:` ${this.customFooterOptions.metricTexts?.of??"of"} `})),e.appendChild(document.createTextNode("\r\n")),e.appendChild(T("span",{className:"total-count",textContent:`${this.metrics?.totalItemCount??"0"}`}))),e.appendChild(document.createTextNode("\r\n")),e.appendChild(T("span",{className:"text-items",textContent:` ${this.customFooterOptions.metricTexts?.items??"items"} `}))}}else this.grid.applyHtmlCode(e,this.customFooterOptions.rightFooterText);return e}createFooterLastUpdate(){const e=this.customFooterOptions?.metricTexts?.lastUpdate??"Last Update",a=this.metrics?.endTime?Pi(this.metrics?.endTime,this.customFooterOptions.dateFormat,"en-US"):"",u=T("span");return u.appendChild(T("span",{className:"text-last-update",textContent:e})),u.appendChild(document.createTextNode("\r\n")),u.appendChild(T("span",{className:"last-update-timestamp",textContent:a})),u.appendChild(T("span",{className:"separator",textContent:` ${this.customFooterOptions.metricSeparator||""} `})),u}registerOnSelectedRowsChangedWhenEnabled(e){if((this.gridOptions.enableCheckboxSelector||this.gridOptions.enableRowSelection)&&e&&!e.hideRowSelectionCount&&this._isLeftFooterOriginallyEmpty){this._isLeftFooterDisplayingSelectionRowCount=!0;const u=e.metricTexts?.itemsSelected??this.locales?.TEXT_ITEMS_SELECTED??"TEXT_ITEMS_SELECTED";e.leftFooterText=`0 ${u}`,this._eventHandler.subscribe(this.grid.onSelectedRowsChanged,(i,r)=>{this._selectedRowCount=r.rows.length;const o=e.metricTexts?.itemsSelected??this.locales?.TEXT_ITEMS_SELECTED??"TEXT_ITEMS_SELECTED";this.leftFooterText=`${this._selectedRowCount} ${o}`})}}}class w4e{constructor(e,a,u,i){if(this.paginationService=e,this.pubSubService=a,this.sharedService=u,this.translaterService=i,this._enableTranslate=!1,this._subscriptions=[],this.firstButtonClasses="",this.lastButtonClasses="",this.prevButtonClasses="",this.nextButtonClasses="",this.textItemsPerPage="items per page",this.textItems="items",this.textOf="of",this.textPage="Page",this._bindingHelper=new dU,this._bindingEventService=new Ni,this._bindingHelper.querySelectorPrefix=`.${this.gridUid} `,this.currentPagination=this.paginationService.getFullPagination(),this._enableTranslate=this.gridOptions?.enableTranslate??!1,this._enableTranslate&&(!this.translaterService||!this.translaterService.translate))throw new Error('[Slickgrid-Universal] requires a Translate Service to be installed and configured when the grid option "enableTranslate" is enabled.');if(this.translatePaginationTexts(),this._enableTranslate&&this.pubSubService?.subscribe){const r=this.translaterService?.eventName??"onLanguageChange";this._subscriptions.push(this.pubSubService.subscribe(r,()=>this.translatePaginationTexts()))}this._subscriptions.push(this.pubSubService.subscribe("onPaginationRefreshed",r=>{for(const o of Object.keys(r))this.currentPagination[o]=r[o];this.updatePageButtonsUsability(),this._spanInfoFromToElm?.style&&(this._spanInfoFromToElm.style.display=0===this.currentPagination.totalItems?"none":"")}),this.pubSubService.subscribe("onPaginationSetCursorBased",()=>{this.dispose(),this.renderPagination(this._gridParentContainerElm)}))}get availablePageSizes(){return this.paginationService.availablePageSizes||[]}get dataFrom(){return this.paginationService.dataFrom}get dataTo(){return this.paginationService.dataTo}get itemsPerPage(){return this.paginationService.itemsPerPage}set itemsPerPage(e){this.paginationService.changeItemPerPage(e)}get pageCount(){return this.paginationService.pageCount}get pageNumber(){return this.paginationService.pageNumber}get grid(){return this.sharedService.slickGrid}get gridOptions(){return this.sharedService.gridOptions}get gridUid(){return this.grid?.getUID()??""}get locales(){return this.gridOptions?.locales??ue.locales}get totalItems(){return this.paginationService.totalItems}get isLeftPaginationDisabled(){return 1===this.pageNumber||0===this.totalItems}get isRightPaginationDisabled(){return this.pageNumber===this.pageCount||0===this.totalItems}dispose(){this.pubSubService.unsubscribeAll(this._subscriptions),this._bindingEventService.unbindAll(),this._bindingHelper.dispose(),this._paginationElement.remove()}renderPagination(e){this._gridParentContainerElm=e;const a=this.createPaginationContainer(),u=T("div",{className:"slick-pagination-nav"}),i=T("nav",{ariaLabel:"Page navigation"}),r=T("ul",{className:"pagination"});this._seekFirstElm=T("li",{className:"page-item seek-first"},r),this._seekFirstElm.appendChild(T("a",{className:"page-link icon-seek-first",ariaLabel:"First Page",role:"button"})),this._seekPrevElm=T("li",{className:"page-item seek-prev"},r),this._seekPrevElm.appendChild(T("a",{className:"page-link icon-seek-prev",ariaLabel:"Previous Page",role:"button"})),i.appendChild(r);const o=this.createPageNumberSection(),d=T("nav",{ariaLabel:"Page navigation"}),h=T("ul",{className:"pagination"});this._seekNextElm=T("li",{className:"page-item seek-next"},h),this._seekNextElm.appendChild(T("a",{className:"page-link icon-seek-next",ariaLabel:"Next Page",role:"button"})),this._seekEndElm=T("li",{className:"page-item seek-end"},h),this._seekEndElm.appendChild(T("a",{className:"page-link icon-seek-end",ariaLabel:"Last Page",role:"button"})),d.appendChild(h),a.appendChild(u),u.appendChild(i),u.appendChild(o),u.appendChild(d);const m=this.createPaginationSettingsSection();a.appendChild(u),a.appendChild(m),this._paginationElement.appendChild(a),e?.appendChild&&this._paginationElement&&e.appendChild(this._paginationElement),this.renderPageSizes(),this.addBindings(),this.addEventListeners(),this.updatePageButtonsUsability()}renderPageSizes(){if(this._itemPerPageElm&&Array.isArray(this.availablePageSizes))for(const e of this.availablePageSizes)this._itemPerPageElm.appendChild(T("option",{value:`${e}`,text:`${e}`}))}addBindings(){this._bindingHelper.addElementBinding(this,"firstButtonClasses","li.page-item.seek-first","className"),this._bindingHelper.addElementBinding(this,"prevButtonClasses","li.page-item.seek-prev","className"),this._bindingHelper.addElementBinding(this,"lastButtonClasses","li.page-item.seek-end","className"),this._bindingHelper.addElementBinding(this,"nextButtonClasses","li.page-item.seek-next","className"),this._bindingHelper.addElementBinding(this.currentPagination,"dataFrom","span.item-from","textContent"),this._bindingHelper.addElementBinding(this.currentPagination,"dataTo","span.item-to","textContent"),this._bindingHelper.addElementBinding(this.currentPagination,"totalItems","span.total-items","textContent"),this._bindingHelper.addElementBinding(this.currentPagination,"pageCount","span.page-count","textContent"),this._bindingHelper.addElementBinding(this.currentPagination,"pageSize","select.items-per-page","value"),this.paginationService.isCursorBased?this._bindingHelper.addElementBinding(this.currentPagination,"pageNumber","span.page-number","textContent"):this._bindingHelper.addElementBinding(this.currentPagination,"pageNumber","input.page-number","value","change",this.changeToCurrentPage.bind(this)),this._bindingHelper.addElementBinding(this,"textItems","span.text-items","textContent"),this._bindingHelper.addElementBinding(this,"textItemsPerPage","span.text-item-per-page","textContent"),this._bindingHelper.addElementBinding(this,"textOf","span.text-of","textContent"),this._bindingHelper.addElementBinding(this,"textPage","span.text-page","textContent")}addEventListeners(){this._bindingEventService.bind(this._seekFirstElm,"click",this.changeToFirstPage.bind(this)),this._bindingEventService.bind(this._seekEndElm,"click",this.changeToLastPage.bind(this)),this._bindingEventService.bind(this._seekNextElm,"click",this.changeToNextPage.bind(this)),this._bindingEventService.bind(this._seekPrevElm,"click",this.changeToPreviousPage.bind(this)),this._bindingEventService.bind(this._itemPerPageElm,"change",this.updateItemsPerPage.bind(this))}changeToFirstPage(e){this.isLeftPaginationDisabled||this.paginationService.goToFirstPage(e)}changeToLastPage(e){this.isRightPaginationDisabled||this.paginationService.goToLastPage(e)}changeToNextPage(e){this.isRightPaginationDisabled||this.paginationService.goToNextPage(e)}changeToPreviousPage(e){this.isLeftPaginationDisabled||this.paginationService.goToPreviousPage(e)}changeToCurrentPage(e){this.paginationService.goToPageNumber(+e)}updateItemsPerPage(e){this.itemsPerPage=+(e?.target?.value??0)}translatePaginationTexts(){if(this._enableTranslate&&this.translaterService?.translate){const e=Gl(this.gridOptions);this.textItemsPerPage=this.translaterService.translate(`${e}ITEMS_PER_PAGE`),this.textItems=this.translaterService.translate(`${e}ITEMS`),this.textOf=this.translaterService.translate(`${e}OF`),this.textPage=this.translaterService.translate(`${e}PAGE`)}else this.locales&&(this.textItemsPerPage=this.locales.TEXT_ITEMS_PER_PAGE||"TEXT_ITEMS_PER_PAGE",this.textItems=this.locales.TEXT_ITEMS||"TEXT_ITEMS",this.textOf=this.locales.TEXT_OF||"TEXT_OF",this.textPage=this.locales.TEXT_PAGE||"TEXT_PAGE")}createPaginationContainer(){const e=T("div",{id:"pager",className:`slick-pagination-container ${this.gridUid} pager`,style:{width:"100%"}}),a=T("div",{className:"slick-pagination"});return e.appendChild(a),this._paginationElement=e,a}createPageNumberSection(){const e=T("div",{className:"slick-page-number"});return T("span",{className:"text-page",textContent:"Page"},e),e.appendChild(document.createTextNode(" ")),this.paginationService.isCursorBased?T("span",{className:"page-number",ariaLabel:"Page Number",dataset:{test:"page-number-label"},textContent:"1"},e):T("input",{type:"text",className:"form-control page-number",ariaLabel:"Page Number",value:"1",size:1,dataset:{test:"page-number-input"}},e),e.appendChild(document.createTextNode(" ")),T("span",{className:"text-of",textContent:"of"},e),e.appendChild(document.createTextNode(" ")),T("span",{className:"page-count",dataset:{test:"page-count"}},e),e}createPaginationSettingsSection(){const e=T("span",{className:"slick-pagination-settings"});this._itemPerPageElm=T("select",{id:"items-per-page-label",ariaLabel:"Items per Page",className:"items-per-page"},e),e.appendChild(document.createTextNode(" ")),T("span",{className:"text-item-per-page",textContent:"items per page"},e),e.appendChild(document.createTextNode(", "));const a=T("span",{className:"slick-pagination-count"},e);this._spanInfoFromToElm=T("span",{className:"page-info-from-to"},a),T("span",{className:"item-from",ariaLabel:"Page Item From",dataset:{test:"item-from"}},this._spanInfoFromToElm),this._spanInfoFromToElm.appendChild(document.createTextNode("-")),T("span",{className:"item-to",ariaLabel:"Page Item To",dataset:{test:"item-to"}},this._spanInfoFromToElm),this._spanInfoFromToElm.appendChild(document.createTextNode(" ")),T("span",{className:"text-of",textContent:"of"},this._spanInfoFromToElm),this._spanInfoFromToElm.appendChild(document.createTextNode(" "));const u=T("span",{className:"page-info-total-items"},a);return T("span",{className:"total-items",ariaLabel:"Total Items",dataset:{test:"total-items"}},u),u.appendChild(document.createTextNode(" ")),T("span",{className:"text-items",textContent:"items"},u),u.appendChild(document.createTextNode(" ")),e}updatePageButtonsUsability(){this.firstButtonClasses=this.isLeftPaginationDisabled?"page-item seek-first disabled":"page-item seek-first",this.prevButtonClasses=this.isLeftPaginationDisabled?"page-item seek-prev disabled":"page-item seek-prev",this.lastButtonClasses=this.isRightPaginationDisabled?"page-item seek-end disabled":"page-item seek-end",this.nextButtonClasses=this.isRightPaginationDisabled?"page-item seek-next disabled":"page-item seek-next"}}class z4e{constructor(){this.className="RxJsResource"}get EMPTY(){return Ju}createObservable(){return new ht}createSubject(){return new sa}firstValueFrom(e){return function B4e(t,e){const a="object"==typeof e;return new Promise((u,i)=>{const r=new Ar({next:o=>{u(o),r.unsubscribe()},error:i,complete:()=>{a?u(e.defaultValue):i(new yi)}});t.subscribe(r)})}(e)}iif(e,a,u){return function S4e(t,e,a){return d2(()=>t()?e:a)}(e,a,u)}isObservable(e){return Js(e)}of(...e){return $e(...e)}switchMap(e){return Do(e)}takeUntil(e){return Fh(e)}}class M4e{static#e=this.locales={TEXT_ALL_SELECTED:"All Selected",TEXT_ALL_X_RECORDS_SELECTED:"All {{x}} records selected",TEXT_APPLY_MASS_UPDATE:"Apply Mass Update",TEXT_APPLY_TO_SELECTION:"Update Selection",TEXT_CANCEL:"Cancel",TEXT_CLEAR_ALL_FILTERS:"Clear all Filters",TEXT_CLEAR_ALL_GROUPING:"Clear all Grouping",TEXT_CLEAR_ALL_SORTING:"Clear all Sorting",TEXT_CLEAR_PINNING:"Unfreeze Columns/Rows",TEXT_CLONE:"Clone",TEXT_COLLAPSE_ALL_GROUPS:"Collapse all Groups",TEXT_CONTAINS:"Contains",TEXT_COLUMNS:"Columns",TEXT_COLUMN_RESIZE_BY_CONTENT:"Resize by Content",TEXT_COMMANDS:"Commands",TEXT_COPY:"Copy",TEXT_EQUALS:"Equals",TEXT_EQUAL_TO:"Equal to",TEXT_ENDS_WITH:"Ends With",TEXT_ERROR_EDITABLE_GRID_REQUIRED:"Your grid must be editable in order to use the Composite Editor Modal.",TEXT_ERROR_ENABLE_CELL_NAVIGATION_REQUIRED:'Composite Editor requires the flag "enableCellNavigation" to be set to True in your Grid Options.',TEXT_ERROR_NO_CHANGES_DETECTED:"Sorry we could not detect any changes.",TEXT_ERROR_NO_EDITOR_FOUND:"We could not find any Editor in your Column Definition.",TEXT_ERROR_NO_RECORD_FOUND:"No records selected for edit or clone operation.",TEXT_ERROR_ROW_NOT_EDITABLE:"Current row is not editable.",TEXT_ERROR_ROW_SELECTION_REQUIRED:"You must select some rows before trying to apply new value(s).",TEXT_EXPAND_ALL_GROUPS:"Expand all Groups",TEXT_EXPORT_TO_CSV:"Export in CSV format",TEXT_EXPORT_TO_TEXT_FORMAT:"Export in Text format (Tab delimited)",TEXT_EXPORT_TO_EXCEL:"Export to Excel",TEXT_EXPORT_TO_TAB_DELIMITED:"Export in Text format (Tab delimited)",TEXT_FORCE_FIT_COLUMNS:"Force fit columns",TEXT_FREEZE_COLUMNS:"Freeze Columns",TEXT_GREATER_THAN:"Greater than",TEXT_GREATER_THAN_OR_EQUAL_TO:"Greater than or equal to",TEXT_GROUP_BY:"Group By",TEXT_HIDE_COLUMN:"Hide Column",TEXT_ITEMS:"items",TEXT_ITEMS_PER_PAGE:"items per page",TEXT_ITEMS_SELECTED:"items selected",TEXT_OF:"of",TEXT_OK:"OK",TEXT_LAST_UPDATE:"Last Update",TEXT_LESS_THAN:"Less than",TEXT_LESS_THAN_OR_EQUAL_TO:"Less than or equal to",TEXT_NO_ELEMENTS_FOUND:"Aucun \xe9l\xe9ment trouv\xe9",TEXT_NOT_CONTAINS:"Not contains",TEXT_NOT_EQUAL_TO:"Not equal to",TEXT_PAGE:"Page",TEXT_REFRESH_DATASET:"Refresh Dataset",TEXT_REMOVE_FILTER:"Remove Filter",TEXT_REMOVE_SORT:"Remove Sort",TEXT_SAVE:"Save",TEXT_SELECT_ALL:"Select All",TEXT_SYNCHRONOUS_RESIZE:"Synchronous resize",TEXT_SORT_ASCENDING:"Sort Ascending",TEXT_SORT_DESCENDING:"Sort Descending",TEXT_STARTS_WITH:"Starts With",TEXT_TOGGLE_DARK_MODE:"Toggle Dark Mode",TEXT_TOGGLE_FILTER_ROW:"Toggle Filter Row",TEXT_TOGGLE_PRE_HEADER_ROW:"Toggle Pre-Header Row",TEXT_X_OF_Y_SELECTED:"# of % selected",TEXT_X_OF_Y_MASS_SELECTED:"{{x}} of {{y}} selected"};static#a=this.treeDataProperties={CHILDREN_PROP:"children",COLLAPSED_PROP:"__collapsed",HAS_CHILDREN_PROP:"__hasChildren",TREE_LEVEL_PROP:"__treeLevel",PARENT_PROP:"__parentId"};static#t=this.VALIDATION_REQUIRED_FIELD="Field is required";static#u=this.VALIDATION_EDITOR_VALID_NUMBER="Please enter a valid number";static#i=this.VALIDATION_EDITOR_VALID_INTEGER="Please enter a valid integer number";static#n=this.VALIDATION_EDITOR_INTEGER_BETWEEN="Please enter a valid integer number between {{minValue}} and {{maxValue}}";static#r=this.VALIDATION_EDITOR_INTEGER_MAX="Please enter a valid integer number that is lower than {{maxValue}}";static#o=this.VALIDATION_EDITOR_INTEGER_MAX_INCLUSIVE="Please enter a valid integer number that is lower than or equal to {{maxValue}}";static#l=this.VALIDATION_EDITOR_INTEGER_MIN="Please enter a valid integer number that is greater than {{minValue}}";static#s=this.VALIDATION_EDITOR_INTEGER_MIN_INCLUSIVE="Please enter a valid integer number that is greater than or equal to {{minValue}}";static#d=this.VALIDATION_EDITOR_NUMBER_BETWEEN="Please enter a valid number between {{minValue}} and {{maxValue}}";static#c=this.VALIDATION_EDITOR_NUMBER_MAX="Please enter a valid number that is lower than {{maxValue}}";static#h=this.VALIDATION_EDITOR_NUMBER_MAX_INCLUSIVE="Please enter a valid number that is lower than or equal to {{maxValue}}";static#m=this.VALIDATION_EDITOR_NUMBER_MIN="Please enter a valid number that is greater than {{minValue}}";static#p=this.VALIDATION_EDITOR_NUMBER_MIN_INCLUSIVE="Please enter a valid number that is greater than or equal to {{minValue}}";static#g=this.VALIDATION_EDITOR_DECIMAL_BETWEEN="Please enter a valid number with a maximum of {{maxDecimal}} decimals";static#E=this.VALIDATION_EDITOR_TEXT_LENGTH_BETWEEN="Please make sure your text length is between {{minLength}} and {{maxLength}} characters";static#v=this.VALIDATION_EDITOR_TEXT_MAX_LENGTH="Please make sure your text is less than {{maxLength}} characters";static#b=this.VALIDATION_EDITOR_TEXT_MAX_LENGTH_INCLUSIVE="Please make sure your text is less than or equal to {{maxLength}} characters";static#k=this.VALIDATION_EDITOR_TEXT_MIN_LENGTH="Please make sure your text is more than {{minLength}} character(s)";static#x=this.VALIDATION_EDITOR_TEXT_MIN_LENGTH_INCLUSIVE="Please make sure your text is at least {{minLength}} character(s)"}let N7=class{get paginationOptions(){return this._paginationOptions}set paginationOptions(e){e&&this._paginationOptions?this._paginationOptions={...this.gridOptions.pagination,...this._paginationOptions,...e}:this._paginationOptions=e,this.gridOptions.pagination=this._paginationOptions??this.gridOptions.pagination,this.paginationService.updateTotalItems(this.gridOptions.pagination?.totalItems??0,!0)}set columnDefinitions(e){this._columnDefinitions=e,this._isGridInitialized&&this.updateColumnDefinitionsList(e),e.length>0&&this.copyColumnWidthsReference(e)}get columnDefinitions(){return this._columnDefinitions}get dataset(){return(this.customDataView?this.slickGrid?.getData?.():this.dataView?.getItems())||[]}set dataset(e){const a=this._currentDatasetLength,u=H0(e,this._dataset||[]);let i=e;this.slickGrid&&this.gridOptions?.enableTreeData&&Array.isArray(e)&&(e.length>0||e.length!==a||!u)&&(this._isDatasetHierarchicalInitialized=!1,i=this.sortTreeDataset(e,!u)),this._dataset=i,this.refreshGridData(i||[]),this._currentDatasetLength=(e||[]).length,this.slickGrid&&this.gridOptions?.autoFitColumnsOnFirstLoad&&0===a&&!this._isAutosizeColsCalled&&(this.slickGrid.autosizeColumns(),this._isAutosizeColsCalled=!0)}get datasetHierarchical(){return this.sharedService.hierarchicalDataset}set datasetHierarchical(e){const a=H0(e,this.sharedService?.hierarchicalDataset??[]),u=this._currentDatasetLength;this.sharedService.hierarchicalDataset=e,e&&this.columnDefinitions&&this.filterService?.clearFilters&&this.filterService.clearFilters(),e&&this.slickGrid&&this.sortService?.processTreeDataInitialSort&&(this.sortService.processTreeDataInitialSort(),queueMicrotask(()=>{const i=this.dataView.getItemCount();i>0&&(i!==u||!a)&&this.filterService.refreshTreeDataFilters()}),this._isDatasetHierarchicalInitialized=!0)}get elementRef(){return this.elm}get backendService(){return this.gridOptions?.backendServiceApi?.service}get eventHandler(){return this._eventHandler}get gridContainerElement(){return document.querySelector(`#${this.gridOptions.gridContainerId||""}`)}get isDatasetInitialized(){return this._isDatasetInitialized}set isDatasetInitialized(e){this._isDatasetInitialized=e}set isDatasetHierarchicalInitialized(e){this._isDatasetHierarchicalInitialized=e}get registeredResources(){return this._registeredResources}constructor(e,a,u,i,r,o,d,h,m){this.angularUtilService=e,this.appRef=a,this.cd=u,this.containerService=i,this.elm=r,this.translate=o,this.translaterService=d,this.forRootConfig=h,this._currentDatasetLength=0,this._darkMode=!1,this._eventHandler=new Ut,this._hideHeaderRowAfterPageLoad=!1,this._isAutosizeColsCalled=!1,this._isGridInitialized=!1,this._isDatasetInitialized=!1,this._isDatasetHierarchicalInitialized=!1,this._isPaginationInitialized=!1,this._isLocalGrid=!0,this._registeredResources=[],this._scrollEndCalled=!1,this.groupingDefinition={},this.showPagination=!1,this.serviceList=[],this.totalItems=0,this.subscriptions=[],this.gridId="",this.columnDefinitionsChange=new Ue(!0);const g=new f4e;this._eventPubSubService=m?.eventPubSubService??new rce(this.elm.nativeElement),this._eventPubSubService.eventNamingStyle=R0.camelCase,this.backendUtilityService=m?.backendUtilityService??new AG,this.gridEventService=m?.gridEventService??new Rhe,this.sharedService=m?.sharedService??new $he,this.collectionService=m?.collectionService??new JK(this.translaterService),this.extensionUtility=m?.extensionUtility??new w1e(this.sharedService,this.backendUtilityService,this.translaterService),this.filterFactory=new wme(g,this.translaterService,this.collectionService),this.filterService=m?.filterService??new Nhe(this.filterFactory,this._eventPubSubService,this.sharedService,this.backendUtilityService),this.resizerService=m?.resizerService??new Zhe(this._eventPubSubService),this.sortService=m?.sortService??new qhe(this.sharedService,this._eventPubSubService,this.backendUtilityService),this.treeDataService=m?.treeDataService??new Yhe(this._eventPubSubService,this.sharedService,this.sortService),this.paginationService=m?.paginationService??new Ohe(this._eventPubSubService,this.sharedService,this.backendUtilityService),this.extensionService=m?.extensionService??new _he(this.extensionUtility,this.filterService,this._eventPubSubService,this.sharedService,this.sortService,this.treeDataService,this.translaterService,()=>this.gridService),this.gridStateService=m?.gridStateService??new Hhe(this.extensionService,this.filterService,this._eventPubSubService,this.sharedService,this.sortService,this.treeDataService),this.gridService=m?.gridService??new Ihe(this.gridStateService,this.filterService,this._eventPubSubService,this.paginationService,this.sharedService,this.sortService,this.treeDataService),this.groupingService=m?.groupingAndColspanService??new Vhe(this.extensionUtility,this._eventPubSubService),this.serviceList=[this.containerService,this.extensionService,this.filterService,this.gridEventService,this.gridService,this.gridStateService,this.groupingService,this.paginationService,this.resizerService,this.sortService,this.treeDataService],this.containerService.registerInstance("ExtensionUtility",this.extensionUtility),this.containerService.registerInstance("FilterService",this.filterService),this.containerService.registerInstance("CollectionService",this.collectionService),this.containerService.registerInstance("ExtensionService",this.extensionService),this.containerService.registerInstance("GridEventService",this.gridEventService),this.containerService.registerInstance("GridService",this.gridService),this.containerService.registerInstance("GridStateService",this.gridStateService),this.containerService.registerInstance("GroupingAndColspanService",this.groupingService),this.containerService.registerInstance("PaginationService",this.paginationService),this.containerService.registerInstance("ResizerService",this.resizerService),this.containerService.registerInstance("SharedService",this.sharedService),this.containerService.registerInstance("SortService",this.sortService),this.containerService.registerInstance("EventPubSubService",this._eventPubSubService),this.containerService.registerInstance("PubSubService",this._eventPubSubService),this.containerService.registerInstance("TranslaterService",this.translaterService),this.containerService.registerInstance("TreeDataService",this.treeDataService)}ngAfterViewInit(){if(!this.gridOptions||!this.columnDefinitions)throw new Error("Using `` requires [gridOptions] and [columnDefinitions], it seems that you might have forgot to provide them since at least of them is undefined.");if(this.initialization(this._eventHandler),this._isGridInitialized=!0,this.gridOptions?.enableEmptyDataWarningMessage&&Array.isArray(this.dataset)){const e=this.dataset.length;this.displayEmptyDataWarning(e<1)}this.gridOptions.darkMode&&this.setDarkMode(!0)}ngOnDestroy(){this._eventPubSubService.publish("onBeforeGridDestroy",this.slickGrid),this.destroy(),this._eventPubSubService.publish("onAfterGridDestroyed",!0)}destroy(e=!1){if(this.serviceList.forEach(a=>{a&&a.dispose&&a.dispose()}),this.serviceList=[],this.backendService?.dispose?.(),this.disposeExternalResources(),this.slickEmptyWarning?.dispose(),this.slickFooter?.dispose(),this.slickPagination?.dispose(),this._eventHandler?.unsubscribeAll&&this._eventHandler.unsubscribeAll(),this._eventPubSubService?.unsubscribeAll(),this.dataView&&(this.dataView.setItems([]),this.dataView.destroy()),this.slickGrid?.destroy&&this.slickGrid.destroy(e),this.backendServiceApi){for(const a of Object.keys(this.backendServiceApi))delete this.backendServiceApi[a];this.backendServiceApi=void 0}for(const a of Object.keys(this.columnDefinitions))this.columnDefinitions[a]=null;for(const a of Object.keys(this.sharedService))this.sharedService[a]=null;e&&this.emptyGridContainerElm(),this.subscriptions=H2(this.subscriptions),this._dataset=null,this.datasetHierarchical=void 0,this._columnDefinitions=[],this._angularGridInstances=void 0,this.slickGrid=void 0}disposeExternalResources(){if(Array.isArray(this._registeredResources))for(;this._registeredResources.length>0;){const e=this._registeredResources.pop();e?.dispose&&e.dispose()}this._registeredResources=[]}emptyGridContainerElm(){const e=this.gridOptions?.gridContainerId??"grid1";_t(document.querySelector(`#${e}`))}createBackendApiInternalPostProcessCallback(e){const a=e&&e.backendServiceApi;if(a&&a.service){const u=a.service;"function"==typeof u.getDatasetName&&(a.internalPostProcess=i=>{const r=a&&u&&"function"==typeof u.getDatasetName?u.getDatasetName():"";if(i?.data[r]){const o=i.data[r].hasOwnProperty("nodes")?i.data[r].nodes:i.data[r],d=i.data[r].hasOwnProperty("totalCount")?i.data[r].totalCount:i.data[r].length;this.refreshGridData(o,d||0)}})}}initialization(e){if(this.gridOptions.translater=this.translaterService,this._eventHandler=e,this._isAutosizeColsCalled=!1,this.gridOptions&&(void 0!==this.gridOptions.frozenRow&&this.gridOptions.frozenRow>=0||void 0!==this.gridOptions.frozenColumn&&this.gridOptions.frozenColumn>=0)&&void 0===this.gridOptions.enableMouseWheelScrollHandler&&(this.gridOptions.enableMouseWheelScrollHandler=!0),this._eventPubSubService.eventNamingStyle=this.gridOptions?.eventNamingStyle??R0.camelCase,this._eventPubSubService.publish("onBeforeGridCreate",!0),this._dataset=this._dataset||[],this.gridOptions=this.mergeGridOptions(this.gridOptions),this._paginationOptions=this.gridOptions?.pagination,this.locales=this.gridOptions?.locales??M4e.locales,this.backendServiceApi=this.gridOptions?.backendServiceApi,this._isLocalGrid=!this.backendServiceApi,this.gridOptions.backendServiceApi&&!this.gridOptions.backendServiceApi?.disableInternalPostProcess&&this.createBackendApiInternalPostProcessCallback(this.gridOptions),!this.customDataView){const u=this.gridOptions?.dataView?.inlineFilters??!1;let i={...this.gridOptions.dataView,inlineFilters:u};(this.gridOptions.draggableGrouping||this.gridOptions.enableGrouping)&&(this.groupItemMetadataProvider=new qK,this.sharedService.groupItemMetadataProvider=this.groupItemMetadataProvider,i={...i,groupItemMetadataProvider:this.groupItemMetadataProvider}),this.dataView=new M1e(i,this._eventPubSubService),this._eventPubSubService.publish("onDataviewCreated",this.dataView)}this.preRegisterResources(),this._columnDefinitions=this.loadSlickGridEditors(this._columnDefinitions||[]),this.gridOptions.autoAddCustomEditorFormatter&&function khe(t,e){if(Array.isArray(t))for(const a of t)if(a.editor)if(a.formatter&&a.formatter!==y7&&a.formatter!==e){const u=a.formatter;a.formatter=y7,a.params={...a.params,formatters:[u,e]}}else a.formatter&&a.formatter===y7&&a.params?-1===a.params.formatters.findIndex(u=>u===e)&&(a.params.formatters=[...a.params.formatters,e]):a.formatter=e}(this._columnDefinitions,this.gridOptions.autoAddCustomEditorFormatter),this.sharedService.allColumns=this._columnDefinitions,this.sharedService.visibleColumns=this._columnDefinitions,this.subscriptions.push(this._eventPubSubService.subscribe("onPluginColumnsChanged",u=>{this._columnDefinitions=u.columns,this.columnDefinitionsChange.emit(this._columnDefinitions)})),this.extensionService.createExtensionsBeforeGridCreation(this._columnDefinitions,this.gridOptions),this.gridOptions.presets?.pinning&&(this.gridOptions={...this.gridOptions,...this.gridOptions.presets.pinning}),this.slickGrid=new che(`#${this.gridId}`,this.customDataView||this.dataView,this._columnDefinitions,this.gridOptions,this._eventPubSubService),this.sharedService.dataView=this.dataView,this.sharedService.slickGrid=this.slickGrid,this.sharedService.gridContainerElement=this.elm.nativeElement,this.groupItemMetadataProvider&&this.slickGrid.registerPlugin(this.groupItemMetadataProvider),this.extensionService.bindDifferentExtensions(),this.bindDifferentHooks(this.slickGrid,this.gridOptions,this.dataView);const a=void 0!==this.gridOptions.frozenColumn?this.gridOptions.frozenColumn:-1;if(a>=0&&a<=this._columnDefinitions.length&&(this.sharedService.frozenVisibleColumnId=this._columnDefinitions[a].id||""),this.registerResources(),this.slickGrid.init(),this.gridContainerElement&&this.resizerService.init(this.slickGrid,this.gridContainerElement),!this.gridOptions.enablePagination&&this.gridOptions.showCustomFooter&&this.gridOptions.customFooterOptions&&this.gridContainerElement&&(this.slickFooter=new A4e(this.slickGrid,this.gridOptions.customFooterOptions,this._eventPubSubService,this.translaterService),this.slickFooter.renderFooter(this.gridContainerElement)),!this.customDataView&&this.dataView){const u=this.gridOptions?.enableTreeData?this.sortTreeDataset(this._dataset):this._dataset;if(this.dataView.beginUpdate(),this.dataView.setItems(u||[],this.gridOptions.datasetIdPropertyName??"id"),this.dataView.endUpdate(),this.slickGrid?.getSelectionModel()&&this.gridOptions?.dataView?.hasOwnProperty("syncGridSelection")){let r=!1;this.gridOptions.backendServiceApi&&this.gridOptions.dataView.hasOwnProperty("syncGridSelectionWithBackendService")&&(r=this.gridOptions.dataView.syncGridSelectionWithBackendService);const o=this.gridOptions.dataView.syncGridSelection;if("boolean"==typeof o){let d=o;this._isLocalGrid||(d=o&&r),this.dataView.syncGridSelection(this.slickGrid,d)}else"object"==typeof o&&this.dataView.syncGridSelection(this.slickGrid,o.preserveHidden,o.preserveHiddenOnSelectionChange)}(this.dataView.getLength()||this._dataset&&this._dataset.length||0)>0&&(!this._isDatasetInitialized&&(this.gridOptions.enableCheckboxSelector||this.gridOptions.enableRowSelection)&&this.loadRowSelectionPresetWhenExists(),this.loadFilterPresetsWhenDatasetInitialized(),this._isDatasetInitialized=!0)}this._hideHeaderRowAfterPageLoad&&(this.showHeaderRow(!1),this.sharedService.hideHeaderRowAfterPageLoad=this._hideHeaderRowAfterPageLoad),this._eventPubSubService.publish("onGridCreated",this.slickGrid),this.customDataView||this.executeAfterDataviewCreated(this.slickGrid,this.gridOptions),this.bindResizeHook(this.slickGrid,this.gridOptions),this.gridOptions?.backendServiceApi&&this.bindBackendCallbackFunctions(this.gridOptions),this.gridOptions?.enablePagination&&this._isLocalGrid&&(this.showPagination=!0,this.loadLocalGridPagination(this.dataset)),this._angularGridInstances={dataView:this.dataView,slickGrid:this.slickGrid,extensions:this.extensionService?.extensionList,destroy:this.destroy.bind(this),backendService:this.backendService,eventPubSubService:this._eventPubSubService,filterService:this.filterService,gridEventService:this.gridEventService,gridStateService:this.gridStateService,gridService:this.gridService,groupingService:this.groupingService,extensionService:this.extensionService,paginationService:this.paginationService,resizerService:this.resizerService,sortService:this.sortService,treeDataService:this.treeDataService},this._eventPubSubService.publish("onAngularGridCreated",this._angularGridInstances)}paginationChanged(e){const a=this.gridStateService?.needToPreserveRowSelection()??!1;this.slickGrid&&!a&&this.gridOptions?.backendServiceApi&&(this.gridOptions.enableRowSelection||this.gridOptions.enableCheckboxSelector)&&this.slickGrid.setSelectedRows([]);const{pageNumber:u,pageSize:i}=e;this.sharedService&&void 0!==i&&void 0!==u&&(this.sharedService.currentPagination={pageNumber:u,pageSize:i}),this._eventPubSubService.publish("onGridStateChanged",{change:{newValues:{pageNumber:u,pageSize:i},type:Er.pagination},gridState:this.gridStateService.getCurrentGridState()}),this.cd.markForCheck()}refreshGridData(e,a){if(this.gridOptions&&this.gridOptions.enableEmptyDataWarningMessage&&Array.isArray(e)){const u=a||e.length;this.displayEmptyDataWarning(u<1)}if(Array.isArray(e)&&this.slickGrid&&this.dataView?.setItems){if(this.dataView.setItems(e,this.gridOptions.datasetIdPropertyName??"id"),!this.gridOptions.backendServiceApi&&!this.gridOptions.enableTreeData&&this.dataView.reSort(),e.length>0&&(this._isDatasetInitialized||(this.loadFilterPresetsWhenDatasetInitialized(),this.gridOptions.enableCheckboxSelector&&this.loadRowSelectionPresetWhenExists()),this._isDatasetInitialized=!0),e&&this.slickGrid.invalidate(),this.showPagination=!(!this.gridOptions||!(this.gridOptions.enablePagination||this.gridOptions.backendServiceApi&&void 0===this.gridOptions.enablePagination)),this._paginationOptions&&this.gridOptions?.pagination&&this.gridOptions?.backendServiceApi){const u=this.setPaginationOptionsWhenPresetDefined(this.gridOptions,this._paginationOptions),i=void 0!==a?a:this.gridOptions?.pagination?.totalItems;void 0!==i&&i!==this.totalItems&&(this.totalItems=+i),this._isPaginationInitialized?this.paginationService.updateTotalItems(this.totalItems):this.initializePaginationService(u)}if(this.slickGrid&&this.gridOptions.enableAutoResize){const u=this.gridOptions.autoResize&&this.gridOptions.autoResize.delay;this.resizerService.resizeGrid(u||10)}}}setData(e,a=!1){a&&(this._isAutosizeColsCalled=!1,this._currentDatasetLength=0),this.dataset=e||[]}setPaginationOptionsWhenPresetDefined(e,a){return e.presets?.pagination&&a&&!this._isPaginationInitialized&&(this.hasBackendInfiniteScroll()?console.warn("[Angular-Slickgrid] `presets.pagination` is not supported with Infinite Scroll, reverting to first page."):(a.pageSize=e.presets.pagination.pageSize,a.pageNumber=e.presets.pagination.pageNumber)),a}setDarkMode(e=!1){e?this.sharedService.gridContainerElement?.classList.add("slick-dark-mode"):this.sharedService.gridContainerElement?.classList.remove("slick-dark-mode")}updateColumnDefinitionsList(e){e=this.loadSlickGridEditors(e),this.gridOptions.enableTranslate?this.extensionService.translateColumnHeaders(void 0,e):this.extensionService.renderColumnHeaders(e,!0),this.gridOptions?.enableAutoSizeColumns?this.slickGrid.autosizeColumns():this.gridOptions?.enableAutoResizeColumnsByCellContent&&this.resizerService?.resizeColumnsByCellContent&&this.resizerService.resizeColumnsByCellContent()}showHeaderRow(e=!0){return this.slickGrid.setHeaderRowVisibility(e),!0===e&&this._isGridInitialized&&this.slickGrid.setColumns(this.columnDefinitions),e}copyColumnWidthsReference(e){e.forEach(a=>a.originalWidth=a.width)}displayEmptyDataWarning(e=!0){this.slickEmptyWarning?.showEmptyDataMessage(e)}bindDifferentHooks(e,a,u){if(this.translate?.onLangChange&&(a.enableTranslate&&this.extensionService.translateAllExtensions(),this.subscriptions.push(this.translate.onLangChange.subscribe(({lang:i})=>{this._eventPubSubService.publish("onLanguageChange"),a.enableTranslate&&(this.extensionService.translateAllExtensions(i),(a.createPreHeaderPanel&&a.createTopHeaderPanel||a.createPreHeaderPanel&&!a.enableDraggableGrouping)&&this.groupingService.translateGroupingAndColSpan())}))),a.backendServiceApi){const i=a.backendServiceApi;i?.service?.init&&i.service.init(i.options,a.pagination,this.slickGrid,this.sharedService)}u&&e&&(this.gridEventService.bindOnCellChange(e),this.gridEventService.bindOnClick(e),u&&e&&(a.enableSorting&&(a.backendServiceApi&&!a.backendServiceApi.useLocalSorting?this.sortService.bindBackendOnSort(e):this.sortService.bindLocalOnSort(e)),a.enableFiltering&&(this.filterService.init(e),a.backendServiceApi&&!a.backendServiceApi.useLocalFiltering?this.filterService.bindBackendOnFilter(e):this.filterService.bindLocalOnFilter(e)),this._eventHandler.subscribe(e.onColumnsReordered,(i,r)=>{this.sharedService.hasColumnsReordered=!0,this.sharedService.visibleColumns=r.impactedColumns}),this._eventHandler.subscribe(e.onSetOptions,(i,r)=>{r.optionsBefore.darkMode!==r.optionsAfter.darkMode&&this.gridContainerElement&&this.setDarkMode(r.optionsAfter.darkMode)}),this.loadColumnPresetsWhenDatasetInitialized(),this.loadFilterPresetsWhenDatasetInitialized(),this._eventHandler.subscribe(u.onRowCountChanged,()=>{e.invalidate(),this.handleOnItemCountChanged(u.getFilteredItemCount()||0,u.getItemCount()||0)}),this._eventHandler.subscribe(u.onSetItemsCalled,(i,r)=>{this.handleOnItemCountChanged(u.getFilteredItemCount()||0,r.itemCount),r.itemCount>0&&(this.gridOptions.autosizeColumnsByCellContentOnFirstLoad||this.gridOptions.enableAutoResizeColumnsByCellContent)&&this.resizerService.resizeColumnsByCellContent(!this.gridOptions?.resizeByContentOnlyOnFirstLoad)}),a?.enableFiltering&&!a.enableRowDetailView&&this._eventHandler.subscribe(u.onRowsChanged,(i,r)=>{r?.rows&&Array.isArray(r.rows)&&(r.rows.forEach(o=>e.updateRow(o)),e.render())}))),a&&a.colspanCallback&&u&&u.getItem&&u.getItemMetadata&&(u.getItemMetadata=i=>{let r=null;return a.colspanCallback&&a.colspanCallback&&(r=a.colspanCallback(u.getItem(i))),r})}bindBackendCallbackFunctions(e){const a=e.backendServiceApi,u=a&&a.service,i=u?.options??{},r=!!i&&(!i||!i.hasOwnProperty("executeProcessCommandOnInit")||i.executeProcessCommandOnInit);if(u){if(e&&e.presets){if(u.updateFilters&&Array.isArray(e.presets.filters)&&e.presets.filters.length>0&&u.updateFilters(e.presets.filters,!0),u.updateSorters&&Array.isArray(e.presets.sorters)&&e.presets.sorters.length>0){const o=this.gridOptions.multiColumnSort?e.presets.sorters:e.presets.sorters.slice(0,1);u.updateSorters(void 0,o)}if(u.updatePagination&&e.presets.pagination&&!this.hasBackendInfiniteScroll()){const{pageNumber:o,pageSize:d}=e.presets.pagination;u.updatePagination(o,d)}}else{const o=this.filterService.getColumnFilters();o&&u.updateFilters&&u.updateFilters(o,!1)}if(a&&u&&(a.onInit||r)){const o="function"==typeof u.buildQuery?u.buildQuery():"",d=r?a.process&&a.process(o)||null:a.onInit&&a.onInit(o)||null;queueMicrotask(()=>{const h=this.backendUtilityService,m=new Date;a.preProcess&&a.preProcess();const g=this.gridOptions?.pagination?.totalItems??0;d instanceof Promise?d.then(v=>h.executeBackendProcessesCallback(m,v,a,g)).catch(v=>h.onBackendError(v,a)):d&&this.rxjs?.isObservable(d)&&this.subscriptions.push(d.subscribe({next:v=>h.executeBackendProcessesCallback(m,v,a,g),error:v=>h.onBackendError(v,a)}))})}a.service.options?.infiniteScroll&&this.addBackendInfiniteScrollCallback()}}addBackendInfiniteScrollCallback(){if(this.slickGrid&&this.gridOptions.backendServiceApi&&this.hasBackendInfiniteScroll()&&!this.gridOptions.backendServiceApi?.onScrollEnd){const e=()=>{this.backendUtilityService.setInfiniteScrollBottomHit(!0),this.paginationService.goToNextPage().then(u=>{u||this.backendUtilityService.setInfiniteScrollBottomHit(!1)})};this.gridOptions.backendServiceApi.onScrollEnd=e,this._eventHandler.subscribe(this.slickGrid.onScroll,(u,i)=>{const r=i.grid.getViewportNode();["mousewheel","scroll"].includes(i.triggeredBy||"")&&this.paginationService?.totalItems&&i.scrollTop>0&&Math.ceil(r.offsetHeight+i.scrollTop)>=i.scrollHeight&&(this._scrollEndCalled||(e(),this._scrollEndCalled=!0))});const a=this.gridOptions.backendServiceApi.postProcess;this.gridOptions.backendServiceApi.postProcess=u=>{this._scrollEndCalled=!1,a&&a(u)}}}bindResizeHook(e,a){if(a.autoFitColumnsOnFirstLoad&&a.autosizeColumnsByCellContentOnFirstLoad||a.enableAutoSizeColumns&&a.enableAutoResizeColumnsByCellContent)throw new Error('[Angular-Slickgrid] You cannot enable both autosize/fit viewport & resize by content, you must choose which resize technique to use. You can enable these 2 options ("autoFitColumnsOnFirstLoad" and "enableAutoSizeColumns") OR these other 2 options ("autosizeColumnsByCellContentOnFirstLoad" and "enableAutoResizeColumnsByCellContent").');a.gridHeight||a.gridWidth?this.resizerService.resizeGrid(0,{height:a.gridHeight,width:a.gridWidth}):this.resizerService.resizeGrid(),e&&a?.enableAutoResize&&a.autoFitColumnsOnFirstLoad&&a.enableAutoSizeColumns&&!this._isAutosizeColsCalled&&(e.autosizeColumns(),this._isAutosizeColsCalled=!0)}executeAfterDataviewCreated(e,a){if(a.enableSorting&&a.presets&&Array.isArray(a.presets.sorters)){const u=this.gridOptions.multiColumnSort?a.presets.sorters:a.presets.sorters.slice(0,1);this.sortService.loadGridSorters(u)}}handleOnItemCountChanged(e,a){this._currentDatasetLength=a,this.metrics={startTime:new Date,endTime:new Date,itemCount:e,totalItemCount:a},this.slickFooter&&(this.slickFooter.metrics=this.metrics),this._isLocalGrid&&this.gridOptions?.enableEmptyDataWarningMessage&&this.displayEmptyDataWarning(0===e)}initializePaginationService(e){this.gridOptions&&(this.paginationData={gridOptions:this.gridOptions,paginationService:this.paginationService},this.paginationService.totalItems=this.totalItems,this.paginationService.init(this.slickGrid,e,this.backendServiceApi),this.subscriptions.push(this._eventPubSubService.subscribe("onPaginationChanged",a=>{this.paginationChanged(a)}),this._eventPubSubService.subscribe("onPaginationVisibilityChanged",a=>{this.showPagination=a?.visible??!1,this.gridOptions?.backendServiceApi&&this.backendUtilityService?.refreshBackendDataset(this.gridOptions),this.renderPagination(this.showPagination)})),this.renderPagination(),this._isPaginationInitialized=!0),this.cd.detectChanges()}loadEditorCollectionAsync(e){if(e?.editor){const a=e.editor.collectionAsync;e.editor.disabled=!0,a instanceof ht?this.subscriptions.push(a.subscribe(u=>this.updateEditorCollection(e,u))):a instanceof Promise&&a.then(u=>{Array.isArray(u)&&this.updateEditorCollection(e,u)})}}insertDynamicPresetColumns(e,a){if(this._columnDefinitions){const u=this._columnDefinitions.findIndex(i=>i.id===e);if(u>=0){const i=this._columnDefinitions[u];i?.id===e&&!a.some(r=>r.id===e)&&(u>0?a.splice(u,0,i):a.unshift(i))}}}loadColumnPresetsWhenDatasetInitialized(){if(this.gridOptions.presets&&Array.isArray(this.gridOptions.presets.columns)&&this.gridOptions.presets.columns.length>0){const e=this.gridStateService.getAssociatedGridColumns(this.slickGrid,this.gridOptions.presets.columns);if(e&&Array.isArray(e)&&e.length>0&&Array.isArray(this._columnDefinitions)){if(this.gridOptions.enableRowMoveManager){const a=this.gridOptions?.rowMoveManager?.columnId??"_move";this.insertDynamicPresetColumns(a,e)}if(this.gridOptions.enableCheckboxSelector){const a=this.gridOptions?.checkboxSelector?.columnId??"_checkbox_selector";this.insertDynamicPresetColumns(a,e)}if(this.gridOptions.enableRowDetailView){const a=this.gridOptions?.rowDetailView?.columnId??"_detail_selector";this.insertDynamicPresetColumns(a,e)}e.forEach(a=>a.originalWidth=a.width),this.slickGrid.setColumns(e),this.sharedService.visibleColumns=e}}}loadFilterPresetsWhenDatasetInitialized(){this.gridOptions&&!this.customDataView&&this.gridOptions.presets&&(Array.isArray(this.gridOptions.presets.filters)||Array.isArray(this.gridOptions.presets?.treeData?.toggledItems))&&this.filterService.populateColumnFilterSearchTermPresets(this.gridOptions.presets?.filters||[])}loadLocalGridPagination(e){if(this.gridOptions&&this._paginationOptions){if(this.totalItems=Array.isArray(e)?e.length:0,this._paginationOptions&&this.dataView?.getPagingInfo){const u=this.dataView.getPagingInfo();u?.hasOwnProperty("totalRows")&&this._paginationOptions.totalItems!==u.totalRows&&(this.totalItems=u.totalRows||0)}this._paginationOptions.totalItems=this.totalItems;const a=this.setPaginationOptionsWhenPresetDefined(this.gridOptions,this._paginationOptions);this.initializePaginationService(a)}}loadRowSelectionPresetWhenExists(){const e=this.gridOptions?.presets;if(this.gridOptions&&(this.gridOptions.enableCheckboxSelector||this.gridOptions.enableRowSelection)&&this.slickGrid?.getSelectionModel()&&e?.rowSelection&&(Array.isArray(e.rowSelection.gridRowIndexes)||Array.isArray(e.rowSelection.dataContextIds))){let u=e.rowSelection.dataContextIds,i=e.rowSelection.gridRowIndexes;Array.isArray(u)&&u.length>0?i=this.dataView.mapIdsToRows(u)||[]:Array.isArray(i)&&i.length>0&&(u=this.dataView.mapRowsToIds(i)||[]),this.slickGrid&&Array.isArray(i)&&(this.slickGrid.setSelectedRows(i),this.dataView.setSelectedIds(u||[],{isRowBeingAdded:!0,shouldTriggerEvent:!1,applyRowSelectionToGrid:!0}))}}hasBackendInfiniteScroll(e){return!!(e||this.gridOptions).backendServiceApi?.service.options?.infiniteScroll}mergeGridOptions(e){e.gridId=this.gridId,e.gridContainerId=`slickGridContainer-${this.gridId}`;const a=cu(!0,{},_T,this.forRootConfig,e);return this.hasBackendInfiniteScroll(e)||(e.enablePagination=!!(e.backendServiceApi&&void 0===e.enablePagination||e.enablePagination)),a?.pagination&&(e.enablePagination||e.backendServiceApi)&&(this.forRootConfig.pagination||e.pagination)&&(a.pagination.pageSize=e.pagination?.pageSize??this.forRootConfig.pagination?.pageSize??_T.pagination.pageSize,a.pagination.pageSizes=e.pagination?.pageSizes??this.forRootConfig.pagination?.pageSizes??_T.pagination.pageSizes),this._hideHeaderRowAfterPageLoad=!1===a.showHeaderRow,a.enableFiltering&&!a.showHeaderRow&&(a.showHeaderRow=a.enableFiltering),a&&!a.enableFiltering&&a.enablePagination&&this._isLocalGrid&&(a.enableFiltering=!0,a.showHeaderRow=!1,this._hideHeaderRowAfterPageLoad=!0,this.sharedService&&(this.sharedService.hideHeaderRowAfterPageLoad=!0)),a}registerExternalResources(e,a=!1){a&&this.disposeExternalResources(),e.forEach(u=>this._registeredResources.push(u)),this.initializeExternalResources(e)}resetExternalResources(){this._registeredResources=[]}preRegisterResources(){this._registeredResources=this.gridOptions?.externalResources||[],this.registerRxJsResource(new z4e),this.gridOptions.enableRowDetailView&&(this.slickRowDetailView=new C4e(this.angularUtilService,this.appRef,this._eventPubSubService,this.elm.nativeElement,this.rxjs),this.slickRowDetailView.create(this.columnDefinitions,this.gridOptions),this._registeredResources.push(this.slickRowDetailView),this.extensionService.addExtensionToList(Ea.rowDetailView,{name:Ea.rowDetailView,instance:this.slickRowDetailView}))}initializeExternalResources(e){if(Array.isArray(e))for(const a of e)this.slickGrid&&"function"==typeof a.init&&a.init(this.slickGrid,this.containerService)}registerResources(){Array.isArray(this._registeredResources)&&(this.sharedService.externalRegisteredResources=this._registeredResources),this._registeredResources.push(this.gridService,this.gridStateService),(this.gridOptions.createPreHeaderPanel&&this.gridOptions.createTopHeaderPanel||this.gridOptions.createPreHeaderPanel&&!this.gridOptions.enableDraggableGrouping)&&this._registeredResources.push(this.groupingService),this.gridOptions.enableTreeData&&this._registeredResources.push(this.treeDataService),this.gridOptions.enableTranslate&&this.extensionService.translateColumnHeaders(),this.slickEmptyWarning=new _4e,this._registeredResources.push(this.slickEmptyWarning),this.initializeExternalResources(this._registeredResources)}registerRxJsResource(e){this.rxjs=e,this.backendUtilityService.addRxJsResource(this.rxjs),this.filterFactory.addRxJsResource(this.rxjs),this.filterService.addRxJsResource(this.rxjs),this.sortService.addRxJsResource(this.rxjs),this.paginationService.addRxJsResource(this.rxjs),this.containerService.registerInstance("RxJsResource",this.rxjs)}renderPagination(e=!0){this.gridOptions?.enablePagination&&!this._isPaginationInitialized&&e?(this.slickPagination=new w4e(this.paginationService,this._eventPubSubService,this.sharedService,this.translaterService),this.slickPagination.renderPagination(this.gridContainerElement),this._isPaginationInitialized=!0):e||(this.slickPagination?.dispose(),this._isPaginationInitialized=!1)}sortTreeDataset(e,a=!1){const u=this._currentDatasetLength;let i,r=[];return this._isDatasetHierarchicalInitialized&&this.datasetHierarchical?(i=this.treeDataService.sortHierarchicalDataset(this.datasetHierarchical),r=i.flat):Array.isArray(e)&&e.length>0&&(this.gridOptions?.treeDataOptions?.initialSort?(i=this.treeDataService.convertFlatParentChildToTreeDatasetAndSort(e,this._columnDefinitions,this.gridOptions),this.sharedService.hierarchicalDataset=i.hierarchical,r=i.flat):(this.sharedService.hierarchicalDataset=this.treeDataService.convertFlatParentChildToTreeDataset(e,this.gridOptions),r=e||[])),e.length>0&&(a||e.length!==u)&&this.filterService.refreshTreeDataFilters(r),r}loadSlickGridEditors(e){return e.some(a=>`${a.id}`.includes("."))&&console.error('[Angular-Slickgrid] Make sure that none of your Column Definition "id" property includes a dot in its name because that will cause some problems with the Editors. For example if your column definition "field" property is "user.firstName" then use "firstName" as the column "id".'),e.map(a=>(a?.editor?.collectionAsync&&this.loadEditorCollectionAsync(a),{...a,editorClass:a.editor?.model}))}updateEditorCollection(e,a){if(this.slickGrid&&e.editor){e.editor.collection=a,e.editor.disabled=!1;const u=this.slickGrid.getCellEditor();u?.disable&&u?.renderDomElement&&(u.destroy(),u.disable(!1),u.renderDomElement(a))}}static#e=this.ctorParameters=()=>[{type:ol},{type:An},{type:Xu},{type:mf},{type:Rt},{type:at,decorators:[{type:is}]},{type:pf,decorators:[{type:is}]},{type:void 0,decorators:[{type:c3,args:["config"]}]},{type:void 0,decorators:[{type:c3,args:["externalService"]}]}];static#a=this.propDecorators={customDataView:[{type:Xo}],gridId:[{type:Xo}],gridOptions:[{type:Xo}],paginationOptions:[{type:Xo}],columnDefinitions:[{type:Xo}],columnDefinitionsChange:[{type:l_}],dataset:[{type:Xo}],datasetHierarchical:[{type:Xo}],slickgridHeader:[{type:Uk,args:["slickgridHeader",{static:!0}]}],slickgridFooter:[{type:Uk,args:["slickgridFooter",{static:!0}]}]}};var FT;N7=Ze([ca({selector:"angular-slickgrid",template:'
\n \n
\n
\n \n
',providers:[ol,An,pf]}),Ct("design:paramtypes",[ol,An,Xu,mf,Rt,at,pf,Object,Object])],N7);let AT=FT=class{static forRoot(e={}){return{ngModule:FT,providers:[{provide:"config",useValue:e},{provide:"externalService",useValue:null},ol,mf]}}};AT=FT=Ze([XS({imports:[ah,Ac],declarations:[N7],exports:[N7]})],AT);let I7=class{constructor(){this.title="Example 11: Add / Update / Highlight a Datagrid Item",this.subTitle='\n Add / Update / Hightlight an Item from the Datagrid (Wiki docs).\n
    \n
  • Note: this demo is only on the datagrid (client) side, you still need to deal with the backend yourself
  • \n
  • Adding an item, will always be showing as the 1st item in the grid because that is the best visual place to add it
  • \n
  • Add/Update an item requires a valid Slickgrid Selection Model, you have 2 choices to deal with this:
  • \n
    • You can enable "enableCheckboxSelector" or "enableRowSelection" to True
    \n
  • Click on any of the buttons below to test this out
  • \n
  • You can change the highlighted color & animation by changing the SASS Variables:
  • \n
      \n
    • "$row-highlight-background-color" or "$row-highlight-fade-animation"
    • \n
    \n
  • You can also add CSS class(es) on the fly (or on page load) on rows with certain criteria, (e.g. click on last button)\n
      \n
    • Example, click on button "Highlight Rows with Duration over 50" to see row styling changing. Wiki doc
    • \n
    \n
\n ',this.columnDefinitions=[],this.dataset=this.mockDataset(1e3)}angularGridReady(e){this.angularGrid=e,this.dataView=e.dataView,this.grid=e.slickGrid,this.gridService=e.gridService}ngOnInit(){this.columnDefinitions=[{id:"delete",field:"id",excludeFromHeaderMenu:!0,formatter:j.icon,params:{iconCssClass:"mdi mdi-trash-can pointer"},minWidth:30,maxWidth:30,onCellClick:(e,a)=>{console.log(a),confirm("Are you sure?")&&this.angularGrid.gridService.deleteItemById(a.dataContext.id)}},{id:"title",name:"Title",field:"title",sortable:!0,type:w.string,editor:{model:qe.longText}},{id:"duration",name:"Duration (days)",field:"duration",sortable:!0,type:w.number,editor:{model:qe.text},onCellChange:(e,a)=>{alert("onCellChange directly attached to the column definition"),console.log(a)}},{id:"complete",name:"% Complete",field:"percentComplete",formatter:j.percentCompleteBar,type:w.number,editor:{model:qe.integer}},{id:"start",name:"Start",field:"start",formatter:j.dateIso,sortable:!0,type:w.date},{id:"finish",name:"Finish",field:"finish",formatter:j.dateIso,sortable:!0,type:w.date},{id:"effort-driven",name:"Effort Driven",field:"effortDriven",formatter:j.checkmarkMaterial,type:w.number,editor:{model:qe.checkbox}}],this.gridOptions={asyncEditorLoading:!1,autoResize:{container:"#demo-container",rightPadding:10},editable:!0,enableColumnPicker:!0,enableCellNavigation:!0,enableRowSelection:!0}}mockDataset(e){const a=[];for(let u=0;u{m.id>u&&(u=m.id)});const i=u+e,r=2e3+Math.floor(10*Math.random()),o=Math.floor(11*Math.random()),d=Math.floor(29*Math.random()),h=Math.round(100*Math.random());return{id:i,title:"Task "+i,duration:Math.round(100*Math.random())+"",percentComplete:h,percentCompleteNumber:h,start:new Date(r,o,d),finish:new Date(r,o+2,d),effortDriven:!0}}highlighFifthRow(){this.scrollGridTop(),this.angularGrid.gridService.highlightRow(4,1500)}changeDurationBackgroundColor(){this.dataView.getItemMetadata=this.updateItemMetadataForDurationOver40(this.dataView.getItemMetadata),this.grid.invalidate(),this.grid.render()}updateItemMetadataForDurationOver40(e){return u=>{const i=this.dataView.getItem(u);let r={cssClasses:""};return"object"==typeof e&&(r=e(u)),r&&i&&i.duration&&+i.duration>40&&(r.cssClasses=(r.cssClasses||"")+" duration-bg"),r}}updateSecondItem(){this.scrollGridTop();const e=this.angularGrid.gridService.getDataItemByRowNumber(1);e.duration=Math.round(100*Math.random()),this.angularGrid.gridService.updateItem(e)}scrollGridBottom(){this.angularGrid.slickGrid.navigateBottom()}scrollGridTop(){this.angularGrid.slickGrid.navigateTop()}static#e=this.ctorParameters=()=>[]};I7=Ze([ca({encapsulation:Ga.None,template:'
\n

\n {{title}}\n \n \n code\n \n \n

\n
\n\n
\n \n \n
\n \n \n
\n \n \n \n \n \n
\n
\n
\n\n
\n \n \n
\n
',styles:[Ade()]}),Ct("design:paramtypes",[])],I7);var T4e=O(522),P4e=O.n(T4e);let R7=class{constructor(){this.selectedId="",this.onItemChanged=new sa}onChange(e){this.selectedItem=e,this.onItemChanged.next(e)}focus(){}};R7=Ze([ca({template:'\n \n\t\t\t\n\t\t\t\t{{ item?.name }}\n\t\t\t\n\t\t'})],R7);class N4e{constructor(e){this.args=e,this._subscriptions=[],this.defaultId="",this.grid=e&&e.grid,this.init()}get angularUtilService(){let e=this.gridOptions&&this.gridOptions.params&&this.gridOptions.params.angularUtilService;return(!e||!(e instanceof ol))&&(e=this.columnEditor&&this.columnEditor.params&&this.columnEditor.params.angularUtilService),e}get collection(){return this.columnDef?.editor.collection??[]}get columnDef(){return this.args?.column??{}}get columnEditor(){return this.columnDef?.editor??{}}get gridOptions(){return this.grid?.getOptions()??{}}get hasAutoCommitEdit(){return this.gridOptions.autoCommitEdit??!1}get validator(){return this.columnEditor.validator||this.columnDef.validator}init(){if(!(this.columnEditor&&this.columnEditor.params.component&&this.angularUtilService instanceof ol))throw new Error("[Angular-Slickgrid] For Editor with Angular Component to work properly, you need to provide the \"AngularUtilService\" via the Editor \"params\" OR the Grid Options \"params\"\n Example: this.columnDefs = [{ id: 'title', field: 'title', editor: { model: CustomEditor, collection: [...], params: { component: MyComponent, angularUtilService: this.angularUtilService }}];\n OR this.columnDefs = [{ id: 'title', field: 'title', editor: { model: CustomEditor, collection: [...] }]; this.gridOptions = { params: { angularUtilService: this.angularUtilService }}");if(this.columnEditor?.params.component){const e=this.angularUtilService.createAngularComponentAppendToDom(this.columnEditor.params.component,this.args.container);this.componentRef=e?.componentRef,Object.assign(this.componentRef.instance,{collection:this.collection}),this._subscriptions.push(this.componentRef.instance.onItemChanged.subscribe(a=>this.save()))}}save(){const e=this.validate();e&&e.valid&&(this.hasAutoCommitEdit?this.args.grid.getEditorLock().commitCurrentEdit():this.args.commitChanges())}cancel(){this.componentRef.instance.selectedId=this.defaultId,this.componentRef.instance.selectedItem=this.defaultItem,this.args?.cancelChanges&&this.args.cancelChanges()}hide(){"function"==typeof this.componentRef?.instance.hide&&this.componentRef.instance.hide()}show(){"function"==typeof this.componentRef?.instance.show&&this.componentRef.instance.show()}destroy(){this.componentRef?.destroy&&this.componentRef.destroy(),rd(this._subscriptions)}focus(){"function"==typeof this.componentRef?.instance.focus&&this.componentRef.instance.focus()}applyValue(e,a){e[this.columnDef.field]=a}getValue(){return this.componentRef.instance.selectedId}loadValue(e){const a=e&&e[this.columnDef.field];this.componentRef.instance.selectedId=a&&a.id||"",this.componentRef.instance.selectedItem=a&&a}serializeValue(){return this.componentRef.instance.selectedItem}isValueChanged(){return!(""===this.componentRef.instance.selectedId&&(null===this.defaultId||void 0===this.defaultId))&&this.componentRef.instance.selectedId!==this.defaultId}validate(){if(this.validator){const e=this.componentRef.instance.selectedId;return this.validator(e,this.args)}return{valid:!0,msg:null}}}class cU{constructor(){this._shouldTriggerQuery=!0,this._subscriptions=[],this.searchTerms=[],this.operator=te.equal}get angularUtilService(){let e=this.gridOptions?.params?.angularUtilService;return(!e||!(e instanceof ol))&&(e=this.columnFilter?.params?.angularUtilService),e}get collection(){return this.columnFilter?.collection||[]}get columnFilter(){return this.columnDef&&this.columnDef.filter||{}}get gridOptions(){return this.grid?.getOptions()??{}}init(e){if(this.grid=e.grid,this.callback=e.callback,this.columnDef=e.columnDef,this.searchTerms=(e.hasOwnProperty("searchTerms")?e.searchTerms:[])||[],!(this.columnFilter&&this.columnFilter.params.component&&this.angularUtilService instanceof ol))throw new Error("[Angular-Slickgrid] For Filter with Angular Component to work properly, you need to provide the \"AngularUtilService\" via the Filter \"params\" OR the Grid Options \"params\"\n Example: this.columnDefs = [{ id: 'title', field: 'title', filter: { model: CustomFilter, collection: [...], params: { component: MyComponent, angularUtilService: this.angularUtilService }}];\n OR this.columnDefs = [{ id: 'title', field: 'title', filter: { model: CustomFilter, collection: [...] }]; this.gridOptions = { params: { angularUtilService: this.angularUtilService }}");if(this.columnFilter?.params.component){const a=this.grid.getHeaderRowColumn(this.columnDef.id);if(a){a.innerHTML="";const u=this.angularUtilService.createAngularComponentAppendToDom(this.columnFilter.params.component,a,{collection:this.collection});this.componentRef=u.componentRef,this._subscriptions.push(u.componentRef.instance.onItemChanged.subscribe(i=>{this.callback(void 0,{columnDef:this.columnDef,operator:this.operator,searchTerms:[i.id],shouldTriggerQuery:this._shouldTriggerQuery}),this._shouldTriggerQuery=!0}))}}}clear(e=!0){this._shouldTriggerQuery=e,this.componentRef?.instance?.hasOwnProperty("selectedId")&&(this.componentRef.instance.selectedId=0)}destroy(){this.componentRef?.destroy&&this.componentRef.destroy(),rd(this._subscriptions)}setValues(e){this.componentRef?.instance?.hasOwnProperty("selectedId")&&(this.componentRef.instance.selectedId=e)}}let H7=class{};H7=Ze([ca({template:"{{item?.assignee?.name}}"})],H7);let gf=class{constructor(){this.selectedId="",this.onItemChanged=new sa}onChange(e){this.selectedItem=e,this.onItemChanged.next(e)}};gf=Ze([ca({template:'\n \n\t\t\t\n\t\t\t\t{{ item?.name }}\n\t\t\t\n\t\t'})],gf);let V7=class{sayHello(e){alert(`Hello ${e}`)}};V7=Ze([ca({template:''})],V7);let O7=class{constructor(e,a){this.angularUtilService=e,this.translate=a,this.title="Example 22: Use of Angular Components",this.subTitle='\n

Filters, Editors, AsyncPostRender with Angular Components

\n Grid with usage of Angular Components as Editor & AsyncPostRender (similar to Formatter).\n
    \n
  • Support of Angular Component as Custom Editor (click on any "Assignee" name cell)
  • \n
      \n
    • That column uses ng-select as a custom editor as an Angular Component\n
    • Increased Grid Options "rowHeight" & "headerRowHeight" to 45 so that the "ng-select" fits in the cell. Ideally it would be better to override the ng-select css styling to change it\'s max height
    • \n
    \n
  • Support of Angular Component as Custom Filter ("Assignee" columns), which also uses "ng-select"\n
  • The 2nd "Assignee" column (showing in bold text) uses "asyncPostRender" with an Angular Component
  • \n
      \n
    • Why can\'t we use Angular Component as Customer Formatter and why do I see a slight delay in loading the data?
    • \n
    • It\'s totally normal since SlickGrid Formatters only accept strings (synchronously),\n so we cannot use that (Angular requires at least 1 full cycle to render the element), so we are left with SlickGrid "asyncPostRender" and\n it works but as the name suggest it\'s async users might see noticeable delay in loading the data\n
    • \n
    \n
  • The 2nd "Title" showing an interactive component, which is not destroyed after first rendering but stays active. Click on the button to see the title alerted
  • \n
\n ',this._commandQueue=[],this.columnDefinitions=[],this.isAutoEdit=!0,this.selectedLanguage="en",this.assignees=[{id:"",name:""},{id:"1",name:"John"},{id:"2",name:"Pierre"},{id:"3",name:"Paul"}]}ngOnInit(){this.prepareGrid()}angularGridReady(e){this.angularGrid=e,this.gridObj=e.slickGrid}prepareGrid(){this.columnDefinitions=[{id:"title",name:"Title",field:"title",minWidth:100,filterable:!0,sortable:!0,type:w.string,editor:{model:qe.longText,minLength:5,maxLength:255},onCellChange:(e,a)=>{console.log(a),this.alertWarning=`Updated Title: ${a.dataContext.title}`}},{id:"title2",name:"Title with Angular Component",field:"title",minWidth:100,sortable:!0,type:w.string,formatter:()=>"...",asyncPostRender:this.renderInteractiveAngularComponent.bind(this),params:{component:V7,angularUtilService:this.angularUtilService}},{id:"assignee",name:"Assignee",field:"assignee",minWidth:100,filterable:!0,sortable:!0,filter:{model:cU,collection:this.assignees,params:{component:gf}},queryFieldFilter:"assignee.id",queryFieldSorter:"assignee.name",formatter:j.complexObject,params:{complexFieldLabel:"assignee.name"},exportWithFormatter:!0,editor:{model:N4e,collection:this.assignees,params:{component:R7}},onCellChange:(e,a)=>{console.log(a),this.alertWarning=`Updated Title: ${a.dataContext.title}`}},{id:"assignee2",name:"Assignee with Angular Component",field:"assignee",minWidth:125,filterable:!0,sortable:!0,filter:{model:cU,collection:this.assignees,params:{component:gf}},queryFieldFilter:"assignee.id",queryFieldSorter:"assignee.name",formatter:()=>"...",asyncPostRender:this.renderAngularComponent.bind(this),params:{component:H7,angularUtilService:this.angularUtilService,complexFieldLabel:"assignee.name"},exportCustomFormatter:j.complexObject},{id:"complete",name:"% Complete",field:"percentComplete",minWidth:100,filterable:!0,formatter:j.multiple,type:w.number,editor:{model:qe.singleSelect,enableRenderHtml:!0,collection:Array.from(Array(101).keys()).map(e=>({value:e,label:e,symbol:''})),customStructure:{value:"value",label:"label",labelSuffix:"symbol"},editorOptions:{maxHeight:400}},filter:{model:ie.slider,operator:">=",filterOptions:{hideSliderNumber:!1}},params:{formatters:[j.collectionEditor,j.percentCompleteBar]}},{id:"start",name:"Start",field:"start",minWidth:100,filterable:!0,filter:{model:ie.compoundDate},formatter:j.dateIso,exportWithFormatter:!0,sortable:!0,type:w.date,editor:{model:qe.date}},{id:"finish",name:"Finish",field:"finish",minWidth:100,filterable:!0,sortable:!0,filter:{model:ie.compoundDate},formatter:j.dateIso,exportWithFormatter:!0,type:w.date,editor:{model:qe.date}},{id:"action",name:"Action",field:"id",maxWidth:100,formatter:()=>'
Action
',cellMenu:{commandTitle:"Commands",commandItems:[{command:"help",title:"Help",iconCssClass:"mdi mdi-help-circle text-info",positionOrder:66,action:()=>alert("Please Help!")},{command:"delete-row",title:"Delete Row",positionOrder:64,iconCssClass:"mdi mdi-close color-danger",cssClass:"red",textCssClass:"text-italic color-danger-light",action:(e,a)=>this.angularGrid.gridService.deleteItemById(a.dataContext.id)}]}}],this.gridOptions={asyncEditorLoading:!1,autoEdit:this.isAutoEdit,autoCommitEdit:!1,autoResize:{container:"#demo-container",rightPadding:10},headerRowHeight:45,rowHeight:45,editable:!0,enableCellMenu:!0,enableCellNavigation:!0,enableColumnPicker:!0,enableExcelCopyBuffer:!0,enableFiltering:!0,enableAsyncPostRender:!0,asyncPostRenderDelay:0,editCommandHandler:(e,a,u)=>{this._commandQueue.push(u),u.execute()},i18n:this.translate,params:{angularUtilService:this.angularUtilService}},this.dataset=this.mockData(100)}mockData(e,a=0){const u=[];for(let i=a;i[{type:ol},{type:at}]};O7=Ze([ca({template:'
\n

\n {{title}}\n \n \n code\n \n \n

\n
\n\n
\n \n \n \n \n \n
\n \n \n \n \n \n \n
\n
\n\n\n
\n
\n Updated Item: {{updatedObject | json}}\n
\n
\n Updated Item: {{alertWarning}}\n
\n
\n\n
\n \n \n
\n
',encapsulation:Ga.None,providers:[ol],styles:[P4e()]}),Ct("design:paramtypes",[ol,at])],O7);var R4e=O(822),H4e=O.n(R4e);let j7=class{constructor(){this.title="Example 23: Grid AutoHeight",this.subTitle='\n The SlickGrid option "autoHeight" can be used if you wish to keep the full height of the grid without any scrolling\n
    \n
  • You define a fixed grid width via "gridWidth" in the View
  • \n
  • You can still use the "autoResize" for the width to be resized automatically (the height will never change in this case)
  • \n
  • This dataset has 25 rows, if you scroll down the page you can see the entire set is shown without any grid scrolling (though you might have browser scrolling)
  • \n
\n ',this.columnDefinitions=[],this.operatorList=["=","<","<=",">",">=","<>","StartsWith","EndsWith"],this.selectedOperator="=",this.searchValue=""}ngOnInit(){this.prepareGrid()}angularGridReady(e){this.angularGrid=e}prepareGrid(){this.columnDefinitions=[{id:"title",name:"Title",field:"title",sortable:!0,type:w.string},{id:"duration",name:"Duration (days)",field:"duration",sortable:!0,type:w.number},{id:"complete",name:"% Complete",field:"percentComplete",formatter:j.percentCompleteBar,sortable:!0,type:w.number},{id:"start",name:"Start",field:"start",formatter:j.dateIso,sortable:!0,type:w.date},{id:"finish",name:"Finish",field:"finish",formatter:j.dateIso,sortable:!0,type:w.date},{id:"effort-driven",name:"Effort Driven",field:"effortDriven",formatter:j.checkmarkMaterial,sortable:!0,type:w.number}],this.selectedColumn=this.columnDefinitions[0],this.gridOptions={autoHeight:!0,autoResize:{container:"#demo-container",rightPadding:10},enableFiltering:!0,showHeaderRow:!1,alwaysShowVerticalScroll:!1,enableColumnPicker:!0,enableCellNavigation:!0,enableRowSelection:!0};const e=[];for(let a=0;a<25;a++){const u=2e3+Math.floor(10*Math.random()),i=Math.floor(11*Math.random()),r=Math.floor(29*Math.random()),o=Math.round(100*Math.random());e[a]={id:a,title:"Task "+a,duration:Math.round(100*Math.random())+"",percentComplete:o,percentCompleteNumber:o,start:new Date(u,i,r),finish:new Date(u,i+1,r),effortDriven:a%5==0}}this.dataset=e}clearGridSearchInput(){this.searchValue="",this.updateFilter()}updateFilter(){this.angularGrid.filterService.updateSingleFilter({columnId:`${this.selectedColumn.id||""}`,operator:this.selectedOperator,searchTerms:[this.searchValue||""]})}};j7=Ze([ca({encapsulation:Ga.None,template:'
\n

\n {{title}}\n \n \n code\n \n \n

\n
\n\n
\n
\n \n
\n
\n \n
\n
\n \n
\n\n
\n
\n \n \n
\n
\n
\n\n
\n\n \n \n
',styles:[H4e()]})],j7);let G7=class{constructor(){this._darkModeGrid1=!1,this.title="Example 1: Basic Grids",this.subTitle='\n Basic Grids with fixed sizes (800 x 225) set by "gridHeight" & "gridWidth"\n \n ',this.columnDefinitions1=[],this.columnDefinitions2=[]}ngOnInit(){this.prepareGrid()}ngOnDestroy(){document.querySelector(".panel-wm-content").classList.remove("dark-mode"),document.querySelector("#demo-container").dataset.bsTheme="light"}angularGridReady1(e){this.angularGrid1=e}isBrowserDarkModeEnabled(){return window.matchMedia?.("(prefers-color-scheme: dark)").matches??!1}prepareGrid(){this.columnDefinitions1=[{id:"title",name:"Title",field:"title",sortable:!0},{id:"duration",name:"Duration (days)",field:"duration",sortable:!0},{id:"%",name:"% Complete",field:"percentComplete",sortable:!0},{id:"start",name:"Start",field:"start",formatter:j.dateIso},{id:"finish",name:"Finish",field:"finish",formatter:j.dateIso},{id:"effort-driven",name:"Effort Driven",field:"effortDriven",sortable:!0}],this._darkModeGrid1=this.isBrowserDarkModeEnabled(),this.gridOptions1={darkMode:this._darkModeGrid1,enableAutoResize:!1,enableSorting:!0,gridHeight:225,gridWidth:800},this.columnDefinitions2=this.columnDefinitions1,this.gridOptions2={...this.gridOptions1,darkMode:!1,enablePagination:!0,pagination:{pageSizes:[5,10,20,25,50],pageSize:5}},this.dataset1=this.mockData(995),this.dataset2=this.mockData(995)}mockData(e){const a=[];for(let u=0;u\n

\n {{title}}\n \n \n code\n \n \n

\n
\n\n

\n
\n Grid 1\n \n
\n

\n\n
\n \n \n
\n\n
\n\n

Grid 2 (with local Pagination)

\n
\n \n \n
\n'})],G7);var j4e=O(526),G4e=O.n(j4e);const K7=["title","data-slick-tooltip"],Np="[title], [data-slick-tooltip]";class W7{constructor(){this.name="CustomTooltip",this._cellType="slick-cell",this._rxjs=null,this._sharedService=null,this._mousePosition={x:0,y:0},this._hasMultipleTooltips=!1,this._defaultOptions={bodyClassName:"tooltip-body",className:"",offsetArrow:3,offsetLeft:0,offsetRight:0,offsetTopBottom:4,hideArrow:!1,regularTooltipWhiteSpace:"pre-line",whiteSpace:"normal"},this._eventHandler=new Ut}get addonOptions(){return this._addonOptions}get cancellablePromise(){return this._cancellablePromise}get cellAddonOptions(){return this._cellAddonOptions}get bodyClassName(){return this._cellAddonOptions?.bodyClassName??"tooltip-body"}get className(){let e="slick-custom-tooltip";return this._addonOptions?.className&&(e+=` ${this._addonOptions.className}`),e}get dataView(){return this._grid.getData()||{}}get gridOptions(){return this._grid?.getOptions()||{}}get gridUid(){return this._grid?.getUID()||""}get gridUidSelector(){return this.gridUid?`.${this.gridUid}`:""}get tooltipElm(){return this._tooltipElm}addRxJsResource(e){this._rxjs=e}init(e,a){this._grid=e,this._rxjs=a.get("RxJsFacade"),this._sharedService=a.get("SharedService"),this._addonOptions={...this._defaultOptions,...this._sharedService?.gridOptions?.customTooltip},this._eventHandler.subscribe(e.onMouseEnter,this.handleOnMouseOver.bind(this)).subscribe(e.onHeaderMouseOver,(u,i)=>this.handleOnHeaderMouseOverByType(u,i,"slick-header-column")).subscribe(e.onHeaderRowMouseEnter,(u,i)=>this.handleOnHeaderMouseOverByType(u,i,"slick-headerrow-column")).subscribe(e.onHeaderRowMouseOver,(u,i)=>this.handleOnHeaderMouseOverByType(u,i,"slick-headerrow-column")).subscribe(e.onMouseLeave,this.hideTooltip.bind(this)).subscribe(e.onHeaderMouseOut,this.hideTooltip.bind(this)).subscribe(e.onHeaderRowMouseLeave,this.hideTooltip.bind(this)).subscribe(e.onHeaderRowMouseOut,this.hideTooltip.bind(this))}dispose(){this.hideTooltip(),this._cancellablePromise=void 0,this._eventHandler.unsubscribeAll()}hideTooltip(){this._cancellablePromise?.cancel(),this._observable$?.unsubscribe();const e=Kt(this.className).join(".");document.body.querySelector(`.${e}${this.gridUidSelector}`)?.remove()}getOptions(){return this._addonOptions}setOptions(e){this._addonOptions={...this._addonOptions,...e}}asyncProcessCallback(e,a,u,i,r){this.hideTooltip();const o={...r,[this.addonOptions?.asyncParamsPropName??"__params"]:e};this._cellAddonOptions?.useRegularTooltip?this.renderRegularTooltip(this._cellAddonOptions.asyncPostFormatter,a,u,i,o):this.renderTooltipFormatter(this._cellAddonOptions.asyncPostFormatter,a,u,i,o)}handleOnHeaderMouseOverByType(e,a,u){this._cellType=u,this._mousePosition={x:e.clientX||0,y:e.clientY||0},this._mouseTarget=document.elementFromPoint(e.clientX||0,e.clientY||0)?.closest(Np),this.hideTooltip();const i={row:-1,cell:this._grid.getColumns().findIndex(h=>(a?.column?.id??"")===h.id)},r=a.column,o={},d="slick-headerrow-column"===u;if(a||={},a.cell=i.cell,a.row=i.row,a.columnDef=r,a.dataContext=o,a.grid=this._grid,a.type=d?"header-row":"header",this._cellAddonOptions={...this._addonOptions,...r?.customTooltip},!r?.disableTooltip&&("function"!=typeof this._cellAddonOptions?.usabilityOverride||this._cellAddonOptions.usabilityOverride(a))&&r&&e.target){this._cellNodeElm=e.target.closest(`.${u}`);const h=d?this._cellAddonOptions.headerRowFormatter:this._cellAddonOptions.headerFormatter;if(this._cellAddonOptions?.useRegularTooltip||!h){const m=d?this._cellAddonOptions?.useRegularTooltip?null:h:r.name;this.renderRegularTooltip(m,i,null,r,o)}else this._cellNodeElm&&"function"==typeof h&&this.renderTooltipFormatter(h,i,null,r,o)}}handleOnMouseOver(e){var a=this;return Su(function*(){if(a._cellType="slick-cell",a._mousePosition={x:e.clientX||0,y:e.clientY||0},a._mouseTarget=document.elementFromPoint(e.clientX||0,e.clientY||0)?.closest(Np),a.hideTooltip(),e&&a._grid){const u=e?.target?.closest(".slick-cell")?.className,i=u&&/l\d+/.exec(u||"")?a._grid.getCellFromEvent(e):null;if(i){const r=a.dataView?a.dataView.getItem(i.row):a._grid.getDataItem(i.row),o=a._grid.getColumns()[i.cell];if(a._cellNodeElm=a._grid.getCellNode(i.row,i.cell),r&&o){if(a._cellAddonOptions={...a._addonOptions,...o?.customTooltip},o?.disableTooltip||"function"==typeof a._cellAddonOptions?.usabilityOverride&&!a._cellAddonOptions.usabilityOverride({cell:i.cell,row:i.row,dataContext:r,column:o,grid:a._grid,type:"cell"}))return;const d=r.hasOwnProperty(o.field)?r[o.field]:null,h=a._grid.getEditorLock().isActive()?null:d;if(a._cellAddonOptions.useRegularTooltip&&!a._cellAddonOptions?.asyncProcess||!a._cellAddonOptions?.formatter)a.renderRegularTooltip(o.formatter,i,h,o,r);else if("function"==typeof a._cellAddonOptions?.formatter&&a.renderTooltipFormatter(a._cellAddonOptions.formatter,i,h,o,r),"function"==typeof a._cellAddonOptions?.asyncProcess){const m=a._cellAddonOptions.asyncProcess(i.row,i.cell,d,o,r,a._grid);if(a._cellAddonOptions.asyncPostFormatter||console.error('[Slickgrid-Universal] when using "asyncProcess" with Custom Tooltip, you must also provide an "asyncPostFormatter" formatter.'),m instanceof Promise)a._cancellablePromise=BG(m),a._cancellablePromise.promise.then(g=>a.asyncProcessCallback(g,i,d,o,r)).catch(g=>{g instanceof T2||console.error(g)});else if(a._rxjs?.isObservable(m)){const g=a._rxjs;a._observable$=m.pipe(g.switchMap(v=>g.of(v))).subscribe(v=>a.asyncProcessCallback(v,i,d,o,r),v=>console.error(v))}}}}}})()}parseFormatterAndSanitize(e,a,u,i,r){if("function"==typeof e){const o=e(a.row,a.cell,u,i,r,this._grid),d=Bp(o)?o:o.html||o.text;return this._grid.sanitizeHtmlString((d instanceof HTMLElement?d.textContent:d)||"")}return"string"==typeof e?this._grid.sanitizeHtmlString(e):""}renderRegularTooltip(e,a,u,i,r){const o=document.createElement("div");let d;this._grid.applyHtmlCode(o,this.parseFormatterAndSanitize(e,a,u,i,r)),this._hasMultipleTooltips=(this._cellNodeElm?.querySelectorAll(Np).length||0)>1;const h=this._cellAddonOptions?.useRegularTooltipFromCellTextOnly||!this._mouseTarget?this._cellNodeElm:this._mouseTarget;let m=i?.toolTip??"";m||("slick-cell"===this._cellType&&h&&h.clientWidththis._cellAddonOptions?.tooltipTextMaxLength&&(m=m.substring(0,this._cellAddonOptions.tooltipTextMaxLength-3)+"..."),d=h):(this._cellAddonOptions?.useRegularTooltipFromFormatterOnly?d=o.querySelector(Np):(d=O2(h,K7)?h:o.querySelector(Np),(!d||!O2(d,K7))&&h&&(d=h.querySelector(Np))),"none"===d?.style.display||this._hasMultipleTooltips&&(!h||h===this._cellNodeElm)?m="":(!m||"function"==typeof e&&this._cellAddonOptions?.useRegularTooltipFromFormatterOnly)&&(m=O2(d,K7)||""))),""!==m&&this.renderTooltipFormatter(e,a,u,i,r,m,d),this.swapAndClearTitleAttribute(d,m)}renderTooltipFormatter(e,a,u,i,r,o,d){if(this._tooltipElm=T("div",{className:this.className}),this._tooltipBodyElm=T("div",{className:this.bodyClassName}),this._tooltipElm.classList.add(this.gridUid),this._tooltipElm.classList.add("l"+a.cell),this._tooltipElm.classList.add("r"+a.cell),this.tooltipElm?.appendChild(this._tooltipBodyElm),null==u){const g=this._cellNodeElm?.querySelector(Np);u=O2(g,K7)||u}let h=o||this.parseFormatterAndSanitize(e,a,u,i,r)||"";h=this._cellAddonOptions?.tooltipTextMaxLength&&h.length>this._cellAddonOptions.tooltipTextMaxLength?h.substring(0,this._cellAddonOptions.tooltipTextMaxLength-3)+"...":h;let m="";!o||this._cellAddonOptions?.renderRegularTooltipAsHtml?(m=this._grid.sanitizeHtmlString(h),this._grid.applyHtmlCode(this._tooltipBodyElm,m),this._tooltipBodyElm.style.whiteSpace=this._cellAddonOptions?.whiteSpace??this._defaultOptions.whiteSpace):(m=h||"",this._tooltipBodyElm.textContent=m,this._tooltipBodyElm.style.whiteSpace=this._cellAddonOptions?.regularTooltipWhiteSpace??this._defaultOptions.regularTooltipWhiteSpace),this._cellAddonOptions?.maxHeight&&(this._tooltipElm.style.maxHeight=`${this._cellAddonOptions.maxHeight}px`),this._cellAddonOptions?.maxWidth&&(this._tooltipElm.style.maxWidth=`${this._cellAddonOptions.maxWidth}px`),m.toString()&&(document.body.appendChild(this._tooltipElm),this.reposition(a),this._cellAddonOptions?.hideArrow||this._tooltipElm.classList.add("tooltip-arrow"),this.swapAndClearTitleAttribute(d,h))}reposition(e){if(this._tooltipElm){this._cellNodeElm=this._cellNodeElm||this._grid.getCellNode(e.row,e.cell);const a=Lu(this._cellNodeElm),u=this._cellNodeElm.offsetWidth,i=this._tooltipElm.getBoundingClientRect().height,r=this._tooltipElm.getBoundingClientRect().width,o=document.body.offsetWidth||window.innerWidth;let d=(a.top||0)-this._tooltipElm.offsetHeight-(this._cellAddonOptions?.offsetTopBottom??0),h=(a.left||0)-(this._cellAddonOptions?.offsetRight??0);const m=this._cellAddonOptions?.position??"auto";let g="";if("center"===m?(h+=u/2-r/2+(this._cellAddonOptions?.offsetRight??0),g="top-center",this._tooltipElm.classList.remove("arrow-left-align","arrow-right-align"),this._tooltipElm.classList.add("arrow-center-align")):"right-align"===m||("auto"===m||"left-align"!==m)&&h+r>o?(g="right",h-=r-u-(this._cellAddonOptions?.offsetLeft??0),this._tooltipElm.classList.remove("arrow-center-align","arrow-left-align"),this._tooltipElm.classList.add("arrow-right-align")):(g="left",this._tooltipElm.classList.remove("arrow-center-align","arrow-right-align"),this._tooltipElm.classList.add("arrow-left-align")),"bottom"===m||("auto"===m||"top"!==m)&&i>V2(this._cellNodeElm).top?(d=(a.top||0)+(this.gridOptions.rowHeight??0)+(this._cellAddonOptions?.offsetTopBottom??0),g=`bottom-${g}`,this._tooltipElm.classList.remove("arrow-down"),this._tooltipElm.classList.add("arrow-up")):(g=`top-${g}`,this._tooltipElm.classList.remove("arrow-up"),this._tooltipElm.classList.add("arrow-down")),this._tooltipElm&&(this._hasMultipleTooltips||this.cellAddonOptions?.repositionByMouseOverTarget)){const v=Lu(this._mouseTarget);g.includes("left")||"top-center"===g?h=v.left-(this._addonOptions?.offsetArrow??3):g.includes("right")&&(h=v.left-r+(this._mouseTarget?.offsetWidth??0)+(this._addonOptions?.offsetArrow??3))}this._tooltipElm.style.top=`${d}px`,this._tooltipElm.style.left=`${h}px`}}swapAndClearTitleAttribute(e,a){let u;e&&(u=this._cellNodeElm&&(this._cellNodeElm.hasAttribute("title")&&this._cellNodeElm.getAttribute("title")?this._cellNodeElm:this._cellNodeElm?.querySelector("[title]")));const i=e||this._cellNodeElm&&(this._cellNodeElm.hasAttribute("title")&&this._cellNodeElm.getAttribute("title")?this._cellNodeElm:this._cellNodeElm?.querySelector("[title]"));i&&(i.setAttribute("data-slick-tooltip",a||""),i.hasAttribute("title")&&i.setAttribute("title",""),u?.hasAttribute("title")&&u.setAttribute("title",""))}}let U7=class{constructor(e){this.translate=e,this.subscriptions=[],this.selectedLanguage="",this.selectedLanguageFile="",this.fetchResult="",this.statusClass="alert alert-light",this.statusStyle="display: none";this.translate.use("en"),this.selectedLanguage="en"}ngOnInit(){this.dataset=this.getData(20),this.defineGrid()}angularGridReady(e){this.angularGrid=e}defineGrid(){this.columnDefinitions=[{id:"title",name:"Title",field:"title",sortable:!0,minWidth:100,filterable:!0,editor:{model:qe.text}},{id:"duration",name:"Duration (days)",field:"duration",sortable:!0,minWidth:100,filterable:!0,type:w.number,editor:{model:qe.text}},{id:"%",name:"% Complete",field:"percentComplete",sortable:!0,minWidth:100,filterable:!0,type:w.number,editor:{model:qe.text}},{id:"start",name:"Start",field:"start",formatter:j.dateIso,exportWithFormatter:!0,filterable:!0,editor:{model:qe.date}},{id:"finish",name:"Finish",field:"finish",formatter:j.dateIso,exportWithFormatter:!0,filterable:!0,editor:{model:qe.date}},{id:"effort-driven",name:"Effort Driven",field:"effortDriven",sortable:!0,minWidth:100,filterable:!0,type:"boolean",editor:{model:qe.checkbox}}],this.gridOptions={enableAutoResize:!1,gridHeight:350,gridWidth:800,rowHeight:33,enableExcelCopyBuffer:!0,excelCopyBufferOptions:{onBeforePasteCell:(e,a)=>a.cell>0},autoEdit:!1,editable:!0,enableCellNavigation:!0,enableRowBasedEdit:!0,enableTranslate:!0,i18n:this.translate,rowBasedEditOptions:{allowMultipleRows:!1,onBeforeEditMode:()=>this.clearStatus(),onBeforeRowUpdated:e=>{const{effortDriven:a,percentComplete:u,finish:i,start:r,duration:o,title:d}=e.dataContext;return o>40?(alert("Sorry, 40 is the maximum allowed duration."),Promise.resolve(!1)):function J4e(t,e){return new Promise(a=>{setTimeout(()=>{a(new Response(JSON.stringify({status:200,message:"success"})))},window.Cypress?10:500)})}(0,JSON.stringify({effortDriven:a,percentComplete:u,finish:i,start:r,duration:o,title:d})).catch(h=>(console.error(h),!1)).then(h=>!1===h?(this.statusClass="alert alert-danger",!1):"object"==typeof h?h.json():void 0).then(h=>(this.statusStyle="display: block",this.statusClass="alert alert-success",this.fetchResult=h.message,!0))},actionColumnConfig:{width:100,minWidth:100,maxWidth:100},actionButtons:{editButtonClassName:"button-style margin-auto btn-icon px-2 me-1",iconEditButtonClassName:"mdi mdi-pencil",cancelButtonClassName:"button-style btn-icon px-2",cancelButtonTitle:"Cancel row",cancelButtonTitleKey:"RBE_BTN_CANCEL",iconCancelButtonClassName:"mdi mdi-undo text-danger",cancelButtonPrompt:"Are you sure you want to cancel your changes?",updateButtonClassName:"button-style btn-icon px-2 me-1",updateButtonTitle:"Update row",updateButtonTitleKey:"RBE_BTN_UPDATE",iconUpdateButtonClassName:"mdi mdi-check text-success",updateButtonPrompt:"Save changes?",deleteButtonClassName:"button-style btn-icon px-2",deleteButtonTitle:"Delete row",iconDeleteButtonClassName:"mdi mdi-trash-can text-danger",deleteButtonPrompt:"Are you sure you want to delete this row?"}},externalResources:[new W7]}}getData(e){const a=[];for(let u=0;u{this.selectedLanguage=e}))}static#e=this.ctorParameters=()=>[{type:at}]};U7=Ze([ca({encapsulation:Ga.None,template:'

\n Example 35: Row Based Editing\n \n \n code\n \n \n

\n\n
\n
    \n
  • \n The Row Based Edit plugin allows you to edit either a single or multiple\n specific rows at a time, while disabling the rest of the grid rows.\n
  • \n
  • \n Editedable rows, as well as modified cells are highlighted with a\n different color, which you can customize using css variables (see\n \n grid-base-row-editing.component.scss )\n
  • \n
  • \n Modifications are kept track of and if the cancel button is pressed, all\n modifications are rolled back.\n
  • \n
  • \n If the save button is pressed, a custom "onBeforeRowUpdated" callback is called, which you can use to save the data with your backend.
    \n The callback needs to return a Promise<boolean> and if the promise resolves to true, then the row will be updated, otherwise it will be cancelled and stays in edit mode.\n You can try out the later by defining a Duration value larger than 40.\n
    \n NOTE: You can also combine this with e.g. Batch Editing like shown in Example 30\n
  • \n
  • \n This example additionally uses the ExcelCopyBuffer Plugin, which you can see also in Slickgrid-Universal\n example 19.\n The example defines a rule that pastes in the first column are prohibited. In combination with the Row Based Editing Plugin though, this rule gets enhanced with the fact\n that only the edited rows are allowed to be pasted into, while still respecting the original rule.\n
  • \n
\n
\n\n
\n
\n
\n \n Toggle Single/Multi Row Edit\n \n \n Locale: {{selectedLanguage + \'.json\'}}\n
\n\n
\n Status: \n \n
\n
\n
\n\n\n\n',styles:[G4e()]}),Ct("design:paramtypes",[at])],U7);var mU={},Yt=Uint8Array,Yr=Uint16Array,Ef=Int32Array,Tv=new Yt([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),Pv=new Yt([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),vf=new Yt([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),pU=function(t,e){for(var a=new Yr(31),u=0;u<31;++u)a[u]=e+=1<>1|(21845&Nu)<<1;Vh=(61680&(Vh=(52428&Vh)>>2|(13107&Vh)<<2))>>4|(3855&Vh)<<4,bf[Nu]=((65280&Vh)>>8|(255&Vh)<<8)>>1}var od=function(t,e,a){for(var u=t.length,i=0,r=new Yr(e);i>h]=m}else for(d=new Yr(u),i=0;i>15-t[i]);return d},Oh=new Yt(288);for(Nu=0;Nu<144;++Nu)Oh[Nu]=8;for(Nu=144;Nu<256;++Nu)Oh[Nu]=9;for(Nu=256;Nu<280;++Nu)Oh[Nu]=7;for(Nu=280;Nu<288;++Nu)Oh[Nu]=8;var kf=new Yt(32);for(Nu=0;Nu<32;++Nu)kf[Nu]=5;var bU=od(Oh,9,0),xU=od(kf,5,0),xf=function(t){return(t+7)/8|0},jh=function(t,e,a){return(null==e||e<0)&&(e=0),(null==a||a>t.length)&&(a=t.length),new Yt(t.subarray(e,a))},DU=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],Ft=function(t,e,a){var u=new Error(e||DU[t]);if(u.code=t,Error.captureStackTrace&&Error.captureStackTrace(u,Ft),!a)throw u;return u},ld=function(t,e,a){a<<=7&e;var u=e/8|0;t[u]|=a,t[u+1]|=a>>8},Nv=function(t,e,a){a<<=7&e;var u=e/8|0;t[u]|=a,t[u+1]|=a>>8,t[u+2]|=a>>16},Y7=function(t,e){for(var a=[],u=0;uk&&(k=r[u].s);var x=new Yr(k+1),D=Q7(a[g-1],x,0);if(D>e){u=0;var C=0,F=D-e,A=1<e))break;C+=A-(1<>=F;C>0;){var M=r[u].s;x[M]=0&&C;--u){var L=r[u].s;x[L]==e&&(--x[L],++C)}D=e}return{t:new Yt(x),l:D}},Q7=function(t,e,a){return-1==t.s?Math.max(Q7(t.l,e,a+1),Q7(t.r,e,a+1)):e[t.s]=a},ST=function(t){for(var e=t.length;e&&!t[--e];);for(var a=new Yr(++e),u=0,i=t[0],r=1,o=function(h){a[u++]=h},d=1;d<=e;++d)if(t[d]==i&&d!=e)++r;else{if(!i&&r>2){for(;r>138;r-=138)o(32754);r>2&&(o(r>10?r-11<<5|28690:r-3<<5|12305),r=0)}else if(r>3){for(o(i),--r;r>6;r-=6)o(8304);r>2&&(o(r-3<<5|8208),r=0)}for(;r--;)o(i);r=1,i=t[d]}return{c:a.subarray(0,u),n:e}},Iv=function(t,e){for(var a=0,u=0;u>8,t[i+2]=255^t[i],t[i+3]=255^t[i+1];for(var r=0;r4&&!He[vf[Be-1]];--Be);var Ya,Ne,Ua,nu,fa=m+5<<3,At=Iv(i,Oh)+Iv(r,kf)+o,vt=Iv(i,k)+Iv(r,C)+o+14+3*Be+Iv($,He)+2*$[16]+3*$[17]+7*$[18];if(h>=0&&fa<=At&&fa<=vt)return zT(e,g,t.subarray(h,h+m));if(ld(e,g,1+(vt15&&(ld(e,g,fr[Y]>>5&127),g+=fr[Y]>>12)}}}else Ya=bU,Ne=Oh,Ua=xU,nu=kf;for(Y=0;Y255){Nv(e,g,Ya[(dn=Iu>>18&31)+257]),g+=Ne[dn+257],dn>7&&(ld(e,g,Iu>>23&31),g+=Tv[dn]);var dl=31&Iu;Nv(e,g,Ua[dl]),g+=nu[dl],dl>3&&(Nv(e,g,Iu>>5&8191),g+=Pv[dl])}else Nv(e,g,Ya[Iu]),g+=Ne[Iu]}return Nv(e,g,Ya[256]),g+Ne[256]},CU=new Ef([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),LT=new Yt(0),yU=function(t,e,a,u,i,r){var o=r.z||t.length,d=new Yt(u+o+5*(1+Math.ceil(o/7e3))+i),h=d.subarray(u,d.length-i),m=r.l,g=7&(r.r||0);if(e){g&&(h[0]=r.r>>3);for(var v=CU[e-1],k=v>>13,x=8191&v,D=(1<7e3||He>24576)&&(Ya>423||!m)){g=MT(t,h,0,L,R,G,Y,He,Be,re-Be,g),He=$=Y=0,Be=re;for(var Ne=0;Ne<286;++Ne)R[Ne]=0;for(Ne=0;Ne<30;++Ne)G[Ne]=0}var Ua=2,nu=0,sl=x,Qi=At-vt&32767;if(Ya>2&&fa==M(re-Qi))for(var Wn=Math.min(k,Ya)-1,fr=Math.min(32767,re),dn=Math.min(258,Ya);Qi<=fr&&--sl&&At!=vt;){if(t[re+Ua]==t[re+Ua-Qi]){for(var Iu=0;IuUa){if(Ua=Iu,nu=Qi,Iu>Wn)break;var dl=Math.min(Qi,Iu-2),Oc=0;for(Ne=0;NeOc&&(Oc=Gv,vt=jc)}}}Qi+=(At=vt)-(vt=C[At])&32767}if(nu){L[He++]=268435456|J7[Ua]<<18|BT[nu];var je=31&J7[Ua],tt=31&BT[nu];Y+=Tv[je]+Pv[tt],++R[257+je],++G[tt],Ve=re+Ua,++$}else L[He++]=t[re],++R[t[re]]}}for(re=Math.max(re,Ve);re=o&&(h[g/8|0]=m,oi=o),g=zT(h,g+1,t.subarray(re,oi))}r.i=o}return jh(d,0,u+xf(g)+i)},_U=function(){for(var t=new Int32Array(256),e=0;e<256;++e){for(var a=e,u=9;--u;)a=(1&a&&-306674912)^a>>>1;t[e]=a}return t}(),X7=function(){var t=-1;return{p:function(e){for(var a=t,u=0;u>>8;t=a},d:function(){return~t}}},e9=function(t,e,a,u,i){if(!i&&(i={l:1},e.dictionary)){var r=e.dictionary.subarray(-32768),o=new Yt(r.length+t.length);o.set(r),o.set(t,r.length),t=o,i.w=r.length}return yU(t,null==e.level?6:e.level,null==e.mem?i.l?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(t.length)))):20:12+e.mem,a,u,i)},a9=function(t,e){var a={};for(var u in t)a[u]=t[u];for(var u in e)a[u]=e[u];return a},FU=function(t,e,a){for(var u=t(),i=t.toString(),r=i.slice(i.indexOf("[")+1,i.lastIndexOf("]")).replace(/\s+/g,"").split(","),o=0;o>>=8};function u9(t,e){return e9(t,e||{},0,0)}var OT=function(t,e,a,u){for(var i in t){var r=t[i],o=e+i,d=u;Array.isArray(r)&&(d=a9(u,r[1]),r=r[0]),r instanceof Yt?a[o]=[r,d]:(a[o+="/"]=[new Yt(0),d],OT(r,o,a,u))}},IU=typeof TextEncoder<"u"&&new TextEncoder,jT=typeof TextDecoder<"u"&&new TextDecoder;try{jT.decode(LT,{stream:!0}),1}catch{}function Df(t,e){if(e){for(var a=new Yt(t.length),u=0;u>1)),o=0,d=function(g){r[o++]=g};for(u=0;ur.length){var h=new Yt(o+8+(i-u<<1));h.set(r),r=h}var m=t.charCodeAt(u);m<128||e?d(m):m<2048?(d(192|m>>6),d(128|63&m)):m>55295&&m<57344?(d(240|(m=65536+(1047552&m)|1023&t.charCodeAt(++u))>>18),d(128|m>>12&63),d(128|m>>6&63),d(128|63&m)):(d(224|m>>12),d(128|m>>6&63),d(128|63&m))}return jh(r,0,o)}var Cf=function(t){var e=0;if(t)for(var a in t){var u=t[a].length;u>65535&&Ft(9),e+=u+4}return e},i9=function(t,e,a,u,i,r,o,d){var h=u.length,m=a.extra,g=d&&d.length,v=Cf(m);Ku(t,e,null!=o?33639248:67324752),e+=4,null!=o&&(t[e++]=20,t[e++]=a.os),t[e]=20,e+=2,t[e++]=a.flag<<1|(r<0&&8),t[e++]=i&&8,t[e++]=255&a.compression,t[e++]=a.compression>>8;var k=new Date(null==a.mtime?Date.now():a.mtime),x=k.getFullYear()-1980;if((x<0||x>119)&&Ft(10),Ku(t,e,x<<25|k.getMonth()+1<<21|k.getDate()<<16|k.getHours()<<11|k.getMinutes()<<5|k.getSeconds()>>1),e+=4,-1!=r&&(Ku(t,e,a.crc),Ku(t,e+4,r<0?-r-2:r),Ku(t,e+8,a.size)),Ku(t,e+12,h),Ku(t,e+14,v),e+=16,null!=o&&(Ku(t,e,g),Ku(t,e+6,a.attrs),Ku(t,e+10,o),e+=14),t.set(u,e),e+=h,v)for(var D in m){var C=m[D],F=C.length;Ku(t,e,+D),Ku(t,e+2,F),t.set(C,e+4),e+=4+F}return g&&(t.set(d,e),e+=g),e},VU=function(t,e,a,u,i){Ku(t,e,101010256),Ku(t,e+8,a),Ku(t,e+10,a),Ku(t,e+12,u),Ku(t,e+16,i)};function lpe(t,e,a){a||(a=e,e={}),"function"!=typeof a&&Ft(7);var u={};OT(t,"",u,e);var i=Object.keys(u),r=i.length,o=0,d=0,h=r,m=new Array(r),g=[],v=function(){for(var F=0;F65535&&At(Ft(11,0,1),null),fa)if(G<16e4)try{At(null,u9(M,L))}catch(vt){At(vt,null)}else g.push(function ape(t,e,a){return a||(a=e,e={}),"function"!=typeof a&&Ft(7),Rv(t,e,[NT],function(u){return Gh(u9(u.data[0],u.data[1]))},0,a)}(M,L,At));else At(null,M)},C=0;C(((t,e,a)=>{e in t?spe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:a}):t[e]=a})(t,"symbol"!=typeof e?e+"":e,a),a);const cpe={"&":"&","<":"<",">":">",'"':""","'":"'"},OU=t=>("string"!=typeof t&&(t=`${t}`),t.replace(/[&<>"']/g,e=>cpe[e]));function Ic(t){const e=typeof t;return null!=t&&("object"===e||"function"===e)}function hpe(t){if("object"!=typeof t||null===t||"[object Object]"!==Object.prototype.toString.call(t))return!1;const e=Object.getPrototypeOf(t);if(null===e)return!0;const a=Object.prototype.hasOwnProperty.call(e,"constructor")&&e.constructor;return"function"==typeof a&&a instanceof a&&Function.prototype.call(a)===Function.prototype.call(t)}function Ip(t){return null!=t&&"string"==typeof t.valueOf()}const GT={};function ll(t="$lodash$"){GT[t]||(GT[t]=0);const e=++GT[t];return"$lodash$"===t?`${e}`:`${t}${e}`}class r9{constructor(e,a){ae(this,"documentElement"),this.documentElement=this.createElement(a),this.documentElement.setAttribute("xmlns",e)}createElement(e){return new o9({nodeName:e})}createTextNode(e){return new jU(e)}toString(){return this.documentElement.toString()}}ae(r9,"Node",{Create:t=>{switch(t.type){case"XML":return new o9(t);case"TEXT":return new jU(t.nodeValue);default:return null}}});class jU{constructor(e){ae(this,"nodeValue"),this.nodeValue=e}toJSON(){return{nodeValue:this.nodeValue,type:"TEXT"}}toString(){return OU(this.nodeValue)}}class o9{constructor(e){if(ae(this,"nodeName",""),ae(this,"children"),ae(this,"nodeValue"),ae(this,"attributes"),ae(this,"firstChild"),this.nodeName=e.nodeName,this.children=[],this.nodeValue=e.nodeValue||"",this.attributes={},e.children)for(let a=0,u=e.children.length;a${a}`:"/>",e}toJSON(){const e=[];for(let a=0,u=this.children.length;a0;)r-=Math.pow(26,u-1),i=r%Math.pow(26,u),r-=i,i/=Math.pow(26,u-1),o="ABCDEFGHIJKLMNOPQRSTUVWXYZ".charAt(i)+o,u+=1;return Op.LETTER_REFS[e]=o,o.concat(String(a))}};ae(l9,"_idSpaces",{}),ae(l9,"LETTER_REFS",{}),ae(l9,"schemas",{worksheet:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet",sharedStrings:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings",stylesheet:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles",relationships:"http://schemas.openxmlformats.org/officeDocument/2006/relationships",relationshipPackage:"http://schemas.openxmlformats.org/package/2006/relationships",contentTypes:"http://schemas.openxmlformats.org/package/2006/content-types",spreadsheetml:"http://schemas.openxmlformats.org/spreadsheetml/2006/main",markupCompat:"http://schemas.openxmlformats.org/markup-compatibility/2006",x14ac:"http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac",officeDocument:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument",package:"http://schemas.openxmlformats.org/package/2006/relationships",table:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/table",spreadsheetDrawing:"http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing",drawing:"http://schemas.openxmlformats.org/drawingml/2006/main",drawingRelationship:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/drawing",image:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",chart:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/chart",hyperlink:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink"});let me=l9;const Kh={};class s9{constructor(){ae(this,"relations",{}),ae(this,"lastId",1),ll("rId")}importData(e){this.relations=e.relations,this.lastId=e.lastId}exportData(){return{relations:this.relations,lastId:this.lastId}}addRelation(e,a){return this.relations[e.id]={id:ll("rId"),schema:me.schemas[a],object:e},this.relations[e.id].id}getRelationshipId(e){return this.relations[e.id]?this.relations[e.id].id:null}toXML(){const e=me.createXmlDoc(me.schemas.relationshipPackage,"Relationships"),a=e.documentElement;for(const[u,i]of Object.entries(this.relations)){const r=me.createElement(e,"Relationship",[["Id",i.id],["Type",i.schema],["Target",i.object.target||Kh[u]]]);i.object.targetMode&&r.setAttribute("TargetMode",i.object.targetMode),a.appendChild(r)}return e}}class Epe{constructor(){ae(this,"state",null),ae(this,"xSplit",null),ae(this,"ySplit",null),ae(this,"activePane","bottomRight"),ae(this,"topLeftCell",null),ae(this,"_freezePane")}freezePane(e,a,u){this._freezePane={xSplit:e,ySplit:a,cell:u}}exportXML(e){const a=e.createElement("pane");return null!==this.state&&(a.setAttribute("xSplit",this._freezePane.xSplit),a.setAttribute("ySplit",this._freezePane.ySplit),a.setAttribute("topLeftCell",this._freezePane.cell),a.setAttribute("activePane","bottomRight"),a.setAttribute("state","frozen")),a}}class UU{constructor(){ae(this,"strings",{}),ae(this,"stringArray",[]),ae(this,"id",ll("SharedStrings"))}addString(e){return this.strings[e]=this.stringArray.length,this.stringArray[this.stringArray.length]=e,this.strings[e]}exportData(){return this.strings}toXML(){const e=me.createXmlDoc(me.schemas.spreadsheetml,"sst"),a=e.documentElement;this.stringArray.reverse();let u=this.stringArray.length;a.setAttribute("count",u),a.setAttribute("uniqueCount",u);const i=e.createElement("si"),r=e.createElement("t");r.appendChild(e.createTextNode("--placeholder--")),i.appendChild(r);const o=this.stringArray;for(;u--;){const d=i.cloneNode(!0);"string"==typeof o[u]&&o[u].match(/\s+/)&&d.firstChild.setAttribute("xml:space","preserve"),d.firstChild.firstChild.nodeValue=o[u],a.appendChild(d)}return e}}class vpe{constructor(e){ae(this,"pane"),ae(this,"showZeros",null),ae(this,"defaultGridColor",null),ae(this,"colorId",null),ae(this,"rightToLeft",null),ae(this,"showFormulas",null),ae(this,"showGridLines",null),ae(this,"showOutlineSymbols",null),ae(this,"showRowColHeaders",null),ae(this,"showRuler",null),ae(this,"showWhiteSpace",null),ae(this,"tabSelected",null),ae(this,"topLeftCell",null),ae(this,"viewType",null),ae(this,"windowProtection",null),ae(this,"zoomScale",null),ae(this,"zoomScaleNormal",null),ae(this,"zoomScalePageLayoutView",null),ae(this,"zoomScaleSheetLayoutView",null);const a=e||{};this.pane=a.pane||new Epe}freezePane(e,a,u){this.pane.state="frozen",this.pane.xSplit=e,this.pane.ySplit=a,this.pane.topLeftCell=u}exportXML(e){const a=e.createElement("sheetViews"),u=e.createElement("sheetView");return me.setAttributesOnDoc(u,{workbookViewId:0,showZeros:{v:this.showZeros,type:Boolean},defaultGridColor:{v:this.defaultGridColor,type:Boolean},colorId:this.colorId,rightToLeft:{v:this.rightToLeft,type:Boolean},showFormulas:{v:this.showFormulas,type:Boolean},showGridLines:{v:this.showGridLines,type:Boolean},showOutlineSymbols:{v:this.showOutlineSymbols,type:Boolean},showRowColHeaders:{v:this.showRowColHeaders,type:Boolean},showRuler:{v:this.showRuler,type:Boolean},showWhiteSpace:{v:this.showWhiteSpace,type:Boolean},tabSelected:{v:this.tabSelected,type:Boolean},viewType:this.viewType,windowProtection:{v:this.windowProtection,type:Boolean},zoomScale:{v:this.zoomScale,type:Boolean},zoomScaleNormal:this.zoomScaleNormal,zoomScalePageLayoutView:this.zoomScalePageLayoutView,zoomScaleSheetLayoutView:this.zoomScaleSheetLayoutView}),u.appendChild(this.pane.exportXML(e)),a.appendChild(u),a}}class JU{constructor(){ae(this,"id",ll("StyleSheet")),ae(this,"cellStyles",[{name:"Normal",xfId:"0",builtinId:"0"}]),ae(this,"defaultTableStyle",!1),ae(this,"differentialStyles",[{}]),ae(this,"masterCellFormats",[{numFmtId:0,fontId:0,fillId:0,borderId:0,xfid:0}]),ae(this,"masterCellStyles",[{numFmtId:0,fontId:0,fillId:0,borderId:0}]),ae(this,"fonts",[{}]),ae(this,"numberFormatters",[]),ae(this,"fills",[{},{type:"pattern",patternType:"gray125",fgColor:"FF333333",bgColor:"FF333333"}]),ae(this,"borders",[{top:{},left:{},right:{},bottom:{},diagonal:{}}]),ae(this,"tableStyles",[])}createSimpleFormatter(e){const a={id:this.masterCellFormats.length};if("date"===e)a.numFmtId=14;return this.masterCellFormats.push(a),a}createFill(e){const a=this.fills.length,u=e;return u.id=a,this.fills.push(u),u}createNumberFormatter(e){const a={id:this.numberFormatters.length+100,formatCode:e};return this.numberFormatters.push(a),a}createFormat(e){const a={id:this.masterCellFormats.length};if(e.protection&&(a.protection=e.protection),e.font&&Ic(e.font))a.fontId=this.createFontStyle(e.font).id;else if(e.font){if(Number.isNaN(parseInt(e.font,10)))throw new Error("Passing a non-numeric font id is not supported");a.fontId=e.font}if(e.format&&Ip(e.format))a.numFmtId=this.createNumberFormatter(e.format).id;else if(e.format){if(Number.isNaN(parseInt(e.format,10)))throw new Error("Invalid number formatter id");a.numFmtId=e.format}if(e.border&&Ic(e.border))a.borderId=this.createBorderFormatter(e.border).id;else if(e.border){if(Number.isNaN(parseInt(e.border,10)))throw new Error("Passing a non-numeric border id is not supported");a.borderId=e.border}if(e.fill&&Ic(e.fill))a.fillId=this.createFill(e.fill).id;else if(e.fill){if(Number.isNaN(parseInt(e.fill,10)))throw new Error("Passing a non-numeric fill id is not supported");a.fillId=e.fill}return e.alignment&&Ic(e.alignment)&&(a.alignment=function mpe(t,e){return e.reduce((a,u)=>(null!=t&&t.hasOwnProperty(u)&&(a[u]=t[u]),a),{})}(e.alignment,["horizontal","justifyLastLine","readingOrder","relativeIndent","shrinkToFit","textRotation","vertical","wrapText"])),this.masterCellFormats.push(a),a}createDifferentialStyle(e){const a=this.differentialStyles.length,u={id:a};return e.font&&Ic(e.font)&&(u.font=e.font),e.border&&Ic(e.border)&&(u.border=Object.assign({top:{},left:{},right:{},bottom:{},diagonal:{}},e.border)),e.fill&&Ic(e.fill)&&(u.fill=e.fill),e.alignment&&Ic(e.alignment)&&(u.alignment=e.alignment),e.format&&Ip(e.format)&&(u.numFmt=e.format),this.differentialStyles[a]=u,u}createTableStyle(e){this.tableStyles.push(e)}createBorderFormatter(e){return e={top:{},left:{},right:{},bottom:{},diagonal:{},id:this.borders.length,...e},this.borders.push(e),e}createFontStyle(e){const a={id:this.fonts.length};return e.bold&&(a.bold=!0),e.italic&&(a.italic=!0),e.superscript&&(a.vertAlign="superscript"),e.subscript&&(a.vertAlign="subscript"),e.underline&&("string"==typeof e.underline&&["double","singleAccounting","doubleAccounting"].includes(e.underline)?a.underline=e.underline:a.underline=!0),e.strike&&(a.strike=!0),e.outline&&(a.outline=!0),e.shadow&&(a.shadow=!0),e.size&&(a.size=e.size),e.color&&(a.color=e.color),e.fontName&&(a.fontName=e.fontName),this.fonts.push(a),a}exportBorders(e){const a=e.createElement("borders");a.setAttribute("count",this.borders.length);for(let u=0,i=this.borders.length;u{const o=e.createElement(r);return a[r].style&&o.setAttribute("style",a[r].style),a[r].color&&o.appendChild(this.exportColor(e,a[r].color)),o};return u.appendChild(i("left")),u.appendChild(i("right")),u.appendChild(i("top")),u.appendChild(i("bottom")),u.appendChild(i("diagonal")),u}exportColor(e,a){const u=e.createElement("color");return Ip(a)?(u.setAttribute("rgb",a),u):(void 0!==a.tint&&u.setAttribute("tint",a.tint),void 0!==a.auto&&u.setAttribute("auto",String(!!a.auto)),void 0!==a.theme&&u.setAttribute("theme",a.theme),u)}exportMasterCellFormats(e){const a=me.createElement(e,"cellXfs",[["count",this.masterCellFormats.length]]);for(let u=0,i=this.masterCellFormats.length;u-1!==i.indexOf(d));if(a.alignment){const d=a.alignment;u.appendChild(this.exportAlignment(e,d))}a.protection&&(u.appendChild(this.exportProtection(e,a.protection)),u.setAttribute("applyProtection","1"));let o=r.length;for(;o--;)u.setAttribute(r[o],a[r[o]]);return a.fillId&&u.setAttribute("applyFill","1"),a.fontId&&u.setAttribute("applyFont","1"),a.borderId&&u.setAttribute("applyBorder","1"),a.alignment&&u.setAttribute("applyAlignment","1"),a.numFmtId&&u.setAttribute("applyNumberFormat","1"),void 0!==a.numFmtId&&void 0===a.xfId&&u.setAttribute("xfId","0"),u}exportAlignment(e,a){const u=e.createElement("alignment"),i=Object.keys(a);for(let r=0,o=i.length;r{if("name"===r)return;i++;const d=e.createElement("tableStyleElement");d.setAttribute("type",r),d.setAttribute("dxfId",o),u.appendChild(d)}),u.setAttribute("count",String(i)),u}exportProtection(e,a){const u=e.createElement("protection");for(const i in a)a.hasOwn(i)&&u.setAttribute(i,a[i]);return u}toXML(){const e=me.createXmlDoc(me.schemas.spreadsheetml,"styleSheet"),a=e.documentElement;return a.appendChild(this.exportNumberFormatters(e)),a.appendChild(this.exportFonts(e)),a.appendChild(this.exportFills(e)),a.appendChild(this.exportBorders(e)),a.appendChild(this.exportMasterCellStyles(e)),a.appendChild(this.exportMasterCellFormats(e)),a.appendChild(this.exportCellStyles(e)),a.appendChild(this.exportDifferentialStyles(e)),this.tableStyles.length&&a.appendChild(this.exportTableStyles(e)),e}}class bpe{constructor(e){ae(this,"name",""),ae(this,"id",ll("Worksheet")),ae(this,"_timezoneOffset"),ae(this,"relations",null),ae(this,"columnFormats",[]),ae(this,"data",[]),ae(this,"mergedCells",[]),ae(this,"columns",[]),ae(this,"sheetProtection",!1),ae(this,"_headers",[]),ae(this,"_footers",[]),ae(this,"_tables",[]),ae(this,"_drawings",[]),ae(this,"_orientation"),ae(this,"_margin"),ae(this,"_rowInstructions",{}),ae(this,"_freezePane",{}),ae(this,"sharedStrings",null),ae(this,"hyperlinks",[]),ae(this,"sheetView"),ae(this,"showZeros",null),this._timezoneOffset=60*(new Date).getTimezoneOffset()*1e3,this.sheetView=e.sheetView||new vpe,this.initialize(e)}initialize(e){e=e||{},this.name=e.name,this.id=ll("Worksheet"),this._timezoneOffset=60*(new Date).getTimezoneOffset()*1e3,e.columns&&this.setColumns(e.columns),this.relations=new s9}exportData(){return{relations:this.relations.exportData(),columnFormats:this.columnFormats,data:this.data,columns:this.columns,mergedCells:this.mergedCells,_headers:this._headers,_footers:this._footers,_tables:this._tables,_rowInstructions:this._rowInstructions,_freezePane:this._freezePane,name:this.name,id:this.id}}importData(e){this.relations.importData(e.relations),delete e.relations,Object.assign(this,e)}setSharedStringCollection(e){this.sharedStrings=e}addTable(e){this._tables.push(e),this.relations.addRelation(e,"table")}addDrawings(e){this._drawings.push(e),this.relations.addRelation(e,"drawingRelationship")}setRowInstructions(e,a){this._rowInstructions[e]=a}setHeader(e){if(!Array.isArray(e))throw"Invalid argument type - setHeader expects an array of three instructions";this._headers=e}setFooter(e){if(!Array.isArray(e))throw"Invalid argument type - setFooter expects an array of three instructions";this._footers=e}compilePageDetailPackage(e){return e=e||"",["&L",this.compilePageDetailPiece(e[0]||""),"&C",this.compilePageDetailPiece(e[1]||""),"&R",this.compilePageDetailPiece(e[2]||"")].join("")}compilePageDetailPiece(e){if(Ip(e))return'&"-,Regular"'.concat(e);if(Ic(e)&&!Array.isArray(e)){let a="";if(e.font||e.bold){const u=e.bold?"Bold":"Regular";a+=`&"${e.font||"-"}`,a+=`,${u}"`}else a+='&"-,Regular"';return e.underline&&(a+="&U"),e.fontSize&&(a+=`&${e.fontSize}`),a+=e.text,a}return Array.isArray(e)?e.reduce((a,u)=>a.concat(this.compilePageDetailPiece(u)),""):void 0}exportHeader(e){const a=e.createElement("oddHeader");return a.appendChild(e.createTextNode(this.compilePageDetailPackage(this._headers))),a}exportFooter(e){const a=e.createElement("oddFooter");return a.appendChild(e.createTextNode(this.compilePageDetailPackage(this._footers))),a}_buildCache(e){const a=e.createElement("c"),u=e.createElement("v");u.appendChild(e.createTextNode("--temp--")),a.appendChild(u);const i=e.createElement("c"),r=e.createElement("f");r.appendChild(e.createTextNode("--temp--")),i.appendChild(r);const o=e.createElement("c");o.setAttribute("t","s");const d=e.createElement("v");return d.appendChild(e.createTextNode("--temp--")),o.appendChild(d),{number:a,date:a,string:o,formula:i}}collectSharedStrings(){const e=this.data,a={};for(let u=0,i=e.length;u"u"&&(a[h]=!0)}}return Object.keys(a)}toXML(){var e,a,u;const i=this.data,r=this.columns||[],o=me.createXmlDoc(me.schemas.spreadsheetml,"worksheet"),d=o.documentElement;let h,m,g;d.setAttribute("xmlns:r",me.schemas.relationships),d.setAttribute("xmlns:mc",me.schemas.markupCompat);let v=0;const k=me.createElement(o,"sheetData"),x=this._buildCache(o);for(g=0,m=i.length;gv?C:v;const F=o.createElement("row");for(let A=0;A0){const D=o.createElement("hyperlinks"),C=this.hyperlinks;for(h=0,m=C.length;h0){const D=o.createElement("mergeCells");for(h=0,m=this.mergedCells.length;h0||this._footers.length>0){const D=o.createElement("headerFooter");this._headers.length>0&&D.appendChild(this.exportHeader(o)),this._footers.length>0&&D.appendChild(this.exportFooter(o)),d.appendChild(D)}for(h=0,m=this._drawings.length;h0){const D=o.createElement("tableParts");for(D.setAttribute("count",this._tables.length),h=0,m=this._tables.length;h31&&console.log(`Microsoft Excel requires work sheet names to be less than 32 characters long, work sheet name "${this.worksheets[d].name}" is ${this.worksheets[d].name.length} characters long`),m.setAttribute("name",this.worksheets[d].name),m.setAttribute("sheetId",d+1),m.setAttribute("r:id",this.relations.getRelationshipId(this.worksheets[d])),i.appendChild(m)}a.appendChild(i);const r=me.createElement(e,"definedNames");let o=0;for(const d in this.printTitles){if(!this.printTitles.hasOwn(d))continue;const h=this.printTitles[d],m=e.createElement("definedName");m.setAttribute("name","_xlnm.Print_Titles"),m.setAttribute("localSheetId",o++);let g="";h.top&&(g+=`${d}!$1:$${h.top}`,h.left&&(g+=",")),h.left&&(g+=`${d}!$A:$${h.left}`),m.appendChild(e.createTextNode(g)),r.appendChild(m)}return a.appendChild(r),e}createWorkbookRelationship(){const e=me.createXmlDoc(me.schemas.relationshipPackage,"Relationships");return e.documentElement.appendChild(me.createElement(e,"Relationship",[["Id","rId1"],["Type",me.schemas.officeDocument],["Target","xl/workbook.xml"]])),e}_generateCorePaths(e){let a,u;for(Kh[this.styleSheet.id]="styles.xml",Kh[this.sharedStrings.id]="sharedStrings.xml",Kh[this.id]="/xl/workbook.xml",a=0,u=this.tables.length;a\n${i}`}}generateFiles(){return new Promise(e=>{const a={};this._generateCorePaths(a);for(let u=0,i=this.worksheets.length;u{t.generateFiles().then(o=>{for(const[d,h]of Object.entries(o))u[d.substr(1)]=Df(h);return lpe(u,a?.zipOptions||{},(d,h)=>{if(d)r(d);else if("Uint8Array"===e)i(h);else{const m=a?.fileFormat??"xlsx";let g=a?.mimeType;void 0===g&&(g="xls"===m?"application/vnd.ms-excel":"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"),i(new Blob([h],{type:g}))}})})})}(t,"Blob",{...a,fileFormat:u}).then(i=>{!function fpe(t,e){const a=document.createElement("a"),u=URL.createObjectURL(e);a&&document&&(a.textContent="download",a.href=u,a.setAttribute("download",t),a.style.visibility="hidden",document.body.appendChild(a),a.click(),document.body.removeChild(a),URL.revokeObjectURL(u))}(e,i)})}const Dpe=(t,{excelFormatId:e})=>void 0!==e?{value:t,metadata:{style:e}}:t,Cpe=(t,{columnDef:e,excelFormatId:a,gridOptions:u})=>({value:"string"==typeof t&&/\d/g.test(t)?ype(t,e,u):t,metadata:{style:a}});function ype(t,e,a){let u=t;if("string"==typeof t&&t){const i=nd("decimalSeparator",e,a,ue.DEFAULT_NUMBER_DECIMAL_SEPARATOR),r=parseFloat(","===i?t.replace(/[^0-9,-]+/g,"").replace(",","."):t.replace(/[^\d.-]/g,""));u=isNaN(r)?t:r}return u}function _pe(t,e,a,u,i=!0){const r=I2(a);let o,d=Dpe;return r===w.number&&i&&(o=KT(t,e,a,u,"cell").excelFormat.id,d=Cpe),{excelFormatId:o,getDataValueParser:d}}function Fpe(t,e){return t?.[e.groupType]?.[e.columnDef.field]??0}function $U(t){let e;switch(t){case j.currency:case j.dollar:case j.dollarColored:case j.dollarColoredBold:e="currency";break;case j.percent:case j.percentComplete:case j.percentCompleteBar:case j.percentCompleteBarWithText:case j.percentSymbol:e="percent";break;case j.decimal:default:e="decimal"}return e}function KT(t,e,a,u,i){let d,r="",o=a.groupTotalsExcelExportOptions?.groupType||"";const h=I2(a);if("group"===i)switch(a.groupTotalsFormatter){case Wa.avgTotals:case Wa.avgTotalsCurrency:case Wa.avgTotalsDollar:case Wa.avgTotalsPercentage:o="avg";break;case Wa.minTotals:o="min";break;case Wa.maxTotals:o="max";break;case Wa.sumTotals:case Wa.sumTotalsBold:case Wa.sumTotalsColored:case Wa.sumTotalsCurrency:case Wa.sumTotalsCurrencyColored:case Wa.sumTotalsDollar:case Wa.sumTotalsDollarColoredBold:case Wa.sumTotalsDollarColored:case Wa.sumTotalsDollarBold:o="sum";break;default:d=e.numberFormat}else if(h===w.number)switch(a.formatter){case j.multiple:if(Array.isArray(a.params?.formatters))for(const m of a.params.formatters){const{excelFormat:g}=KT(t,e,{...a,formatter:m},u,i);if(g!==e.numberFormat){d=g;break}}d||(d=e.numberFormat);break;case j.currency:case j.decimal:case j.dollar:case j.dollarColored:case j.dollarColoredBold:case j.percent:case j.percentComplete:case j.percentCompleteBar:case j.percentCompleteBarWithText:case j.percentSymbol:r=YU(a,u,"cell");break;default:d=e.numberFormat}return!d&&(a.formatter||a.groupTotalsFormatter)&&(r=YU(a,u,i,o),e.hasOwnProperty(r)||(e[r]=t.createFormat({format:r})),d=e[r]),{excelFormat:d,groupType:o}}function qU(t){const[e,a,u,i,r,o,d,h]=t?.match(/^([^\d(-]*)([(]?)([^\d]*)([-]?[\w]]?[\d\s]*[.,\d]*[\d]*[^)\s%]?)([^\d.,)]*)([)]?)([^\d]*)$/i)||[],m=(r||"").replace(/1/g,"0").replace(/[2]/g,"#");return[d9(a??""),u??"",d9(i??""),m,d9(o??""),d??"",d9(h??"")].join("").replace(",",",")}function YU(t,e,a,u=""){let i="",r="",o="";const{minDecimal:d,maxDecimal:h,thousandSeparator:m}=function Ape(t,e,a){let u;if("group"===a)switch(t.groupTotalsFormatter){case Wa.avgTotalsCurrency:case Wa.avgTotalsDollar:case Wa.sumTotalsCurrency:case Wa.sumTotalsCurrencyColored:case Wa.sumTotalsDollar:case Wa.sumTotalsDollarBold:case Wa.sumTotalsDollarColored:case Wa.sumTotalsDollarColoredBold:u="currency";break;case Wa.avgTotalsPercentage:u="percent";break;case Wa.avgTotals:case Wa.minTotals:case Wa.maxTotals:case Wa.sumTotals:case Wa.sumTotalsColored:case Wa.sumTotalsBold:default:u="decimal"}else if(t.formatter===j.multiple&&Array.isArray(t.params?.formatters)){u="decimal";for(const i of t.params.formatters)if(u=$U(i),"decimal"!==u)break}else u=$U(t.formatter);return ju(t,e,u,a)}(t,e,a),v=parseFloat(`${m?"2220":"0"}.${function wpe(t,e){return QU("1",t)+QU("2",e-t)}(d,h)}`);return"group"===a&&t.groupTotalsFormatter?(r=Tu(t.groupTotalsFormatter({[u]:{[t.field]:v}},t,e)),o=Tu(t.groupTotalsFormatter({[u]:{[t.field]:-v}},t,e))):t.formatter&&(r=Tu(t.formatter(0,0,v,t,{},e)),o=Tu(t.formatter(0,0,-v,t,{},e))),r&&o&&(i=qU(r)+";"+qU(o)),i}function d9(t){return t&&`"${t}"`}function QU(t,e){let a="";for(let u=0;u{const i={name:this._excelExportOptions.sheetName||"Sheet1"};this._workbook=new ZU,this._sheet=this._workbook.createWorksheet(i),this._stylesheet=this._workbook.getStyleSheet();const r=this._stylesheet.createFormat({font:{bold:!0}}),o=this._stylesheet.createFormat({format:"@"}),d=this._stylesheet.createFormat({format:"0"});this._stylesheetFormats={boldFormat:r,numberFormat:d,stringFormat:o},this._sheet.setColumnFormats([r]);const h=this.getDataOutput();setTimeout(Su(function*(){a._gridOptions?.excelExportOptions?.customExcelHeader&&a._gridOptions.excelExportOptions.customExcelHeader(a._workbook,a._sheet);const m=a._grid?.getColumns()||[];a._sheet.setColumns(a.getColumnStyles(m));const g=a._sheet.data;let v=g;Array.isArray(g)&&Array.isArray(h)&&(v=a._sheet.data.concat(h)),a._sheet.setData(v),a._workbook.addWorksheet(a._sheet);let k=a._excelExportOptions?.mimeType;void 0===k&&(k=a._fileFormat===yt.xls?"application/vnd.ms-excel":"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");const x=`${a._excelExportOptions.filename}.${a._fileFormat}`;xpe(a._workbook,x,{mimeType:k}).then(()=>{a._pubSubService?.publish("onAfterExportToExcel",{filename:x,mimeType:k}),u(!0)})}))})}getExcelColumnNameByIndex(e){const a="ZABCDEFGHIJKLMNOPQRSTUVWXY";let u=Math.floor(e/26);const i=Math.floor(e%26);return 0===i&&u--,e>26?this.getExcelColumnNameByIndex(u)+a[i]:a[i]+""}getDataOutput(){const e=this._grid?.getColumns()||[],a=[],i=this._gridOptions?.excelExportOptions?.columnHeaderStyle;let r=this._stylesheetFormats.boldFormat.id;if(i&&(r=this._stylesheet.createFormat(i).id),this._gridOptions.createPreHeaderPanel&&this._gridOptions.showPreHeaderPanel&&!this._gridOptions.enableDraggableGrouping){const o=this._stylesheet.createFormat({alignment:{horizontal:"center"},font:{bold:!0}});a.push(this.getColumnGroupedHeaderTitlesData(e,{style:o?.id})),this._hasColumnTitlePreHeader=!0}return a.push(this.getColumnHeaderData(e,{style:r})),this.pushAllGridRowDataToArray(a,e),a}getColumnStyles(e){const a=this._dataView.getGrouping(),u=[];return Array.isArray(a)&&a.length>0&&u.push({bestFit:!0,columnStyles:this._gridOptions?.excelExportOptions?.customColumnWidth??10}),e.forEach(i=>{const r=i.excludeFromExport??!1;(void 0===i.width||i.width>0)&&!r&&u.push({bestFit:!0,width:i.excelExportOptions?.width??this._gridOptions?.excelExportOptions?.customColumnWidth??10})}),u}getColumnGroupedHeaderTitlesData(e,a){let u=[];this._groupedColumnHeaders=this.getColumnGroupedHeaderTitles(e)||[],this._groupedColumnHeaders&&Array.isArray(this._groupedColumnHeaders)&&this._groupedColumnHeaders.length>0&&(u=this._groupedColumnHeaders.map(o=>({value:o.title,metadata:a})));let i=0;const r=this._groupedColumnHeaders.length;for(let o=0;o0&&(u=this._columnHeaders.map(r=>({value:Tu(r.title),metadata:a})));const i=this.getGroupColumnTitle();return i&&u.unshift({value:i,metadata:a}),u}getGroupColumnTitle(){let e=this._excelExportOptions.groupingColumnHeaderTitle;!e&&this._gridOptions.enableTranslate&&this._translaterService?.translate?e=this._translaterService.translate(`${Gl(this._gridOptions)}GROUP_BY`):e||(e=this._locales?.TEXT_GROUP_BY);const a=this._dataView.getGrouping();return Array.isArray(a)&&a.length>0?(this._hasGroupedItems=!0,e):(this._hasGroupedItems=!1,null)}getColumnGroupedHeaderTitles(e){const a=[];return Array.isArray(e)&&e.forEach(u=>{let i="";i=u.columnGroupKey&&this._gridOptions.enableTranslate&&this._translaterService?.translate?this._translaterService.translate(u.columnGroupKey):u.columnGroup||"";const r=u.excludeFromExport||!1;(void 0===u.width||u.width>0)&&!r&&a.push({key:u.field||u.id,title:i||""})}),a}getColumnHeaders(e){const a=[];return Array.isArray(e)&&e.forEach(u=>{let i="";i=(u.nameKey||u.nameKey)&&this._gridOptions.enableTranslate&&this._translaterService?.translate?this._translaterService.translate(u.nameKey||u.nameKey):ui(u.name||"","innerHTML")||yo(u.field);const r=u.excludeFromExport||!1;(void 0===u.width||u.width>0)&&!r&&a.push({key:(u.field||u.id)+"",title:i})}),a}pushAllGridRowDataToArray(e,a){const u=this._dataView.getLength();for(let i=0;i1||"*"===h&&v>0||(h=F?.colspan??1),"*"===h?x=e.length-v:(x=h,k.id in C&&(D=k.id,m=v))}if("*"===h&&v>0||!isNaN(h)&&+h>1&&k.id!==D){const C=a+(this._hasColumnTitlePreHeader?3:2);if("number"==typeof h&&x-1==1){const F=this.getExcelColumnNameByIndex(m+1),A=this.getExcelColumnNameByIndex(v+1);this._sheet.mergeCells(`${F}${C}`,`${A}${C}`),o.push("")}else if("*"===h&&1===x){const F=this.getExcelColumnNameByIndex(v+1);this._sheet.mergeCells(`A${C}`,`${F}${C}`)}else o.push("");"number"==typeof h&&!isNaN(h)&&+h>1&&(x=h--)}else{let C="";const F=I2(k),A={...this._excelExportOptions};if(!1!==k.exportWithFormatter&&dL(F)&&(A.exportWithFormatter=!0),C=oT(a,v,k,u,this._grid,A),!this._regularCellExcelFormats.hasOwnProperty(k.id)){const L=k.excelExportOptions?.autoDetectCellFormat??this._excelExportOptions?.autoDetectCellFormat,R=_pe(this._stylesheet,this._stylesheetFormats,k,this._grid,L);k.excelExportOptions?.style&&(R.excelFormatId=this._stylesheet.createFormat(k.excelExportOptions.style).id),k.excelExportOptions?.valueParserCallback&&(R.getDataValueParser=k.excelExportOptions.valueParserCallback),this._regularCellExcelFormats[k.id]=R}"string"==typeof C&&(k.sanitizeDataExport||this._excelExportOptions.sanitizeDataExport)&&(C=Tu(C));const{excelFormatId:z,getDataValueParser:M}=this._regularCellExcelFormats[k.id];C=M(C,{columnDef:k,excelFormatId:z,stylesheet:this._stylesheet,gridOptions:this._gridOptions,dataRowIdx:i,dataContext:u}),o.push(C),r++}}return o}readGroupedRowTitle(e){const a=Tu(e.title);if(this._excelExportOptions?.addGroupIndentation){const u=this._excelExportOptions?.groupCollapsedSymbol||"\u2b9e",i=this._excelExportOptions?.groupExpandedSymbol||"\u2b9f";return(e.collapsed?u:i)+" "+kv(5*e.level)+a}return a}readGroupedTotalRows(e,a,u){const r=[this._excelExportOptions.groupingAggregatorRowText||""];return e.forEach(o=>{let d="";const h=I2(o),m=o.excludeFromExport||!1;if(o.exportCustomGroupTotalsFormatter){const v=o.exportCustomGroupTotalsFormatter(a,o,this._grid);d=v instanceof HTMLElement?v.textContent||"":v}const g=o.excelExportOptions?.autoDetectCellFormat??this._excelExportOptions?.autoDetectCellFormat;if(h===w.number&&!1!==g){let v=this._groupTotalExcelFormats[o.id];v?.groupType||(v=KT(this._stylesheet,this._stylesheetFormats,o,this._grid,"group"),o.groupTotalsExcelExportOptions?.style&&(v.excelFormat=this._stylesheet.createFormat(o.groupTotalsExcelExportOptions.style)),this._groupTotalExcelFormats[o.id]=v);const k=o.groupTotalsExcelExportOptions?.valueParserCallback??Fpe;if(void 0!==a[v.groupType]?.[o.field]){const x=k(a,{columnDef:o,groupType:v.groupType,excelFormatId:v.excelFormat?.id,stylesheet:this._stylesheet,dataRowIdx:u});d="object"==typeof x&&x.hasOwnProperty("metadata")?x:d={value:x,metadata:{style:v.excelFormat?.id}}}}else if(o.groupTotalsFormatter){const v=o.groupTotalsFormatter(a,o,this._grid);d=v instanceof HTMLElement?v.textContent||"":v}"string"==typeof d&&(o.sanitizeDataExport||this._excelExportOptions.sanitizeDataExport)&&(d=Tu(d)),(void 0===o.width||o.width>0)&&!m&&r.push(d)}),r}}class WT{constructor(){this._clearFilterTriggered=!1,this._shouldTriggerQuery=!0,this.searchTerms=[],this.operator=te.equal}get columnFilter(){return this.columnDef?.filter??{}}get gridOptions(){return this.grid?.getOptions()??{}}init(e){this.grid=e.grid,this.callback=e.callback,this.columnDef=e.columnDef,this.searchTerms=(e.hasOwnProperty("searchTerms")?e.searchTerms:[])||[];const a=Array.isArray(this.searchTerms)&&this.searchTerms.length>=0?this.searchTerms[0]:"";this.filterElm=this.createFilterElement(a),this.filterElm?.addEventListener("keyup",this.onKeyup.bind(this))}clear(e=!0){this.filterElm&&(this._clearFilterTriggered=!0,this._shouldTriggerQuery=e,this.filterElm.value="",this.filterElm.dispatchEvent(new Event("keyup")))}destroy(){this.filterElm?.removeEventListener("keyup",this.onKeyup.bind(this)),this.filterElm?.remove()}setValues(e){e&&this.filterElm&&(this.filterElm.value=e)}onKeyup(e){let a=e?.target?.value??"";const u=this.gridOptions.enableFilterTrimWhiteSpace||this.columnFilter.enableTrimWhiteSpace;"string"==typeof a&&u&&(a=a.trim()),this._clearFilterTriggered?(this.callback(e,{columnDef:this.columnDef,clearFilterTriggered:this._clearFilterTriggered,shouldTriggerQuery:this._shouldTriggerQuery}),this.filterElm?.classList.remove("filled")):(""===a?this.filterElm?.classList.remove("filled"):this.filterElm?.classList.add("filled"),this.callback(e,{columnDef:this.columnDef,searchTerms:[a],shouldTriggerQuery:this._shouldTriggerQuery})),this._clearFilterTriggered=!1,this._shouldTriggerQuery=!0}createFilterElement(e){const a=this.grid.getHeaderRowColumn(this.columnDef.id);if(a){a.innerHTML="";let u=this.gridOptions?.defaultFilterPlaceholder??"";this.columnFilter?.placeholder&&(u=this.columnFilter.placeholder),this.filterElm=document.createElement("input"),this.filterElm.type="text",this.filterElm.className="form-control search-filter",this.filterElm.placeholder=u,this.filterElm.value=`${e||""}`,this.filterElm.dataset.columnid=`${this.columnDef.id}`,a.appendChild(this.filterElm)}return this.filterElm}}function Rc(t,e){return Math.floor(Math.random()*(e-t+1)+t)}let c9=class{constructor(e,a){this.http=e,this.translate=a,this.title="Example 4: Client Side Sort/Filter",this.subTitle='\n Sort/Filter on client side only using SlickGrid DataView (Wiki docs)\n
\n
    \n
  • Support multi-sort (by default), hold "Shift" key and click on the next column to sort.
  • \n
  • All column types support the following operators: (>, >=, <, <=, <>, !=, =, ==, *)
  • \n
      \n
    • Example: >100 ... >=2001-01-01 ... >02/28/17
    • \n
    • Note: For filters to work properly (default is string), make sure to provide a FieldType (type is against the dataset, not the Formatter)
    • \n
    \n
  • Date Filters
  • \n
      \n
    • \n FieldType of dateUtc/date (from dataset) can use an extra option of "filterSearchType" to let user filter more easily.\n For example, in the "UTC Date" field below, you can type ">02/28/2017", also when dealing with UTC you have to take the time difference in consideration.\n
    • \n
    \n
  • On String filters, (*) can be used as startsWith (Hello* => matches "Hello Word") ... endsWith (*Doe => matches: "John Doe")
  • \n
  • Custom Filter are now possible, "Description" column below, is a customized InputFilter with different placeholder. See Wiki - Custom Filter\n
  • MultipleSelect & SingeSelect Filters can use a regular "collection" or "collectionAsync" to load it asynchronously
  • \n
\n ',this.columnDefinitions=[]}ngOnInit(){this.columnDefinitions=[{id:"title",name:"Title",field:"title",sortable:!0,minWidth:55,type:w.string,filterable:!0,filter:{model:ie.compoundInputText}},{id:"description",name:"Description",field:"description",filterable:!0,sortable:!0,minWidth:80,type:w.string,filter:{model:WT,enableTrimWhiteSpace:!0}},{id:"duration",name:"Duration (days)",field:"duration",sortable:!0,type:w.number,exportCsvForceToKeepAsString:!0,minWidth:55,filterable:!0,filter:{collectionAsync:this.http.get("assets/data/collection_500_numbers.json"),collectionFilterBy:[{property:"value",operator:te.notEqual,value:360},{property:"value",operator:te.notEqual,value:365}],collectionSortBy:{property:"value",sortDesc:!0,fieldType:w.number},customStructure:{value:"value",label:"label",optionLabel:"value",labelSuffix:"text"},collectionOptions:{separatorBetweenTextLabels:" ",filterResultAfterEachPass:"chain"},model:ie.multipleSelect,filterOptions:{maxHeight:250,width:175,useSelectOptionLabelToHtml:!0}}},{id:"complete",name:"% Complete",field:"percentComplete",formatter:j.percentCompleteBar,minWidth:70,type:w.number,sortable:!0,filterable:!0,filter:{model:ie.compoundInputNumber}},{id:"start",name:"Start",field:"start",formatter:j.dateIso,sortable:!0,minWidth:75,type:w.date,filterable:!0,filter:{model:ie.compoundDate}},{id:"usDateShort",name:"US Date Short",field:"usDateShort",sortable:!0,minWidth:70,width:70,type:w.dateUsShort,exportWithFormatter:!0,filterable:!0,filter:{model:ie.compoundDate}},{id:"utcDate",name:"UTC Date",field:"utcDate",formatter:j.dateTimeIsoAmPm,sortable:!0,minWidth:115,type:w.dateUtc,exportWithFormatter:!0,outputType:w.dateTimeIsoAmPm,filterable:!0,filter:{model:ie.compoundDate,filterOptions:{range:{date:"today"}}}},{id:"effort-driven",name:"Effort Driven",field:"effortDriven.isEffort",minWidth:85,maxWidth:85,type:w.boolean,sortable:!0,exportCustomFormatter:j.complexObject,formatter:j.multiple,params:{formatters:[j.complexObject,j.checkmarkMaterial]},filterable:!0,filter:{collection:[{isEffort:"",label:""},{isEffort:!0,label:"True"},{isEffort:!1,label:"False"}],customStructure:{value:"isEffort",label:"label"},model:ie.singleSelect,filterOptions:{autoAdjustDropHeight:!0}}}],this.gridOptions={autoResize:{container:"#demo-container",rightPadding:10},enableExcelExport:!0,enableExcelCopyBuffer:!0,enableFiltering:!0,i18n:this.translate,showCustomFooter:!0,presets:{filters:[{columnId:"duration",searchTerms:[10,98]},{columnId:"usDateShort",operator:"<",searchTerms:["4/20/25"]}],sorters:[{columnId:"duration",direction:"DESC"},{columnId:"complete",direction:"ASC"}]},externalResources:[new Ao]},this.dataset=this.mockData(1500)}angularGridReady(e){this.angularGrid=e}mockData(e,a=0){const u=[];for(let i=a;i=",searchTerms:["2001-02-28"]}])}setSortingDynamically(){this.angularGrid.sortService.updateSorting([{columnId:"duration",direction:"ASC"},{columnId:"start",direction:"DESC"}])}refreshMetrics(e,a){a&&a.current>=0&&setTimeout(()=>{this.metrics={startTime:new Date,endTime:new Date,itemCount:a&&a.current||0,totalItemCount:this.dataset.length||0}})}scrollGridBottom(){this.angularGrid.slickGrid.navigateBottom()}scrollGridTop(){this.angularGrid.slickGrid.navigateTop()}static#e=this.ctorParameters=()=>[{type:jt},{type:at}]};c9=Ze([ca({template:'
\n

\n {{title}}\n \n \n code\n \n \n

\n
\n\n
\n \n Metrics: {{metrics.startTime | date: \'yyyy-MM-dd hh:mm aaaaa\\\'m\\\'\'}} | {{metrics.itemCount}} of\n {{metrics.totalItemCount}} items\n \n
\n \n \n
\n \n \n \n \n\n \n \n
'}),Ct("design:paramtypes",[jt,at])],c9);var Lpe=O(778),Tpe=O.n(Lpe);let h9=class{constructor(){this.title="Example 15: Column Span & Header Grouping",this.subTitle="\n This example demonstrates how to easily span a row over multiple columns & how to group header titles.\n
    \n
  • Note that you can add Sort but remember that it will sort by the data which the row contains, even if the data is visually hidden by colspan it will still sort it
  • \n
  • \n Header Grouping spanning accross multiple columns is working but has some UI issues on window resize.\n If anyone can fix it, probably some CSS issues, please let us know.\n
  • \n
\n ",this.dataset1=[],this.dataset2=[]}ngOnInit(){this.prepareGrid1(),this.prepareGrid2()}angularGridReady2(e){this.angularGrid2=e,this.gridObj2=e.slickGrid}prepareGrid1(){this.columnDefinitions1=[{id:"title",name:"Title",field:"title",sortable:!0,columnGroup:"Common Factor"},{id:"duration",name:"Duration",field:"duration",columnGroup:"Common Factor"},{id:"start",name:"Start",field:"start",columnGroup:"Period"},{id:"finish",name:"Finish",field:"finish",columnGroup:"Period"},{id:"%",name:"% Complete",field:"percentComplete",selectable:!1,columnGroup:"Analysis"},{id:"effort-driven",name:"Effort Driven",field:"effortDriven",type:w.boolean,columnGroup:"Analysis"}],this.gridOptions1={gridHeight:275,gridWidth:800,enableAutoResize:!1,enableCellNavigation:!0,enableSorting:!0,createPreHeaderPanel:!0,showPreHeaderPanel:!0,preHeaderPanelHeight:28,explicitInitialization:!0,colspanCallback:this.renderDifferentColspan,gridMenu:{iconButtonContainer:"preheader"},enableExcelExport:!0,excelExportOptions:{exportWithFormatter:!1},externalResources:[new Ao]},this.dataset1=this.getData(500)}prepareGrid2(){this.columnDefinitions2=[{id:"sel",name:"#",field:"num",behavior:"select",cssClass:"cell-selection",width:40,resizable:!1,selectable:!1},{id:"title",name:"Title",field:"title",sortable:!0,columnGroup:"Common Factor"},{id:"duration",name:"Duration",field:"duration",columnGroup:"Common Factor"},{id:"start",name:"Start",field:"start",columnGroup:"Period"},{id:"finish",name:"Finish",field:"finish",columnGroup:"Period"},{id:"%",name:"% Complete",field:"percentComplete",selectable:!1,columnGroup:"Analysis"},{id:"effort-driven",name:"Effort Driven",field:"effortDriven",type:w.boolean,columnGroup:"Analysis"}],this.gridOptions2={gridHeight:275,gridWidth:800,enableCellNavigation:!0,createPreHeaderPanel:!0,showPreHeaderPanel:!0,preHeaderPanelHeight:25,explicitInitialization:!0,frozenColumn:2,gridMenu:{hideClearFrozenColumnsCommand:!1},headerMenu:{hideFreezeColumnsCommand:!1},enableExcelExport:!0,excelExportOptions:{exportWithFormatter:!1},externalResources:[new Ao]},this.dataset2=this.getData(500)}getData(e){const a=[];for(let u=0;u\n

\n {{title}}\n \n \n code\n \n \n

\n
\n\n

Grid 1 (with Header Grouping & Colspan)

\n \n \n\n
\n\n

Grid 2 (with Header Grouping & Frozen/Pinned Columns)

\n
\n \n \n
\n \n \n',styles:[Tpe()]})],h9);var Npe=O(127),Ipe=O.n(Npe);function XU(t,e,a){let u;a={modalType:"edit",validationFailedMsg:"Some of the fields have failed validation",validationMsgPrefix:null,show:null,hide:null,position:null,destroy:null,formValues:{},editors:{},...a};const r=()=>{},o=h=>{const m=e[h],g=Lu(m),v=m?.clientWidth??0,k=m?.clientHeight??0;return{top:g.top,left:g.left,bottom:g.top+k,right:g.left+v,width:v,height:k,visible:!0}};function d(h){const m=this;let g=[];m.getEditors=()=>g,m.destroy=()=>{let k=g.pop();for(;k;)k?.destroy(),k=g.pop();let x=e.pop();for(;x;)_t(x),x?.remove(),x=e.pop();a?.destroy?.(),g=[],e=null},m.focus=()=>{(u||g[0]).focus()},m.isValueChanged=()=>{let k=0;for(;k{const k=[];let x=0;for(;x{let D=0;for(;D{let x=0;for(;x{let x;u=null;const D=[];let C=0;for(;C{let k=0;for(;k{let k=0;for(;k{a?.position?.(k)},function v(){let k={},x=0;for(;x{Array.isArray(g)&&g.length>0&&"function"==typeof g[0].focus&&g[0].focus()},0)}()}return d.prototype=this,d}const eJ=t=>console.log(t.message);class Rpe{get eventHandler(){return this._eventHandler}get dataView(){return this.grid?.getData()}get dataViewLength(){return this.dataView.getLength()}get formValues(){return this._formValues}get editors(){return this._editors}set editors(e){this._editors=e}get gridOptions(){return this.grid?.getOptions()}constructor(){this._columnDefinitions=[],this._lastActiveRowNumber=-1,this._formValues=null,this.gridService=null,this._eventHandler=new Ut,this._bindEventService=new Ni}init(e,a){if(this.grid=e,this.gridService=a.get("GridService"),this.translaterService=a.get("TranslaterService"),!this.gridService)throw new Error("[Slickgrid-Universal] it seems that the GridService is not being loaded properly, make sure the Container Service is properly implemented.");if(this.gridOptions.enableTranslate&&(!this.translaterService||!this.translaterService.translate))throw new Error('[Slickgrid-Universal] requires a Translate Service to be installed and configured when the grid option "enableTranslate" is enabled.');this._locales=this.gridOptions?.locales??ue.locales}dispose(){this._eventHandler.unsubscribeAll(),this._bindEventService.unbindAll(),this._formValues=null,this.disposeComponent()}disposeComponent(){this._modalBodyTopValidationElm?.remove(),this._modalSaveButtonElm?.remove(),"function"==typeof this._modalElm?.remove&&(this._modalElm.remove(),document.body.classList.remove("slick-modal-open")),this._editorContainers=[]}changeFormInputValue(e,a,u=!1,i=!0){const r=this.getColumnByObjectOrId(e),o="string"==typeof e?e:r?.id??"",d=this._editors?.[o];let h=a;if(!d&&!u)throw new Error(`Composite Editor with column id "${o}" not found.`);if("function"==typeof d?.setValue&&Array.isArray(this._editorContainers)){d.setValue(a,!0,i);const g=this._editorContainers.find(k=>k.dataset.editorid===o),v=this.gridOptions?.compositeEditorOptions?.excludeDisabledFieldFormValues??!1;!d.disabled||d.disabled&&!v?g?.classList?.add("modified"):(h="",g?.classList?.remove("modified")),d.disabled&&(""!==h||null!==h||void 0!==h||0!==h)&&(h="")}const m=r?.field??"";if(r&&m?.includes(".")){const g=r.editor?.complexObjectPath??m??"";vr(this._formValues??{},g,a)}else this._formValues={...this._formValues,[o]:h}}changeFormValue(e,a){const u=this.getColumnByObjectOrId(e),i="string"==typeof e?e:u?.id??"",r=u?.field??e;if(r?.includes(".")){const o=u?.editor?.complexObjectPath??r??"";vr(this._formValues,o,a)}else this._formValues={...this._formValues,[i]:a};this._formValues=Ap({},this._itemDataContext,this._formValues)}changeFormEditorOption(e,a,u){const i=this._editors?.[e];if(!i?.changeEditorOption)throw new Error(`Editor with column id "${e}" not found OR the Editor does not support "changeEditorOption" (current only available with AutoComplete, Date, MultipleSelect & SingleSelect Editors).`);i.changeEditorOption(a,u)}disableFormInput(e,a=!0){const u=this._editors?.[e];u?.disable&&Array.isArray(this._editorContainers)&&u.disable(a)}openDetails(e){const a=e.onError??eJ,u={backdrop:"static",showCloseButtonOutside:!0,shouldClearRowSelectionAfterMassAction:!0,viewColumnLayout:"auto",modalType:"edit"};try{if(!this.grid||this.grid.getEditorLock().isActive()&&!this.grid.getEditorLock().commitCurrentEdit())return null;this._formValues=null,this._options={...u,...this.gridOptions.compositeEditorOptions,...e,labels:{...this.gridOptions.compositeEditorOptions?.labels,...e?.labels}},this._options.backdrop=void 0!==e.backdrop?e.backdrop:"static";const i=this._options.viewColumnLayout||1,r=this.grid.getActiveCell(),o=r?.cell??0,d=r?.row??0,h=this.grid.getUID()||"";let m=e.headerTitle||"";"function"==typeof this._options.onBeforeOpen&&this._options.onBeforeOpen(),this.hasRowSelectionEnabled()&&"auto-mass"===this._options.modalType&&this.grid.getSelectedRows&&((this.grid.getSelectedRows()||[]).length>0?(this._options.modalType="mass-selection",e?.headerTitleMassSelection&&(m=e?.headerTitleMassSelection)):(this._options.modalType="mass-update",e?.headerTitleMassUpdate&&(m=e?.headerTitleMassUpdate)));const g=this._options.modalType||"edit";if(!this.gridOptions.editable)return a({type:"error",code:"EDITABLE_GRID_REQUIRED",message:"Your grid must be editable in order to use the Composite Editor Modal."}),null;if(!this.gridOptions.enableCellNavigation)return a({type:"error",code:"ENABLE_CELL_NAVIGATION_REQUIRED",message:'Composite Editor requires the flag "enableCellNavigation" to be set to True in your Grid Options.'}),null;if(!this.gridOptions.enableAddRow&&("clone"===g||"create"===g))return a({type:"error",code:"ENABLE_ADD_ROW_REQUIRED",message:'Composite Editor requires the flag "enableAddRow" to be set to True in your Grid Options when cloning/creating a new item.'}),null;if(!r&&("clone"===g||"edit"===g))return a({type:"warning",code:"NO_RECORD_FOUND",message:"No records selected for edit or clone operation."}),null;{const v="mass-update"===g||"mass-selection"===g,k=v?{}:this.grid.getDataItem(d);this._originalDataContext=cu(!0,{},k),this._columnDefinitions=this.grid.getColumns();const x=this.hasRowSelectionEnabled()?this.grid.getSelectedRows():[],D=this.dataView?.getItemCount()??0;this._lastActiveRowNumber=d;const C=this.dataView.getAllSelectedIds(),F="create"===g?this.dataViewLength:d;if(!this.focusOnFirstColumnCellWithEditor(this._columnDefinitions,k,o,F,v))return null;if("edit"===g&&!k)return a({type:"warning",code:"ROW_NOT_EDITABLE",message:"Current row is not editable."}),null;if("mass-selection"===g&&x.length<1)return a({type:"warning",code:"ROW_SELECTION_REQUIRED",message:"You must select some rows before trying to apply new value(s)."}),null;let z=[];z=v?this._columnDefinitions.filter(Ne=>Ne.editorClass&&!0===Ne.editor?.massUpdate):this._columnDefinitions.filter(Ne=>Ne.editorClass),z.some(Ne=>void 0!==Ne.editor?.compositeEditorFormOrder)&&z.sort((Ne,Ua)=>eK(Ne?.editor?.compositeEditorFormOrder??1/0,Ua?.editor?.compositeEditorFormOrder??1/0,Gt.asc));const M=m.replace(/\{\{(.*?)\}\}/g,(Ne,Ua)=>ti(k,Ua)),L="auto"===i?this.autoCalculateLayoutColumnCount(z.length):i;this._modalElm=T("div",{className:`slick-editor-modal ${h}`});const R=T("div",{className:"slick-editor-modal-content"});if(this.gridOptions?.darkMode&&R.classList.add("slick-dark-mode"),!isNaN(i)&&+i>1||"auto"===i&&L>1){const Ne=2===L?"split-view":"triple-split-view";R.classList.add(Ne)}const G=T("div",{className:"slick-editor-modal-title"});this.grid.applyHtmlCode(G,M);const $=T("button",{type:"button",ariaLabel:"Close",textContent:"\xd7",className:"close",dataset:{action:"close"}});this._options.showCloseButtonOutside&&(G?.classList?.add("outside"),$?.classList?.add("outside"));const Y=T("div",{ariaLabel:"Close",className:"slick-editor-modal-header"});Y.appendChild(G),Y.appendChild($);const re=T("div",{className:"slick-editor-modal-body"});this._modalBodyTopValidationElm=T("div",{className:"validation-summary",style:{display:"none"}},re);const He=T("div",{className:"slick-editor-modal-footer"}),Ve=T("button",{type:"button",ariaLabel:this.getLabelText("cancelButton","TEXT_CANCEL","Cancel"),className:"btn btn-cancel btn-default btn-sm",textContent:this.getLabelText("cancelButton","TEXT_CANCEL","Cancel"),dataset:{action:"cancel"}});let Be="",fa="";switch(g){case"clone":fa=this.getLabelText("cloneButton","TEXT_CLONE","Clone");break;case"mass-update":const Ne=this.getLabelText("massUpdateStatus","TEXT_ALL_X_RECORDS_SELECTED","All {{x}} records selected");Be=this.parseText(Ne,{x:D}),fa=this.getLabelText("massUpdateButton","TEXT_APPLY_MASS_UPDATE","Mass Update");break;case"mass-selection":const Ua=this.getLabelText("massSelectionStatus","TEXT_X_OF_Y_MASS_SELECTED","{{x}} of {{y}} selected");Be=this.parseText(Ua,{x:C.length,y:D}),fa=this.getLabelText("massSelectionButton","TEXT_APPLY_TO_SELECTION","Update Selection");break;default:fa=this.getLabelText("saveButton","TEXT_SAVE","Save")}const At=T("div",{className:"footer-status-text",textContent:Be});this._modalSaveButtonElm=T("button",{type:"button",className:"btn btn-save btn-primary btn-sm",ariaLabel:fa,textContent:fa,dataset:{action:"create"===g||"edit"===g?"save":g,ariaLabel:fa}});const vt=T("div",{className:"footer-buttons"});("mass-update"===g||"mass-selection"===g)&&He.appendChild(At),vt.appendChild(Ve),vt.appendChild(this._modalSaveButtonElm),He.appendChild(vt),R.appendChild(Y),R.appendChild(re),R.appendChild(He),this._modalElm.appendChild(R);for(const Ne of z)if(Ne.editorClass){const Ua=T("div",{className:`item-details-container editor-${Ne.id}`});1===L?Ua.classList.add("slick-col-medium-12"):Ua.classList.add("slick-col-medium-6","slick-col-xlarge-"+12/L);const nu=T("div",{className:`item-details-label editor-${Ne.id}`});this.grid.applyHtmlCode(nu,this.getColumnLabel(Ne)||"n/a");const sl=T("div",{className:"item-details-editor-container slick-cell",dataset:{editorid:`${Ne.id}`}}),Qi=T("div",{className:`item-details-validation editor-${Ne.id}`});if(this._options?.showResetButtonOnEachEditor){const Wn=this.createEditorResetButtonElement(`${Ne.id}`);this._bindEventService.bind(Wn,"click",this.handleResetInputValue.bind(this)),nu.appendChild(Wn)}Ua.appendChild(nu),Ua.appendChild(sl),Ua.appendChild(Qi),re.appendChild(Ua)}if(this._options?.showFormResetButton){const Ne=this.createFormResetButtonElement();this._bindEventService.bind(Ne,"click",this.handleResetFormClicked.bind(this)),re.appendChild(Ne)}document.body.appendChild(this._modalElm),document.body.classList.add("slick-modal-open"),this._bindEventService.bind(document.body,"click",this.handleBodyClicked.bind(this)),"function"==typeof this._options.onRendered&&this._options.onRendered(this._modalElm),this._editors={},this._editorContainers=z.map(Ne=>re.querySelector(`[data-editorid='${Ne.id}']`))||[],this._compositeOptions={destroy:this.disposeComponent.bind(this),modalType:g,validationMsgPrefix:"* ",formValues:{},editors:this._editors};const Ya=new XU(z,this._editorContainers,this._compositeOptions);this.grid.editActiveCell(Ya),this._bindEventService.bind($,"click",this.cancelEditing.bind(this)),this._bindEventService.bind(Ve,"click",this.cancelEditing.bind(this)),this._bindEventService.bind(this._modalSaveButtonElm,"click",this.handleSaveClicked.bind(this)),this._bindEventService.bind(this._modalElm,"keydown",this.handleKeyDown.bind(this)),this._bindEventService.bind(this._modalElm,"focusout",this.validateCurrentEditor.bind(this)),this._bindEventService.bind(this._modalElm,"blur",this.validateCurrentEditor.bind(this)),this._eventHandler.subscribe(this.grid.onCompositeEditorChange,this.handleOnCompositeEditorChange.bind(this)),this._eventHandler.subscribe(this.grid.onAddNewRow,(Ne,Ua)=>{this._originalDataContext=this.insertNewItemInDataView(Ua.item)})}return this}catch(i){this.dispose();const r="string"==typeof i?i:i?.message??i?.body?.message??"";return a({type:"error",code:"string"==typeof i?i:i?.status??i?.body?.status??r,message:r}),null}}cancelEditing(){var e=this;return Su(function*(){let a=!0;e.formValues&&Object.keys(e.formValues).length>0&&"function"==typeof e._options.onClose&&(a=yield e._options.onClose()),a&&(e.grid.getEditController()?.cancelCurrentEdit(),("edit"===e._options?.modalType||"clone"===e._options?.modalType)&&e.resetCurrentRowDataContext(),e.grid.setActiveRow(e._lastActiveRowNumber),e.dispose())})()}showValidationSummaryText(e,a=""){e&&""!==a?(this._modalBodyTopValidationElm.textContent=a,this._modalBodyTopValidationElm.style.display="block",this._modalBodyTopValidationElm.scrollIntoView?.(),this._modalSaveButtonElm.disabled=!1,this._modalSaveButtonElm.classList.remove("saving")):(this._modalBodyTopValidationElm.style.display="none",this._modalBodyTopValidationElm.textContent=a)}applySaveMassUpdateChanges(e,a,u=!0){const i=u?this.dataView.getItems():cu(!0,[],this.dataView.getItems());return Object.keys(e).forEach(r=>{r in e&&i.forEach(o=>{r in e&&(void 0===this._options?.validateMassUpdateChange||!1!==this._options.validateMassUpdateChange(r,o,e))&&(o[r]=e[r])})}),u&&(this.dataView.setItems(i,this.gridOptions.datasetIdPropertyName),this.grid.invalidate()),i}applySaveMassSelectionChanges(e,a,u=!0){const r=(a?.dataContextIds??[]).map(d=>this.dataView.getItemById(d)),o=u?r:cu(!0,[],r);return Object.keys(e).forEach(d=>{d in e&&o.forEach(h=>{d in e&&(void 0===this._options?.validateMassUpdateChange||!1!==this._options.validateMassUpdateChange(d,h,e))&&(h[d]=e[d])})}),u&&this.gridService?.updateItems(o),o}autoCalculateLayoutColumnCount(e){return e>=15?3:e>=8?2:1}createEditorResetButtonElement(e){const a=T("button",{type:"button",name:e,ariaLabel:"Reset",title:this._options?.labels?.resetFormButton??"Reset Form Input",className:"btn btn-xs btn-editor-reset"});if(this._options?.resetEditorButtonCssClass){const u=Kt(this._options?.resetEditorButtonCssClass);for(const i of u)a.classList.add(i)}return a}createFormResetButtonElement(){const e=T("div",{className:"reset-container"}),a=T("button",{type:"button",className:"btn btn-sm reset-form"},e);return T("span",{className:this._options?.resetFormButtonIconCssClass??""},a),a.appendChild(document.createTextNode(" Reset Form")),e}executeOnError(e){(this._options?.onError??eJ)(e)}executeOnSave(e,a,u,i){var r=this;return Su(function*(){try{if(r.showValidationSummaryText(!1,""),r.validateCompositeEditors().valid){if(r._modalSaveButtonElm.classList.add("saving"),r._modalSaveButtonElm.disabled=!0,"function"==typeof r._options?.onSave){const d="mass-update"===r._options.modalType||"mass-selection"===r._options.modalType;let h;d&&r._options?.shouldPreviewMassChangeDataset&&(h=e(r.formValues,r.getCurrentRowSelections(),!1));const m=d?h:i;(yield r._options?.onSave(r.formValues,r.getCurrentRowSelections(),m))&&(e(r.formValues,r.getCurrentRowSelections()),a())}else e(r.formValues,r.getCurrentRowSelections()),a();"function"==typeof u&&u(),r.dispose()}}catch(o){const d="string"==typeof o?o:o?.message??o?.body?.message??"";r.showValidationSummaryText(!0,d)}})()}focusOnFirstColumnCellWithEditor(e,a,u,i,r){const o=r&&!this.gridOptions.enableAddRow&&i>=this.dataViewLength?this.dataViewLength-1:i;let d=u;const h=e[u].editorClass;let m=this.grid.getCellNode(o,u);if(!h||!m||!this.getActiveCellEditor(o,u)){if(d=this.findNextAvailableEditorColumnIndex(e,a,i,r),-1===d)return this.executeOnError({type:"error",code:"NO_EDITOR_FOUND",message:"We could not find any Editor in your Column Definition"}),!1;this.grid.setActiveCell(o,d,!1),r&&this.grid.setActiveRow(this.dataViewLength,d,!0)}return m=this.grid.getCellNode(o,d),!!m}findNextAvailableEditorColumnIndex(e,a,u,i){let r=-1;for(let o=0;ou.id===e)),a}getActiveCellEditor(e,a){return this.grid.setActiveCell(e,a,!1),this.grid.getCellEditor()}getColumnLabel(e){const a=this.gridOptions.columnGroupSeparator||" - ";let u=e.nameCompositeEditor||e.name||"",i=e.columnGroup||"";if(this.gridOptions.enableTranslate&&this.translaterService){const o=e.nameCompositeEditorKey||e.nameKey;o&&(u=this.translaterService.translate(o)),e.columnGroupKey&&this.translaterService?.translate&&(i=this.translaterService.translate(e.columnGroupKey))}return ui(i?`${i}${a}${u}`:u,"innerHTML")}getLabelText(e,a,u){const i={...this.gridOptions.compositeEditorOptions?.labels,...this._options?.labels};if(this.gridOptions?.enableTranslate&&this.translaterService?.translate&&i.hasOwnProperty(`${e}Key`)){const r=i[`${e}Key`];return this.translaterService.translate(r||"")}return i?.[e]??this._locales?.[a]??u}getCurrentRowSelections(){const e=this.dataView.getAllSelectedIds();return{gridRowIndexes:this.dataView.mapIdsToRows(e),dataContextIds:e}}handleBodyClicked(e){e.target?.classList?.contains("slick-editor-modal")&&"static"!==this._options?.backdrop&&this.dispose()}handleKeyDown(e){"Escape"===e.code?(this.cancelEditing(),e.stopPropagation(),e.preventDefault()):"Tab"===e.code&&this.validateCurrentEditor()}handleResetInputValue(e){const a=e.target.name,u=this._editors?.[a];"function"==typeof u?.reset&&u.reset(),delete this._formValues?.[a]}handleMassSaving(e,a){var u=this;return Su(function*(){if(u.formValues&&0!==Object.keys(u.formValues).length){const i="mass-update"===e?"applySaveMassUpdateChanges":"applySaveMassSelectionChanges";u.executeOnSave(u[i].bind(u),a.bind(u))}else u.executeOnError({type:"warning",code:"NO_CHANGES_DETECTED",message:"Sorry we could not detect any changes."})})()}handleOnCompositeEditorChange(e,a){const u=a.column?.id??"";this._formValues={...this._formValues,...a.formValues};const i=this._editors?.[u],r=i?.isValueTouched?.()??i?.isValueChanged?.()??!1;this._itemDataContext=i?.dataContext??{};const o=this._modalElm.querySelector(`[data-editorid=${u}]`);o?.classList&&(r?o.classList.add("modified"):o.classList.remove("modified")),this.validateCompositeEditors()}hasRowSelectionEnabled(){const e=this.grid.getSelectionModel();return!(!this.gridOptions.enableRowSelection&&!this.gridOptions.enableCheckboxSelector||!e)}handleResetFormClicked(){for(const e of Object.keys(this._editors)){const a=this._editors[e];a?.reset&&a.reset()}this._formValues=$G(this._formValues)}handleSaveClicked(){var e=this;return Su(function*(){const a=e._options?.modalType;switch(a){case"mass-update":e.handleMassSaving(a,()=>{e.grid.getEditController()?.cancelCurrentEdit(),e.grid.setActiveCell(0,0,!1),e._options.shouldClearRowSelectionAfterMassAction&&e.grid.setSelectedRows([])});break;case"mass-selection":e.handleMassSaving(a,()=>{e.grid.getEditController()?.cancelCurrentEdit(),e.grid.setActiveRow(e._lastActiveRowNumber),e._options.shouldClearRowSelectionAfterMassAction&&e.grid.setSelectedRows([])});break;case"clone":const u={...e._originalDataContext,...e.formValues},i=()=>{e.grid.getEditController()?.cancelCurrentEdit(),e.grid.setActiveCell(0,0,!1)};e.executeOnSave(e.insertNewItemInDataView.bind(e,u),i,e.resetCurrentRowDataContext.bind(e),u);break;default:let r=e.grid.getEditController()?.commitCurrentEdit();if(r&&"function"==typeof e._options?.onSave){const o="create"===a?e._originalDataContext:e.grid.getDataItem(e._lastActiveRowNumber);r=yield e._options?.onSave(e.formValues,e.getCurrentRowSelections(),o)}r&&e.dispose()}})()}insertNewItemInDataView(e){const a=this.dataView?.getItemCount()||0,u=this._options.insertNewId??a+1;return e[this.gridOptions.datasetIdPropertyName||"id"]=u,this.dataView.getItemById(u)?this.executeOnError({type:"error",code:"ITEM_ALREADY_EXIST",message:`The item object which you are trying to add already exist with the same Id:: ${u}`}):this.gridService?.addItem(e,this._options.insertOptions),e}parseText(e,a){return e.replace(/\{\{(.*?)\}\}/g,(u,i)=>void 0!==a[i]?a[i]:u)}resetCurrentRowDataContext(){const e=this.gridOptions.datasetIdPropertyName||"id";this.grid.getData().updateItem(this._originalDataContext[e],this._originalDataContext)}validateCompositeEditors(e){let a={valid:!0,msg:""};const u=this.grid.getCellEditor();return u&&(a=u.validate(e)),a}validateCurrentEditor(){const e=this.grid.getCellEditor();e?.validate&&e.validate()}}const jpe=(t,e,a,u,i,r)=>(a=a??"",(r&&r.getOptions&&r.getOptions()).editable&&u.editor?{text:a,addClasses:"editable-field"}:a),Gpe=(t,e)=>null!=t&&t.length||!(e.compositeEditorOptions&&"create"===e.compositeEditorOptions.modalType||"edit"===e.compositeEditorOptions.modalType)?/^(task\s\d+)*$/i.test(t)?{valid:!0,msg:""}:{valid:!1,msg:'Your title is invalid, it must start with "Task" followed by a number.'}:{valid:!1,msg:"This is a required field."};let m9=class{constructor(e){this.http=e,this._darkMode=!1,this.title="Example 30: Composite Editor Modal",this.subTitle='Composite Editor allows you to Create, Clone, Edit, Mass Update & Mass Selection Changes inside a nice Modal Window.\n
The modal is simply populated by looping through your column definition list and also uses a lot of the same logic as inline editing (see Composite Editor - Wiki.)',this.columnDefinitions=[],this.dataset=[],this.editQueue=[],this.editedItems={},this.isGridEditable=!0,this.isCompositeDisabled=!1,this.isMassSelectionDisabled=!0,this.cellCssStyleQueue=[],this.complexityLevelList=[{value:0,label:"Very Simple"},{value:1,label:"Simple"},{value:2,label:"Straightforward"},{value:3,label:"Complex"},{value:4,label:"Very Complex"}],this.compositeEditorInstance=new Rpe}angularGridReady(e){this.angularGrid=e}ngOnInit(){this.prepareGrid(),this.dataset=this.loadData(500)}ngOnDestroy(){document.querySelector(".panel-wm-content").classList.remove("dark-mode"),document.querySelector("#demo-container").dataset.bsTheme="light"}prepareGrid(){this.columnDefinitions=[{id:"title",name:' Title ',field:"title",sortable:!0,type:w.string,minWidth:75,cssClass:"text-uppercase fw-bold",columnGroup:"Common Factor",filterable:!0,filter:{model:ie.compoundInputText},editor:{model:qe.longText,massUpdate:!1,required:!0,alwaysSaveOnEnterKey:!0,maxLength:12,editorOptions:{cols:45,rows:6,buttonTexts:{cancel:"Close",save:"Done"}},validator:Gpe}},{id:"duration",name:"Duration",field:"duration",sortable:!0,filterable:!0,minWidth:75,type:w.number,columnGroup:"Common Factor",formatter:(e,a,u)=>null==u||""===u?"":u>1?`${u} days`:`${u} day`,editor:{model:qe.float,massUpdate:!0,decimal:2,valueStep:1,minValue:0,maxValue:1e4,alwaysSaveOnEnterKey:!0,required:!0}},{id:"cost",name:"Cost",field:"cost",width:90,minWidth:70,sortable:!0,filterable:!0,type:w.number,columnGroup:"Analysis",filter:{model:ie.compoundInputNumber},formatter:j.dollar},{id:"percentComplete",name:"% Complete",field:"percentComplete",minWidth:100,type:w.number,sortable:!0,filterable:!0,columnGroup:"Analysis",filter:{model:ie.compoundSlider,operator:">="},editor:{model:qe.slider,massUpdate:!0,minValue:0,maxValue:100},customTooltip:{position:"center"}},{id:"complexity",name:"Complexity",field:"complexity",minWidth:100,type:w.number,sortable:!0,filterable:!0,columnGroup:"Analysis",formatter:(e,a,u)=>this.complexityLevelList[u]?.label,exportCustomFormatter:(e,a,u)=>this.complexityLevelList[u]?.label,filter:{model:ie.multipleSelect,collection:this.complexityLevelList},editor:{model:qe.singleSelect,collection:this.complexityLevelList,massUpdate:!0}},{id:"start",name:"Start",field:"start",sortable:!0,minWidth:100,formatter:j.dateUs,columnGroup:"Period",exportCustomFormatter:j.dateUs,type:w.date,outputType:w.dateUs,saveOutputType:w.dateUtc,filterable:!0,filter:{model:ie.compoundDate},editor:{model:qe.date,massUpdate:!0,editorOptions:{hideClearButton:!1}}},{id:"completed",name:"Completed",field:"completed",width:80,minWidth:75,maxWidth:100,cssClass:"text-center",columnGroup:"Period",formatter:j.checkmarkMaterial,exportWithFormatter:!1,filterable:!0,sortable:!0,filter:{collection:[{value:"",label:""},{value:!0,label:"True"},{value:!1,label:"False"}],model:ie.singleSelect},editor:{model:qe.checkbox,massUpdate:!0}},{id:"finish",name:"Finish",field:"finish",sortable:!0,minWidth:100,formatter:j.dateUs,columnGroup:"Period",type:w.date,outputType:w.dateUs,saveOutputType:w.dateUtc,filterable:!0,filter:{model:ie.compoundDate},exportCustomFormatter:j.dateUs,editor:{model:qe.date,editorOptions:{range:{min:"today"}},massUpdate:!0,validator:(e,a)=>{const u=a&&a.item;return u&&u.completed&&!e?{valid:!1,msg:'You must provide a "Finish" date when "Completed" is checked.'}:{valid:!0,msg:""}}}},{id:"product",name:"Product",field:"product",filterable:!0,columnGroup:"Item",minWidth:100,exportWithFormatter:!0,dataKey:"id",labelKey:"itemName",formatter:j.complexObject,exportCustomFormatter:j.complex,type:w.object,sortComparer:ul.objectString,editor:{model:qe.autocompleter,alwaysSaveOnEnterKey:!0,massUpdate:!0,editorOptions:{minLength:1,fetch:(e,a)=>{a(this.mockProducts().filter(i=>i.itemName.toLowerCase().includes(e.toLowerCase())))},renderItem:{layout:"fourCorners",templateCallback:e=>this.renderItemCallbackWith4Corners(e)}}},filter:{model:ie.inputText,type:w.string,queryField:"product.itemName"}},{id:"origin",name:"Country of Origin",field:"origin",formatter:j.complexObject,columnGroup:"Item",exportCustomFormatter:j.complex,dataKey:"code",labelKey:"name",type:w.object,sortComparer:ul.objectString,filterable:!0,sortable:!0,minWidth:100,editor:{model:qe.autocompleter,massUpdate:!0,customStructure:{label:"name",value:"code"},collectionAsync:this.http.get("assets/data/countries.json"),editorOptions:{minLength:0}},filter:{model:ie.inputText,type:"string",queryField:"origin.name"}},{id:"action",name:"Action",field:"action",width:70,minWidth:70,maxWidth:70,excludeFromExport:!0,formatter:()=>'
',cellMenu:{hideCloseButton:!1,commandTitle:"Commands",commandItems:[{command:"edit",title:"Edit Row",iconCssClass:"mdi mdi-pencil",positionOrder:66,action:()=>this.openCompositeModal("edit")},{command:"clone",title:"Clone Row",iconCssClass:"mdi mdi-content-copy",positionOrder:66,action:()=>this.openCompositeModal("clone")},"divider",{command:"delete-row",title:"Delete Row",positionOrder:64,iconCssClass:"mdi mdi-close color-danger",cssClass:"red",textCssClass:"text-italic color-danger-light",itemVisibilityOverride:e=>!e.dataContext?.completed,action:(e,a)=>{const u=a.dataContext;confirm(`Do you really want to delete row (${(a?.row??0)+1}) with "${u.title}"`)&&this.angularGrid.gridService.deleteItemById(u.id)}}]}}],this.gridOptions={enableAddRow:!0,enableCellNavigation:!0,asyncEditorLoading:!1,autoEdit:!0,autoCommitEdit:!0,editable:!0,autoAddCustomEditorFormatter:jpe,autoResize:{container:"#demo-container",rightPadding:10},darkMode:this._darkMode,enableAutoSizeColumns:!0,enableAutoResize:!0,showCustomFooter:!0,enablePagination:!0,pagination:{pageSize:10,pageSizes:[10,200,250,500,5e3]},enableExcelExport:!0,excelExportOptions:{exportWithFormatter:!1},externalResources:[new Ao,new W7,this.compositeEditorInstance],enableFiltering:!0,rowSelectionOptions:{selectActiveRow:!1},createPreHeaderPanel:!0,showPreHeaderPanel:!0,preHeaderPanelHeight:28,enableCheckboxSelector:!0,enableRowSelection:!0,multiSelect:!1,checkboxSelector:{hideInFilterHeaderRow:!1,hideInColumnTitleRow:!0},enableCompositeEditor:!0,editCommandHandler:(e,a,u)=>{const i=Array.isArray(u.prevSerializedValue)?u.prevSerializedValue:[u.prevSerializedValue],r=Array.isArray(u.serializedValue)?u.serializedValue:[u.serializedValue],o=this.columnDefinitions.filter(h=>void 0!==h.editor),d=[];i.forEach((h,m)=>{const g=i[m],v=r[m];if(g!==v||""===v){const k=Array.isArray(u.prevSerializedValue)?o[m]:a;this.editedItems[this.gridOptions.datasetIdPropertyName||"id"]=e,this.angularGrid.slickGrid.invalidate(),u.execute(),this.renderUnsavedCellStyling(e,k,u),d.push(k)}}),this.editQueue.push({item:e,columns:d,editCommand:u})},enableCellMenu:!0,cellMenu:{activateCellOnMenuClick:!0},gridMenu:{hideToggleDarkModeCommand:!1,onCommand:(e,a)=>{"toggle-dark-mode"===a.command&&(this._darkMode=!this._darkMode,this.toggleBodyBackground())}}}}loadData(e){const a=[];for(let u=0;u100?u>5?100:88:v,x=100===k;a[u]={id:u,title:"Task "+u,duration:Math.floor(100*Math.random())+10,percentComplete:k,analysis:{percentComplete:k},complexity:u%3?0:2,start:new Date(r,d,h,h,m,m,m),finish:x||u%3==0&&g>new Date&&u>3?x?new Date:g:"",cost:u%33==0?null:Math.round(1e4*Math.random())/100,completed:x||u%3==0&&g>new Date&&u>3,product:{id:this.mockProducts()[i]?.id,itemName:this.mockProducts()[i]?.itemName},origin:u%2?{code:"CA",name:"Canada"}:{code:"US",name:"United States"}},u%8||(delete a[u].finish,delete a[u].percentComplete)}return a}handleValidationError(e,a){if(a.validationResults){let u=a.validationResults.msg||"";if(a.editor&&a.editor instanceof XU){if(a.validationResults.errors){u+="\n";for(const i of a.validationResults.errors){u+=`${i.editor.args.column.name.toUpperCase()}: ${i.msg}`}}console.log(u)}}else alert(a.validationResults.msg);return!1}handleItemDeleted(e){console.log("item deleted with id:",e)}handleOnBeforeEditCell(e,a){const{column:u,item:i,grid:r}=a;return!(u&&i&&!function Ope(t,e,a){const u=a?.getOptions(),i=e.editor;let o=!(!u.editable||!i);t&&e&&u&&u.editable&&"finish"===e.id&&(o=!!t?.completed);return o}(i,u,r))||(e.preventDefault(),!1)}handleOnCellChange(e,a){const u=a?.item;u&&!u.completed&&(u.finish=null,this.angularGrid.gridService.updateItem(u))}handleOnCellClicked(e,a){console.log(e,a)}handleOnCompositeEditorChange(e,a){const u=a.column,i=a.formValues;"percentComplete"===u.id&&100===i.percentComplete&&(this.compositeEditorInstance.changeFormInputValue("completed",!0),this.compositeEditorInstance.changeFormInputValue("finish",new Date))}handleReRenderUnsavedStyling(){this.removeAllUnsavedStylingFromCell(),this.renderUnsavedStylingOnAllVisibleCells()}handleOnGridStateChanged(e){Array.isArray(e.gridState?.rowSelection?.dataContextIds)&&(this.isMassSelectionDisabled=0===e.gridState?.rowSelection?.dataContextIds.length)}openCompositeModal(e){let a="";switch(e){case"create":a="Inserting New Task";break;case"clone":a="Clone - {{title}}";break;case"edit":a='Editing - {{title}} (id: {{id}})';break;case"mass-update":a="Mass Update All Records";break;case"mass-selection":a="Update Selected Records"}this.compositeEditorInstance?.openDetails({headerTitle:a,modalType:e,insertOptions:{highlightRow:!1},showFormResetButton:!0,resetFormButtonIconCssClass:"mdi mdi-undo",onClose:()=>Promise.resolve(confirm("You have unsaved changes, are you sure you want to close this window?")),onError:u=>alert(u.message),onRendered:u=>{u.dataset.bsTheme=this._darkMode?"dark":"light"},onSave:(u,i,r)=>"mass-update"===e||"mass-selection"===e?new Promise((d,h)=>{setTimeout(()=>{u.percentComplete>=50?d(!0):h("Unfortunately we only accept a minimum of 50% Completion...")},50)}):(console.log(`${e} item data context`,r),new Promise(d=>setTimeout(()=>d(!0),50)))})}toggleGridEditReadonly(){this.undoAllEdits(),this.isGridEditable=!this.isGridEditable,this.isCompositeDisabled=!this.isGridEditable,this.isGridEditable||(this.isMassSelectionDisabled=!0),this.angularGrid.slickGrid.setOptions({editable:this.isGridEditable})}removeUnsavedStylingFromCell(e,a,u){const i=`unsaved_highlight_${[a.id]}${u}`;this.angularGrid.slickGrid.removeCellCssStyles(i);const r=this.cellCssStyleQueue.findIndex(o=>o===i);r>=0&&this.cellCssStyleQueue.splice(r,1)}removeAllUnsavedStylingFromCell(){for(const e of this.cellCssStyleQueue)this.angularGrid.slickGrid.removeCellCssStyles(e);this.cellCssStyleQueue=[]}renderUnsavedStylingOnAllVisibleCells(){for(const e of this.editQueue)if(e){const{item:a,columns:u,editCommand:i}=e;Array.isArray(u)&&u.forEach(r=>{this.renderUnsavedCellStyling(a,r,i)})}}renderUnsavedCellStyling(e,a,u){if(u&&e&&a){const i=this.angularGrid.dataView?.getRowByItem(e);if(void 0!==i&&i>=0){const r={[i]:{[a.id]:"unsaved-editable-field"}},o=`unsaved_highlight_${[a.id]}${i}`;this.angularGrid.slickGrid.setCellCssStyles(o,r),this.cellCssStyleQueue.push(o)}}}saveAll(){console.log(this.editQueue),console.log(this.editedItems),this.removeAllUnsavedStylingFromCell(),this.editQueue=[],this.editedItems={}}undoLastEdit(e=!1){const a=this.editQueue.pop(),u=a?.editCommand;if(a&&u&&td.cancelCurrentEdit()){u.undo();for(const i of a.columns)this.removeUnsavedStylingFromCell(a.item,i,u.row);this.angularGrid.slickGrid.invalidate(),e&&this.angularGrid.slickGrid.gotoCell(u.row,u.cell,!1)}}undoAllEdits(){for(const e of this.editQueue){const a=e?.editCommand;if(a&&td.cancelCurrentEdit()){a.undo();for(const u of e.columns)this.removeUnsavedStylingFromCell(e.item,u,a.row)}}this.angularGrid.slickGrid.invalidate(),this.editQueue=[]}toggleDarkMode(){this._darkMode=!this._darkMode,this.toggleBodyBackground(),this.angularGrid.slickGrid?.setOptions({darkMode:this._darkMode})}toggleBodyBackground(){this._darkMode?(document.querySelector(".panel-wm-content").classList.add("dark-mode"),document.querySelector("#demo-container").dataset.bsTheme="dark"):(document.querySelector(".panel-wm-content").classList.remove("dark-mode"),document.querySelector("#demo-container").dataset.bsTheme="light")}mockProducts(){return[{id:0,itemName:"Sleek Metal Computer",itemNameTranslated:"some fantastic sleek metal computer description",listPrice:2100.23,itemTypeName:"I",image:"http://i.stack.imgur.com/pC1Tv.jpg",icon:this.getRandomIcon(0)},{id:1,itemName:"Tasty Granite Table",itemNameTranslated:"an extremely huge and heavy table",listPrice:3200.12,itemTypeName:"I",image:"https://i.imgur.com/Fnm7j6h.jpg",icon:this.getRandomIcon(1)},{id:2,itemName:"Awesome Wooden Mouse",itemNameTranslated:"super old mouse",listPrice:15,itemTypeName:"I",image:"https://i.imgur.com/RaVJuLr.jpg",icon:this.getRandomIcon(2)},{id:3,itemName:"Gorgeous Fresh Shirt",itemNameTranslated:"what a gorgeous shirt seriously",listPrice:25.76,itemTypeName:"I",image:"http://i.stack.imgur.com/pC1Tv.jpg",icon:this.getRandomIcon(3)},{id:4,itemName:"Refined Cotton Table",itemNameTranslated:"super light table that will fall apart amazingly fast",listPrice:13.35,itemTypeName:"I",image:"https://i.imgur.com/Fnm7j6h.jpg",icon:this.getRandomIcon(4)},{id:5,itemName:"Intelligent Wooden Pizza",itemNameTranslated:"wood not included",listPrice:23.33,itemTypeName:"I",image:"https://i.imgur.com/RaVJuLr.jpg",icon:this.getRandomIcon(5)},{id:6,itemName:"Licensed Cotton Chips",itemNameTranslated:"not sure what that is",listPrice:71.21,itemTypeName:"I",image:"http://i.stack.imgur.com/pC1Tv.jpg",icon:this.getRandomIcon(6)},{id:7,itemName:"Ergonomic Rubber Soap",itemNameTranslated:"so good you'll want to use it every night",listPrice:2.43,itemTypeName:"I",image:"https://i.imgur.com/Fnm7j6h.jpg",icon:this.getRandomIcon(7)},{id:8,itemName:"Handcrafted Steel Car",itemNameTranslated:"aka tesla truck",listPrice:31288.39,itemTypeName:"I",image:"https://i.imgur.com/RaVJuLr.jpg",icon:this.getRandomIcon(8)}]}getRandomIcon(e){const a=["mdi-arrow-collapse","mdi-arrow-expand","mdi-cancel","mdi-check","mdi-checkbox-blank-outline","mdi-check-box-outline","mdi-checkbox-marked","mdi-close","mdi-close-circle","mdi-close-circle-outline","mdi-close-thick","mdi-content-copy","mdi-database-refresh","mdi-download","mdi-file-document-outline","mdi-file-excel-outline","mdi-file-music-outline","mdi-file-pdf-outline","mdi-filter-remove-outline","mdi-flip-vertical","mdi-folder","mdi-folder-open","mdi-help-circle","mdi-help-circle-outline","mdi-history","mdi-information","mdi-information-outline","mdi-link","mdi-link-variant","mdi-menu","mdi-microsoft-excel","mdi-minus","mdi-page-first","mdi-page-last","mdi-paperclip","mdi-pin-off-outline","mdi-pin-outline","mdi-playlist-plus","mdi-playlist-remove","mdi-plus","mdi-redo","mdi-refresh","mdi-shape-square-plus","mdi-sort-ascending","mdi-sort-descending","mdi-swap-horizontal","mdi-swap-vertical","mdi-sync","mdi-table-edit","mdi-table-refresh","mdi-undo"],u=Math.floor(Math.random()*a.length-1);return a[e??u]}renderItemCallbackWith2Rows(e){return`
\n
\n \x3c!----\x3e\n \n
\n
\n \n \n ${e.itemName}\n \n
\n
\n
\n
${e.itemNameTranslated}
\n
`}renderItemCallbackWith4Corners(e){return`
\n
\n \x3c!----\x3e\n \n
\n
\n \n \n ${e.itemName}\n \n ${Mu(e.listPrice,2,2,!1,"$")}\n
\n
\n
\n
${e.itemNameTranslated}
\n Type: ${"I"===e.itemTypeName?"Item":"C"===e.itemTypeName?"PdCat":"Cat"}\n
`}static#e=this.ctorParameters=()=>[{type:jt}]};m9=Ze([ca({template:'
\n

\n {{title}}\n \n \n \n code\n \n \n

\n
\n\n
\n
\n \n \n \n \n \n
\n
\n\n
\n
\n \n \n \n \n \n
\n
\n\n \n \n
',encapsulation:Ga.None,styles:[Ipe()]}),Ct("design:paramtypes",[jt])],m9);var Wpe=O(968),Upe=O.n(Wpe);const Jpe=(t,e,a,u,i)=>3===i.priority?'
Action
':'
Action
',Zpe=(t,e,a,u,i)=>{if(!a)return"";let r="";const o=+(a>=3?3:a),h=``;for(let m=1;m<=o;m++)r+=h;return r},$pe=(t,e,a,u,i,r)=>{if(!a)return"";const d=r.getOptions().i18n,h=+(a>=3?3:a),m=3===h?"HIGH":2===h?"MEDIUM":"LOW";return d&&d.instant&&d.instant(m)},qpe=(t,e,a,u,i,r)=>{const d=r.getOptions().i18n;return d&&d.instant&&d.instant("TASK_X",{x:a})};let p9=class{constructor(e){this.translate=e,this.title="Example 26: Cell Menu & Context Menu Plugins",this.subTitle='Add Cell Menu and Context Menu\n
    \n
  • This example demonstrates 2 SlickGrid plugins\n
      \n
    1. Using the Slick.Plugins.CellMenu plugin, often used for an Action Menu(s), 1 or more per grid\n (Wiki docs).\n
    2. \n
    3. Using the Slick.Plugins.ContextMenu plugin, shown after a mouse right+click, only 1 per grid.\n (Wiki docs).\n
    4. \n
    \n
  • It will also "autoAdjustDrop" (bottom/top) and "autoAlignSide" (left/right) by default but could be turned off
  • \n
  • Both plugins have 2 sections, 1st section can have an array of Options (to change value of a field) and 2nd section an array of Commands (execute a command)
  • \n
  • There are 2 ways to execute a Command/Option
  • \n
      \n
    1. via onCommand/onOptionSelected (use a switch/case to parse command/option and do something with it)
    2. \n
    3. via action callback (that can be defined on each command/option)
    4. \n
    \n
  • Use override callback functions to change the properties of show/hide, enable/disable the menu or certain item(s) from the list
  • \n
      \n
    1. These callbacks are: "menuUsabilityOverride", "itemVisibilityOverride", "itemUsabilityOverride"
    2. \n
    3. ... e.g. in the demo, the "Action" Cell Menu is only available when Priority is set to "High" via "menuUsabilityOverride"
    4. \n
    5. ... e.g. in the demo, the Context Menu is only available on the first 20 Tasks via "menuUsabilityOverride"
    6. \n
    \n
',this._darkModeGrid=!1,this.subscriptions=[];this.translate.use("en"),this.selectedLanguage="en"}angularGridReady(e){this.angularGrid=e}get cellMenuInstance(){return this.angularGrid?.extensionService?.getExtensionInstanceByName(Ea.cellMenu)}get contextMenuInstance(){return this.angularGrid?.extensionService?.getExtensionInstanceByName(Ea.contextMenu)}ngOnInit(){this.prepareGrid(),this.dataset=this.getData(1e3)}ngOnDestroy(){rd(this.subscriptions),document.querySelector(".panel-wm-content").classList.remove("dark-mode"),document.querySelector("#demo-container").dataset.bsTheme="light"}prepareGrid(){this.columnDefinitions=[{id:"id",name:"#",field:"id",maxWidth:45,sortable:!0,filterable:!0},{id:"title",name:"Title",field:"id",nameKey:"TITLE",minWidth:100,formatter:qpe,sortable:!0,filterable:!0,params:{useFormatterOuputToFilter:!0}},{id:"percentComplete",nameKey:"PERCENT_COMPLETE",field:"percentComplete",minWidth:100,exportWithFormatter:!1,sortable:!0,filterable:!0,filter:{model:ie.slider,operator:">="},formatter:j.percentCompleteBar,type:w.number},{id:"start",name:"Start",field:"start",nameKey:"START",minWidth:100,formatter:j.dateIso,outputType:w.dateIso,type:w.date,filterable:!0,filter:{model:ie.compoundDate}},{id:"finish",name:"Finish",field:"finish",nameKey:"FINISH",formatter:j.dateIso,outputType:w.dateIso,type:w.date,minWidth:100,filterable:!0,filter:{model:ie.compoundDate}},{id:"priority",nameKey:"PRIORITY",field:"priority",exportCustomFormatter:$pe,formatter:Zpe,sortable:!0,filterable:!0,filter:{collection:[{value:"",label:""},{value:1,labelKey:"LOW"},{value:2,labelKey:"MEDIUM"},{value:3,labelKey:"HIGH"}],model:ie.singleSelect,enableTranslateLabel:!0}},{id:"completed",nameKey:"COMPLETED",field:"completed",exportCustomFormatter:j.translateBoolean,formatter:j.checkmarkMaterial,sortable:!0,filterable:!0,filter:{collection:[{value:"",label:""},{value:!0,labelKey:"TRUE"},{value:!1,labelKey:"FALSE"}],model:ie.singleSelect,enableTranslateLabel:!0}},{id:"action",name:"Action",field:"action",width:100,maxWidth:110,excludeFromExport:!0,formatter:Jpe,cellMenu:{hideCloseButton:!1,menuUsabilityOverride:e=>3===e.dataContext.priority,commandTitleKey:"COMMANDS",commandItems:[{command:"command2",title:"Command 2",positionOrder:62,action:(e,a)=>{console.log(a.dataContext,a.column)},itemUsabilityOverride:e=>!e.dataContext.completed},{command:"command1",title:"Command 1",cssClass:"orange",positionOrder:61},{command:"delete-row",titleKey:"DELETE_ROW",positionOrder:64,iconCssClass:"mdi mdi-close",cssClass:"red",textCssClass:"bold",itemVisibilityOverride:e=>!e.dataContext.completed},{divider:!0,command:"",positionOrder:63},{command:"help",titleKey:"HELP",iconCssClass:"mdi mdi-help-circle",positionOrder:66},{command:"something",titleKey:"DISABLED_COMMAND",disabled:!0,positionOrder:67},{command:"",divider:!0,positionOrder:98},{command:"export",title:"Exports",positionOrder:99,commandItems:[{command:"exports-txt",title:"Text (tab delimited)"},{command:"sub-menu",title:"Excel",cssClass:"green",subMenuTitle:"available formats",subMenuTitleCssClass:"text-italic orange",commandItems:[{command:"exports-csv",title:"Excel (csv)"},{command:"exports-xlsx",title:"Excel (xlsx)"}]}]},{command:"feedback",title:"Feedback",positionOrder:100,commandItems:[{command:"request-update",title:"Request update from supplier",iconCssClass:"mdi mdi-star",tooltip:"this will automatically send an alert to the shipping team to contact the user for an update"},"divider",{command:"sub-menu",title:"Contact Us",iconCssClass:"mdi mdi-account",subMenuTitle:"contact us...",subMenuTitleCssClass:"italic",commandItems:[{command:"contact-email",title:"Email us",iconCssClass:"mdi mdi-pencil-outline"},{command:"contact-chat",title:"Chat with us",iconCssClass:"mdi mdi-message-text-outline"},{command:"contact-meeting",title:"Book an appointment",iconCssClass:"mdi mdi-coffee"}]}]}],optionTitleKey:"CHANGE_COMPLETED_FLAG",optionItems:[{option:!0,titleKey:"TRUE",iconCssClass:"mdi mdi-check-box-outline"},{option:!1,titleKey:"FALSE",iconCssClass:"mdi mdi-checkbox-blank-outline"},{option:null,title:"null",cssClass:"italic",action:(e,a)=>{},itemUsabilityOverride:e=>3===e.dataContext.priority,itemVisibilityOverride:e=>!e.dataContext.completed}]}}],this.gridOptions={autoResize:{container:"#demo-container",rightPadding:10},darkMode:this._darkModeGrid,enableCellNavigation:!0,enableFiltering:!0,enableSorting:!0,enableTranslate:!0,enableExcelExport:!0,excelExportOptions:{exportWithFormatter:!0,customColumnWidth:15,columnHeaderStyle:{font:{bold:!0,italic:!0}}},i18n:this.translate,externalResources:[new Ao],enableContextMenu:!0,enableCellMenu:!0,cellMenu:{onCommand:(e,a)=>this.executeCommand(e,a),onOptionSelected:(e,a)=>{const u=a&&a.dataContext;u&&u.hasOwnProperty("completed")&&(u.completed=a.item.option,this.angularGrid.gridService.updateItem(u))},onBeforeMenuShow:(e,a)=>{console.log("Before the Cell Menu is shown",a)},onBeforeMenuClose:(e,a)=>console.log("Cell Menu is closing",a)},contextMenu:this.getContextMenuOptions()}}executeCommand(e,a){a.column;const i=a.command,r=a.dataContext;switch(i){case"contact-email":case"contact-chat":case"contact-meeting":alert("Command: "+a?.command);break;case"exports-csv":case"exports-txt":case"exports-xlsx":alert(`Exporting as ${a.item.title}`);break;case"command1":alert("Command 1");break;case"command2":alert("Command 2");break;case"help":alert("Please help!");break;case"delete-row":confirm(`Do you really want to delete row ${a.row+1} with ${this.translate.instant("TASK_X",{x:r.id})}`)&&this.angularGrid.dataView.deleteItem(r.id)}}getData(e){const a=[];for(let u=0;u(e&&e.dataContext).id<21,commandShownOverColumnIds:["id","title","percentComplete","start","finish","completed"],commandTitleKey:"COMMANDS",commandItems:[{divider:!0,command:"",positionOrder:61},{command:"delete-row",titleKey:"DELETE_ROW",iconCssClass:"mdi mdi-close",cssClass:"red",textCssClass:"bold",positionOrder:62},{divider:!0,command:"",positionOrder:63},{command:"help",titleKey:"HELP",iconCssClass:"mdi mdi-help-circle",positionOrder:64,action:(e,a)=>{},itemVisibilityOverride:e=>!(e&&e.dataContext).completed},{command:"something",titleKey:"DISABLED_COMMAND",disabled:!0,positionOrder:65},{command:"",divider:!0,positionOrder:98},{command:"export",title:"Exports",positionOrder:99,commandItems:[{command:"exports-txt",title:"Text (tab delimited)"},{command:"sub-menu",title:"Excel",cssClass:"green",subMenuTitle:"available formats",subMenuTitleCssClass:"text-italic orange",commandItems:[{command:"exports-csv",title:"Excel (csv)"},{command:"exports-xlsx",title:"Excel (xlsx)"}]}]},{command:"feedback",title:"Feedback",positionOrder:100,commandItems:[{command:"request-update",title:"Request update from supplier",iconCssClass:"mdi mdi-star",tooltip:"this will automatically send an alert to the shipping team to contact the user for an update"},"divider",{command:"sub-menu",title:"Contact Us",iconCssClass:"mdi mdi-account",subMenuTitle:"contact us...",subMenuTitleCssClass:"italic",commandItems:[{command:"contact-email",title:"Email us",iconCssClass:"mdi mdi-pencil-outline"},{command:"contact-chat",title:"Chat with us",iconCssClass:"mdi mdi-message-text-outline"},{command:"contact-meeting",title:"Book an appointment",iconCssClass:"mdi mdi-coffee"}]}]}],optionTitleKey:"CHANGE_PRIORITY",optionShownOverColumnIds:["priority"],optionItems:[{option:0,title:"n/a",textCssClass:"italic",itemUsabilityOverride:e=>!(e&&e.dataContext).completed,action:(e,a)=>{}},{option:1,iconCssClass:"mdi mdi-star-outline yellow",titleKey:"LOW"},{option:2,iconCssClass:"mdi mdi-star orange",titleKey:"MEDIUM"},{option:3,iconCssClass:"mdi mdi-star red",titleKey:"HIGH"},"divider",{option:4,title:"Extreme",iconCssClass:"mdi mdi-fire",disabled:!0,itemVisibilityOverride:e=>!(e&&e.dataContext).completed},{option:null,title:"Sub-Options (demo)",subMenuTitleKey:"CHANGE_PRIORITY",optionItems:[{option:1,iconCssClass:"mdi mdi-star-outline yellow",titleKey:"LOW"},{option:2,iconCssClass:"mdi mdi-star orange",titleKey:"MEDIUM"},{option:3,iconCssClass:"mdi mdi-star red",titleKey:"HIGH"}]}],onBeforeMenuShow:(e,a)=>{this.angularGrid.slickGrid.setActiveCell(a.row,a.cell,!1),console.log("Before the global Context Menu is shown",a)},onBeforeMenuClose:(e,a)=>console.log("Global Context Menu is closing",a),onCommand:(e,a)=>this.executeCommand(e,a),onOptionSelected:(e,a)=>{const u=a&&a.dataContext;u?.hasOwnProperty("priority")&&(u.priority=a.item.option,this.angularGrid.gridService.updateItem(u))}}}showContextCommandsAndOptions(e){const a=e?[]:["id","title","complete","start","finish","completed","action"];this.contextMenuInstance?.setOptions({commandShownOverColumnIds:a})}showCellMenuCommandsAndOptions(e){this.cellMenuInstance?.setOptions({hideOptionSection:!e})}switchLanguage(){const e="en"===this.selectedLanguage?"fr":"en";this.subscriptions.push(this.translate.use(e).subscribe(()=>{this.selectedLanguage=e}))}toggleDarkMode(){this._darkModeGrid=!this._darkModeGrid,this._darkModeGrid?(document.querySelector(".panel-wm-content").classList.add("dark-mode"),document.querySelector("#demo-container").dataset.bsTheme="dark"):(document.querySelector(".panel-wm-content").classList.remove("dark-mode"),document.querySelector("#demo-container").dataset.bsTheme="light"),this.angularGrid.slickGrid?.setOptions({darkMode:this._darkModeGrid})}static#e=this.ctorParameters=()=>[{type:at}]};p9=Ze([ca({template:'
\n

\n {{title}}\n \n \n \n code\n \n \n

\n
\n\n
\n
\n \n Context Menu:\n \n \n \n\n \n Cell Menu:\n \n \n \n
\n
\n
\n
\n \n Locale:\n \n {{selectedLanguage + \'.json\'}}\n \n
\n
\n\n
\n \n \n
\n
',encapsulation:Ga.None,styles:[Upe()]}),Ct("design:paramtypes",[at])],p9);var Qpe=O(177),Xpe=O.n(Qpe);let g9=class{constructor(){this.title="Example 32: Regular & Custom Tooltips",this.subTitle='\n This demo shows how to create Regular & Custom Tooltips (Wiki docs)\n
\n
    \n
  • optionally parse regular [title] attributes and transform them into tooltips
  • \n
  • create your own Custom Tooltip via a Custom Formatter
  • \n
  • create an Async Custom Tooltip (Promise/Observable) to allowing fetching data from an API
  • \n
  • optionally add Custom Tooltip on Column Header & Column Header-Row (filters)
  • \n
\n ',this.editCommandQueue=[],this.serverApiDelay=500}ngOnInit(){this.initializeGrid(),this.dataset=this.loadData(500)}angularGridReady(e){this.angularGrid=e}initializeGrid(){this.columnDefinitions=[{id:"title",name:"Title",field:"title",sortable:!0,type:w.string,editor:{model:qe.longText,required:!0,alwaysSaveOnEnterKey:!0,minLength:5,maxLength:255},filterable:!0,customTooltip:{position:"right-align",formatter:()=>'
loading...
',asyncProcess:()=>new Promise(e=>{setTimeout(()=>e({ratio:10*Math.random()/10,lifespan:100*Math.random()}),this.serverApiDelay)}),asyncPostFormatter:this.tooltipTaskAsyncFormatter}},{id:"duration",name:"Duration",field:"duration",sortable:!0,filterable:!0,editor:{model:qe.float,decimal:2,valueStep:1,maxValue:1e4,alwaysSaveOnEnterKey:!0},formatter:(e,a,u)=>u>1?`${u} days`:`${u} day`,type:w.number},{id:"desc",name:"Description",field:"description",width:100,filterable:!0,editor:{model:qe.longText,required:!0,alwaysSaveOnEnterKey:!0,minLength:5,maxLength:255},formatter:(e,a,u,i,r)=>`${u||""}`,customTooltip:{useRegularTooltip:!0,useRegularTooltipFromCellTextOnly:!0}},{id:"desc2",name:"Description 2",field:"description",width:100,filterable:!0,editor:{model:qe.longText,required:!0,alwaysSaveOnEnterKey:!0,minLength:5,maxLength:255},formatter:(e,a,u,i,r)=>`${u||""}`,customTooltip:{useRegularTooltip:!0,useRegularTooltipFromFormatterOnly:!0}},{id:"cost",name:'Cost',field:"cost",width:90,sortable:!0,filterable:!0,formatter:j.multiple,params:{formatters:[j.dollar,(e,a,u)=>`${u||""}`]},customTooltip:{useRegularTooltip:!0,useRegularTooltipFromFormatterOnly:!0},type:w.number},{id:"percentComplete",name:"% Complete",field:"percentComplete",type:w.number,editor:{model:qe.slider,minValue:0,maxValue:100},formatter:j.percentCompleteBar,sortable:!0,filterable:!0,filter:{model:ie.slider,operator:">="},customTooltip:{position:"center",formatter:(e,a,u)=>"string"==typeof u&&u.includes("%")?u:`${u}%`,headerFormatter:void 0,headerRowFormatter:void 0}},{id:"start",name:"Start",field:"start",sortable:!0,type:w.date,outputType:w.dateIso,filterable:!0,filter:{model:ie.compoundDate},formatter:j.dateIso,editor:{model:qe.date},customTooltip:{formatter:()=>"",asyncProcess:()=>new Promise(e=>{setTimeout(()=>e({}),this.serverApiDelay)}),asyncPostFormatter:this.tooltipFormatter.bind(this)}},{id:"finish",name:"Finish",field:"finish",sortable:!0,editor:{model:qe.date,editorOptions:{range:{min:"today"}}},type:w.date,outputType:w.dateIso,formatter:j.dateIso,filterable:!0,filter:{model:ie.dateRange},disableTooltip:!0},{id:"effortDriven",name:"Effort Driven",field:"effortDriven",width:80,minWidth:20,maxWidth:100,cssClass:"cell-effort-driven",sortable:!0,filterable:!0,filter:{collection:[{value:"",label:""},{value:!0,label:"True"},{value:!1,label:"False"}],model:ie.singleSelect},exportWithFormatter:!1,formatter:j.checkmarkMaterial},{id:"prerequisites",name:"Prerequisites",field:"prerequisites",filterable:!0,formatter:(e,a,u)=>{if(u&&Array.isArray(u)){const i=u.map(r=>`Task ${r}`).join(", ");return`${i}`}return""},customTooltip:{useRegularTooltip:!0,maxWidth:500},exportWithFormatter:!0,sanitizeDataExport:!0,minWidth:100,sortable:!0,type:w.string,editor:{collectionAsync:new Promise(e=>{setTimeout(()=>{e(Array.from(Array(this.dataset.length).keys()).map(a=>({value:a,label:a,prefix:"Task",suffix:"days"})))},500)}),customStructure:{label:"label",value:"value",labelPrefix:"prefix"},collectionOptions:{separatorBetweenTextLabels:" "},model:qe.multipleSelect},filter:{collectionAsync:new Promise(e=>{setTimeout(()=>{e(Array.from(Array(this.dataset.length).keys()).map(a=>({value:a,label:`Task ${a}`})))})}),customStructure:{label:"label",value:"value",labelPrefix:"prefix"},collectionOptions:{separatorBetweenTextLabels:" "},model:ie.multipleSelect,operator:te.inContains}},{id:"action",name:"Action",field:"action",width:70,minWidth:70,maxWidth:70,formatter:()=>'
',excludeFromExport:!0,cellMenu:{hideCloseButton:!1,commandTitle:"Commands",commandItems:[{command:"command2",title:"Command 2",positionOrder:62,action:(e,a)=>{console.log(a.dataContext,a.column)},itemUsabilityOverride:e=>!e.dataContext.completed},{command:"command1",title:"Command 1",cssClass:"orange",positionOrder:61},{command:"delete-row",title:"Delete Row",positionOrder:64,iconCssClass:"mdi mdi-close",cssClass:"red",textCssClass:"bold",itemVisibilityOverride:e=>!e.dataContext.completed},{divider:!0,command:"",positionOrder:63},{command:"help",title:"Help",iconCssClass:"mdi mdi-help-circle-outline",positionOrder:66},{command:"something",title:"Disabled Command",disabled:!0,positionOrder:67}]}}],this.gridOptions={autoEdit:!0,autoCommitEdit:!0,editable:!0,autoResize:{container:"#demo-container"},enableAutoSizeColumns:!0,enableAutoResize:!0,enableCellNavigation:!0,enableExcelExport:!0,excelExportOptions:{exportWithFormatter:!0},externalResources:[new W7,new Ao],customTooltip:{formatter:this.tooltipFormatter.bind(this),headerFormatter:this.headerFormatter,headerRowFormatter:this.headerRowFormatter,usabilityOverride:e=>0!==e.cell&&"action"!==e?.column?.id},presets:{filters:[{columnId:"prerequisites",searchTerms:[1,3,5,7,9,12,15,18,21,25,28,29,30,32,34]}]},rowHeight:33,enableFiltering:!0,rowSelectionOptions:{selectActiveRow:!1},showCustomFooter:!0,enableCheckboxSelector:!0,enableRowSelection:!0,checkboxSelector:{hideInFilterHeaderRow:!1,hideInColumnTitleRow:!0},editCommandHandler:(e,a,u)=>{this.editCommandQueue.push(u),u.execute()},enableCellMenu:!0,cellMenu:{onCommand:(e,a)=>this.executeCommand(e,a),onOptionSelected:(e,a)=>{const u=a&&a.dataContext;u&&u.hasOwnProperty("completed")&&(u.completed=a.item.option,this.angularGrid.gridService.updateItem(u))}}}}loadData(e){const a=[];for(let u=0;uCustom Tooltip - Header
\n
Column:
${i.name}
`}headerRowFormatter(e,a,u,i){return`
Custom Tooltip - Header Row (filter)
\n
Column:
${i.field}
`}tooltipFormatter(e,a,u,i,r,o){const h=j.checkmarkMaterial(e,a,r.effortDriven,i,r,o);return`
Custom Tooltip
\n
Id:
${r.id}
\n
Title:
${r.title}
\n
Effort Driven:
${h.outerHTML||""}
\n
Completion:
${this.loadCompletionIcons(r.percentComplete)}
\n `}tooltipTaskAsyncFormatter(e,a,u,i,r,o){return`
${`Task ${r.id} - (async tooltip)`}
\n
Completion:
${j.percentCompleteBarWithText(e,a,r.percentComplete,i,r,o).outerHTML||""}
\n
Lifespan:
${r.__params.lifespan.toFixed(2)}
\n
Ratio:
${r.__params.ratio.toFixed(2)}
\n `}loadCompletionIcons(e){let a="",u=0;e>5&&e<25?u=1:e>=25&&e<50?u=2:e>=50&&e<75?u=3:e>=75&&e<100?u=4:100===e&&(u=5);for(let i=0;i=3?"text-warning":"text-secondary"}">`}return a}};g9=Ze([ca({template:'
\n

\n {{title}}\n \n \n code\n \n \n

\n
\n\n
\n \n \n
\n\n \n \n
',encapsulation:Ga.None,styles:[Xpe()]})],g9);function Hc(t,e,a){return e<=t&&t<=a}function E9(t){if(void 0===t)return{};if(t===Object(t))return t;throw TypeError("Could not convert argument to dictionary")}function UT(t){this.tokens=[].slice.call(t)}UT.prototype={endOfStream:function(){return!this.tokens.length},read:function(){return this.tokens.length?this.tokens.shift():-1},prepend:function(t){if(Array.isArray(t))for(var e=t;e.length;)this.tokens.unshift(e.pop());else this.tokens.unshift(t)},push:function(t){if(Array.isArray(t))for(var e=t;e.length;)this.tokens.push(e.shift());else this.tokens.push(t)}};function JT(t,e){if(t)throw TypeError("Decoder error");return e||65533}(function i3e(){}).prototype={handler:function(t,e){}},function n3e(){}.prototype={handler:function(t,e){}};var b9="utf-8";function k9(t,e){if(!(this instanceof k9))return new k9(t,e);if((t=void 0!==t?String(t).toLowerCase():b9)!==b9)throw new Error("Encoding not supported. Only utf-8 is supported");e=E9(e),this._streaming=!1,this._encoder=null,this._options={fatal:!!e.fatal},Object.defineProperty(this,"encoding",{value:"utf-8"})}function r3e(t){var e=t.fatal,a=0,u=0,i=0,r=128,o=191;this.handler=function(d,h){if(-1===h&&0!==i)return i=0,JT(e);if(-1===h)return-1;if(0===i){if(Hc(h,0,127))return h;if(Hc(h,194,223))i=1,a=h-192;else if(Hc(h,224,239))224===h&&(r=160),237===h&&(o=159),i=2,a=h-224;else{if(!Hc(h,240,244))return JT(e);240===h&&(r=144),244===h&&(o=143),i=3,a=h-240}return a<<=6*i,null}if(!Hc(h,r,o))return a=i=u=0,r=128,o=191,d.prepend(h),JT(e);if(r=128,o=191,a+=h-128<<6*(i-(u+=1)),u!==i)return null;var m=a;return a=i=u=0,m}}function o3e(t){t.fatal;this.handler=function(a,u){if(-1===u)return-1;if(Hc(u,0,127))return u;var i,r;Hc(u,128,2047)?(i=1,r=192):Hc(u,2048,65535)?(i=2,r=224):Hc(u,65536,1114111)&&(i=3,r=240);for(var o=[(u>>6*i)+r];i>0;){var d=u>>6*(i-1);o.push(128|63&d),i-=1}return o}}(function ZT(t,e){if(!(this instanceof ZT))return new ZT(t,e);if((t=void 0!==t?String(t).toLowerCase():b9)!==b9)throw new Error("Encoding not supported. Only utf-8 is supported");e=E9(e),this._streaming=!1,this._BOMseen=!1,this._decoder=null,this._fatal=!!e.fatal,this._ignoreBOM=!!e.ignoreBOM,Object.defineProperty(this,"encoding",{value:"utf-8"}),Object.defineProperty(this,"fatal",{value:this._fatal}),Object.defineProperty(this,"ignoreBOM",{value:this._ignoreBOM})}).prototype={decode:function(e,a){var u;u="object"==typeof e&&e instanceof ArrayBuffer?new Uint8Array(e):"object"==typeof e&&"buffer"in e&&e.buffer instanceof ArrayBuffer?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):new Uint8Array(0),a=E9(a),this._streaming||(this._decoder=new r3e({fatal:this._fatal}),this._BOMseen=!1),this._streaming=!!a.stream;for(var o,i=new UT(u),r=[];!i.endOfStream()&&-1!==(o=this._decoder.handler(i,i.read()));)null!==o&&(Array.isArray(o)?r.push.apply(r,o):r.push(o));if(!this._streaming){do{if(-1===(o=this._decoder.handler(i,i.read())))break;null!==o&&(Array.isArray(o)?r.push.apply(r,o):r.push(o))}while(!i.endOfStream());this._decoder=null}return r.length&&-1!==["utf-8"].indexOf(this.encoding)&&!this._ignoreBOM&&!this._BOMseen&&(65279===r[0]?(this._BOMseen=!0,r.shift()):this._BOMseen=!0),function u3e(t){for(var e="",a=0;a>10),56320+(1023&u)))}return e}(r)}},k9.prototype={encode:function(e,a){e=e?String(e):"",a=E9(a),this._streaming||(this._encoder=new o3e(this._options)),this._streaming=!!a.stream;for(var r,u=[],i=new UT(function t3e(t){for(var e=String(t),a=e.length,u=0,i=[];u57343)i.push(r);else if(56320<=r&&r<=57343)i.push(65533);else if(55296<=r&&r<=56319)if(u===a-1)i.push(65533);else{var o=t.charCodeAt(u+1);if(56320<=o&&o<=57343){var d=1023&r,h=1023&o;i.push(65536+(d<<10)+h),u+=1}else i.push(65533)}u+=1}return i}(e));!i.endOfStream()&&-1!==(r=this._encoder.handler(i,i.read()));)Array.isArray(r)?u.push.apply(u,r):u.push(r);if(!this._streaming){for(;-1!==(r=this._encoder.handler(i,i.read()));)Array.isArray(r)?u.push.apply(u,r):u.push(r);this._encoder=null}return new Uint8Array(u)}};const l3e={delimiter:$r.comma,filename:"export",format:yt.csv,useUtf8WithBom:!0};class $T{constructor(){this._delimiter=",",this._exportQuoteWrapper="",this._fileFormat=yt.csv,this._lineCarriageReturn="\n",this._columnHeaders=[],this._hasGroupedItems=!1,this.className="TextExportService"}get _datasetIdPropName(){return this._gridOptions&&this._gridOptions.datasetIdPropertyName||"id"}get _dataView(){return this._grid?.getData()}get _gridOptions(){return this._grid?.getOptions()??{}}dispose(){this._pubSubService?.unsubscribeAll()}init(e,a){if(this._grid=e,this._pubSubService=a.get("PubSubService"),this._locales=this._gridOptions&&this._gridOptions.locales||ue.locales,this._translaterService=this._gridOptions?.translater,this._gridOptions.enableTranslate&&(!this._translaterService||!this._translaterService.translate))throw new Error('[Slickgrid-Universal] requires a Translate Service to be passed in the "translater" Grid Options when "enableTranslate" is enabled. (example: this.gridOptions = { enableTranslate: true, translater: this.translaterService })')}exportToFile(e){if(!this._grid||!this._dataView||!this._pubSubService)throw new Error('[Slickgrid-Universal] it seems that the SlickGrid & DataView objects and/or PubSubService are not initialized did you forget to enable the grid option flag "enableTextExport"?');return new Promise(a=>{this._pubSubService?.publish("onBeforeExportToTextFile",!0),this._exportOptions=cu(!0,{},{...l3e,...this._gridOptions.textExportOptions,...e}),this._delimiter=this._exportOptions.delimiterOverride||this._exportOptions.delimiter||"",this._fileFormat=this._exportOptions.format||yt.csv;const u=this.getDataOutput();setTimeout(()=>{const i={filename:`${this._exportOptions.filename}.${this._fileFormat}`,format:this._fileFormat||yt.csv,mimeType:this._exportOptions.mimeType||"text/plain",useUtf8WithBom:!this._exportOptions||!this._exportOptions.hasOwnProperty("useUtf8WithBom")||this._exportOptions.useUtf8WithBom};this.startDownloadFile({...i,content:u}),this._pubSubService?.publish("onAfterExportToTextFile",i),a(!0)},0)})}startDownloadFile(e){const a=IG(e.content);let u;u=e.format===yt.csv?new k9("utf-8").encode(a):a;const i=new Blob([e.useUtf8WithBom?"\ufeff":"",u],{type:e.mimeType});if("function"==typeof navigator.msSaveOrOpenBlob)navigator.msSaveOrOpenBlob(i,e.filename);else{const r=document.createElement("a"),o=URL.createObjectURL(i);r.textContent="download",r.href=o,r.setAttribute("download",e.filename),r.style.visibility="hidden",document.body.appendChild(r),r.click(),document.body.removeChild(r)}}getDataOutput(){const e=this._grid.getColumns()||[];let a=this._exportOptions.groupingColumnHeaderTitle;!a&&this._gridOptions.enableTranslate&&this._translaterService?.translate&&this._translaterService?.getCurrentLanguage?.()?a=this._translaterService.translate(`${Gl(this._gridOptions)}GROUP_BY`):a||(a=this._locales&&this._locales.TEXT_GROUP_BY),this._exportQuoteWrapper=this._fileFormat===yt.csv?'"':"";let u="";const i=this._dataView.getGrouping();if(i&&Array.isArray(i)&&i.length>0?(this._hasGroupedItems=!0,u+=this._fileFormat===yt.csv?`"${a}"${this._delimiter}`:`${a}${this._delimiter}`):this._hasGroupedItems=!1,this._gridOptions.createPreHeaderPanel&&this._gridOptions.showPreHeaderPanel&&!this._gridOptions.enableDraggableGrouping&&(this._groupedColumnHeaders=this.getColumnGroupedHeaderTitles(e)||[],this._groupedColumnHeaders&&Array.isArray(this._groupedColumnHeaders)&&this._groupedColumnHeaders.length>0)){u+=this._groupedColumnHeaders.map(o=>`${this._exportQuoteWrapper}${o.title}${this._exportQuoteWrapper}`).join(this._delimiter)+this._lineCarriageReturn}if(this._columnHeaders=this.getColumnHeaders(e)||[],this._columnHeaders&&Array.isArray(this._columnHeaders)&&this._columnHeaders.length>0){u+=this._columnHeaders.map(o=>Tu(`${this._exportQuoteWrapper}${o.title}${this._exportQuoteWrapper}`)).join(this._delimiter)+this._lineCarriageReturn}return u+=this.getAllGridRowData(e,this._lineCarriageReturn),u}getAllGridRowData(e,a){const u=[],i=this._dataView.getLength();for(let r=0;r{let i="";i=u.columnGroupKey&&this._gridOptions.enableTranslate&&this._translaterService?.translate&&this._translaterService?.getCurrentLanguage?.()?this._translaterService.translate(u.columnGroupKey):u.columnGroup||"";const r=u.excludeFromExport||!1;(void 0===u.width||u.width>0)&&!r&&a.push({key:u.field||u.id,title:i||""})}),a}getColumnHeaders(e){const a=[];return e&&Array.isArray(e)&&e.forEach(u=>{let i="";i=(u.nameKey||u.nameKey)&&this._gridOptions.enableTranslate&&this._translaterService?.translate&&this._translaterService?.getCurrentLanguage?.()?this._translaterService.translate(u.nameKey||u.nameKey):ui(u.name||"","innerHTML")||yo(u.field);const r=u.excludeFromExport||!1;(void 0===u.width||u.width>0)&&!r&&a.push({key:u.field||u.id,title:i||""})}),a}readRegularRowData(e,a,u){let i=0;const r=[],o=this._exportQuoteWrapper;let d=1;const h=this._dataView.getItemMetadata(a);for(let m=0,g=e.length;m1||"*"===d&&m>0||(d=D?.colspan??1),"*"!==d&&v.id in x&&(k=v.id)}if("*"===d&&m>0||!isNaN(d)&&+d>1&&v.id!==k)r.push(""),!isNaN(d)&&+d>1&&d--;else{let x=oT(a,m,v,u,this._grid,this._exportOptions);(v.sanitizeDataExport||this._exportOptions.sanitizeDataExport)&&(x=Tu(x)),this._fileFormat===yt.csv&&x&&(x=x.toString().replace(/"/gi,'""'));const D=v?.exportCsvForceToKeepAsString?"=":"";r.push(D+o+x+o)}i++}return r.join(this._delimiter)}readGroupedTitleRow(e){let a=Tu(e.title);const u=this._exportQuoteWrapper;return a=kv(5*e.level)+a,this._fileFormat===yt.csv&&(a=a.toString().replace(/"/gi,'""')),u+a+u}readGroupedTotalRow(e,a){const u=this._exportOptions.delimiter,i=this._exportOptions.format,r=this._exportOptions.groupingAggregatorRowText||"",o=this._exportQuoteWrapper,d=[`${o}${r}${o}`];return e.forEach(h=>{let m="";const g=h.excludeFromExport||!1;if(h.groupTotalsFormatter){const v=h.groupTotalsFormatter(a,h,this._grid);m=v instanceof HTMLElement?v.textContent||"":v}(h.sanitizeDataExport||this._exportOptions.sanitizeDataExport)&&(m=Tu(m)),i===yt.csv&&(m=m.toString().replace(/"/gi,'""')),(void 0===h.width||h.width>0)&&!g&&d.push(o+m+o)}),d.join(u)}}let x9=class{constructor(){this._darkMode=!1,this.title="Example 19: Draggable Grouping & Aggregators",this.subTitle='\n
    \n
  • Wiki docs
  • \n
  • This example shows 3 ways of grouping
  • \n
      \n
    1. Drag any Column Header on the top placeholder to group by that column (support moti-columns grouping by adding more columns to the drop area).
    2. \n
    3. Use buttons and defined functions to group by wichever field you want
    4. \n
    5. Use the Select dropdown to group, the position of the Selects represent the grouping level
    6. \n
    \n
  • Fully dynamic and interactive multi-level grouping with filtering and aggregates ovor 50\'000 items
  • \n
  • Each grouping level can have its own aggregates (over child rows, child groups, or all descendant rows)..
  • \n
  • Use "Aggregators" and "GroupTotalFormatters" directly from Angular-Slickgrid
  • \n
\n ',this.durationOrderByCount=!1,this.processing=!1,this.selectedGroupingFields=["","",""],this.excelExportService=new Ao,this.textExportService=new $T,this.loadData(500),this.defineGrid()}ngOnInit(){this.defineGrid()}ngOnDestroy(){document.querySelector(".panel-wm-content").classList.remove("dark-mode"),document.querySelector("#demo-container").dataset.bsTheme="light"}angularGridReady(e){this.angularGrid=e,this.gridObj=e.slickGrid,this.dataviewObj=e.dataView}defineGrid(){this.columnDefinitions=[{id:"title",name:"Title",field:"title",columnGroup:"Common Factor",width:70,minWidth:50,cssClass:"cell-title",filterable:!0,sortable:!0,grouping:{getter:"title",formatter:e=>`Title: ${e.value} (${e.count} items)`,aggregators:[new Nt_Sum("cost")],aggregateCollapsed:!1,collapsed:!1}},{id:"duration",name:"Duration",field:"duration",columnGroup:"Common Factor",width:70,sortable:!0,filterable:!0,editor:{model:qe.float,decimal:2,valueStep:1,maxValue:1e4,alwaysSaveOnEnterKey:!0},filter:{model:ie.slider,operator:">="},type:w.number,groupTotalsFormatter:Wa.sumTotals,grouping:{getter:"duration",formatter:e=>`Duration: ${e.value} (${e.count} items)`,comparer:(e,a)=>this.durationOrderByCount?e.count-a.count:ul.numeric(e.value,a.value,Gt.asc),aggregators:[new Nt_Sum("duration"),new Nt_Sum("cost")],aggregateCollapsed:!1,collapsed:!1}},{id:"start",name:"Start",field:"start",columnGroup:"Period",minWidth:60,sortable:!0,filterable:!0,filter:{model:ie.compoundDate},formatter:j.dateIso,type:w.dateUtc,outputType:w.dateIso,exportWithFormatter:!0,grouping:{getter:"start",formatter:e=>`Start: ${e.value} (${e.count} items)`,aggregators:[new Nt_Sum("cost")],aggregateCollapsed:!1,collapsed:!1}},{id:"finish",name:"Finish",field:"finish",columnGroup:"Period",minWidth:60,sortable:!0,filterable:!0,filter:{model:ie.compoundDate},formatter:j.dateIso,type:w.dateUtc,outputType:w.dateIso,exportWithFormatter:!0,grouping:{getter:"finish",formatter:e=>`Finish: ${e.value} (${e.count} items)`,aggregators:[new Nt_Sum("cost")],aggregateCollapsed:!1,collapsed:!1}},{id:"cost",name:"Cost",field:"cost",columnGroup:"Analysis",width:90,sortable:!0,filterable:!0,filter:{model:ie.compoundInput},formatter:j.dollar,groupTotalsFormatter:Wa.sumTotalsDollar,type:w.number,grouping:{getter:"cost",formatter:e=>`Cost: ${e.value} (${e.count} items)`,aggregators:[new Nt_Sum("cost")],aggregateCollapsed:!0,collapsed:!0}},{id:"percentComplete",name:"% Complete",field:"percentComplete",columnGroup:"Analysis",minWidth:70,width:90,formatter:j.percentCompleteBar,type:w.number,filterable:!0,filter:{model:ie.compoundSlider},sortable:!0,groupTotalsFormatter:Wa.avgTotalsPercentage,grouping:{getter:"percentComplete",formatter:e=>`% Complete: ${e.value} (${e.count} items)`,aggregators:[new Nt_Sum("cost")],aggregateCollapsed:!1,collapsed:!1},params:{groupFormatterPrefix:"Avg: "}},{id:"effortDriven",name:"Effort-Driven",field:"effortDriven",columnGroup:"Analysis",width:80,minWidth:20,maxWidth:100,cssClass:"cell-effort-driven",sortable:!0,filterable:!0,filter:{collection:[{value:"",label:""},{value:!0,label:"True"},{value:!1,label:"False"}],model:ie.singleSelect},formatter:j.checkmarkMaterial,grouping:{getter:"effortDriven",formatter:e=>`Effort-Driven: ${e.value?"True":"False"} (${e.count} items)`,aggregators:[new Nt_Sum("duration"),new Nt_Sum("cost")],collapsed:!1}}],this.gridOptions={autoResize:{container:"#demo-container",rightPadding:10},enableDraggableGrouping:!0,autoEdit:!0,autoCommitEdit:!0,editable:!0,enableCellNavigation:!0,createPreHeaderPanel:!0,showPreHeaderPanel:!0,preHeaderPanelHeight:30,createTopHeaderPanel:!0,showTopHeaderPanel:!0,topHeaderPanelHeight:35,showCustomFooter:!0,enableFiltering:!0,enableSorting:!0,textExportOptions:{sanitizeDataExport:!0},gridMenu:{onCommand:(e,a)=>{"toggle-preheader"===a.command&&this.clearGrouping()}},draggableGrouping:{dropPlaceHolderText:"Drop a column header here to group by the column",deleteIconCssClass:"mdi mdi-close text-color-danger",sortAscIconCssClass:"mdi mdi-arrow-up",sortDescIconCssClass:"mdi mdi-arrow-down",onGroupChanged:(e,a)=>this.onGroupChanged(a),onExtensionRegistered:e=>this.draggableGroupingPlugin=e},darkMode:this._darkMode,enableTextExport:!0,enableExcelExport:!0,excelExportOptions:{sanitizeDataExport:!0},externalResources:[this.excelExportService,this.textExportService]},this.loadData(500)}loadData(e){const a=[];for(let u=0;uthis.selectedGroupingFields[a]="")}collapseAllGroups(){this.dataviewObj.collapseAllGroups()}expandAllGroups(){this.dataviewObj.expandAllGroups()}exportToExcel(){this.excelExportService.exportToExcel({filename:"Export",format:yt.xlsx})}exportToCsv(e="csv"){this.textExportService.exportToFile({delimiter:"csv"===e?$r.comma:$r.tab,filename:"myExport",format:"csv"===e?yt.csv:yt.txt})}groupByDuration(){this.clearGrouping(),this.draggableGroupingPlugin&&this.draggableGroupingPlugin.setDroppedGroups&&(this.showPreHeader(),this.draggableGroupingPlugin.setDroppedGroups("duration"),this.gridObj.invalidate())}groupByDurationOrderByCount(e=!1){this.durationOrderByCount=e,this.clearGrouping(),this.groupByDuration();const a=e?[]:[{columnId:"duration",sortAsc:!0}];this.angularGrid.filterService.setSortColumnIcons(a)}groupByDurationEffortDriven(){this.clearGrouping(),this.draggableGroupingPlugin&&this.draggableGroupingPlugin.setDroppedGroups&&(this.showPreHeader(),this.draggableGroupingPlugin.setDroppedGroups(["duration","effortDriven"]),this.gridObj.invalidate())}groupByFieldName(e,a){if(this.clearGrouping(),this.draggableGroupingPlugin&&this.draggableGroupingPlugin.setDroppedGroups){const u=this.selectedGroupingFields.filter(i=>""!==i);this.showPreHeader(),this.draggableGroupingPlugin.setDroppedGroups(u),this.gridObj.invalidate()}}onGroupChanged(e){const a=e&&e.caller||[],u=e&&e.groupColumns||[];Array.isArray(this.selectedGroupingFields)&&Array.isArray(u)&&u.length>0?this.selectedGroupingFields.forEach((i,r)=>this.selectedGroupingFields[r]=u[r]&&u[r].getter||""):0===u.length&&"remove-group"===a&&this.clearGroupingSelects()}onCellChanged(){this.angularGrid.dataView?.refresh()}showPreHeader(){this.gridObj.setPreHeaderPanelVisibility(!0)}selectTrackByFn(e,a){return e}setFiltersDynamically(){this.angularGrid.filterService.updateFilters([{columnId:"percentComplete",operator:">=",searchTerms:["55"]},{columnId:"cost",operator:"<",searchTerms:["80"]}])}setSortingDynamically(){this.angularGrid.sortService.updateSorting([{columnId:"percentComplete",direction:"ASC"}])}toggleDraggableGroupingRow(){this.clearGrouping(),this.gridObj.setPreHeaderPanelVisibility(!this.gridObj.getOptions().showPreHeaderPanel)}toggleDarkMode(){this._darkMode=!this._darkMode,this.toggleBodyBackground(),this.angularGrid.slickGrid?.setOptions({darkMode:this._darkMode})}toggleBodyBackground(){this._darkMode?(document.querySelector(".panel-wm-content").classList.add("dark-mode"),document.querySelector("#demo-container").dataset.bsTheme="dark"):(document.querySelector(".panel-wm-content").classList.remove("dark-mode"),document.querySelector("#demo-container").dataset.bsTheme="light")}static#e=this.ctorParameters=()=>[]};x9=Ze([ca({template:'
\n

\n {{title}}\n \n \n \n code\n \n \n

\n
\n\n
\n
\n
\n \n \n \n \n \n \n \n
\n
\n
\n
\n \n \n \n \n \n
\n
\n
\n
\n
\n
\n \n
\n \n
\n
\n
\n
\n
\n
\n
\n
\n
\n\n \n \n
'}),Ct("design:paramtypes",[])],x9);var d3e=O(195),aJ=O.n(d3e);class c3e{constructor(e){this.args=e,this.init()}get columnDef(){return this.args?.column??{}}get columnEditor(){return this.columnDef?.editor??{}}get hasAutoCommitEdit(){return this.args.grid.getOptions().autoCommitEdit??!1}get validator(){return this.columnEditor.validator||this.columnDef.validator}init(){const e=this.columnEditor?.placeholder||"",a=this.columnEditor?.title||"";this.inputElm=document.createElement("input"),this.inputElm.type="text",this.inputElm.className="editor-text",this.inputElm.placeholder=e,this.inputElm.title=a,this.args.container.appendChild(this.inputElm),this.inputElm.addEventListener("keydown",this.onKeydown.bind(this)),this.hasAutoCommitEdit&&this.inputElm.addEventListener("focusout",this.save.bind(this)),setTimeout(()=>{this.inputElm.focus(),this.inputElm.select()},50)}onKeydown(e){this._lastInputEvent=e,("ArrowLeft"===e.key||"ArrowRight"===e.key)&&e.stopImmediatePropagation()}destroy(){this.inputElm.removeEventListener("keydown",this.onKeydown.bind(this)),this.inputElm.removeEventListener("focusout",this.save.bind(this)),this.inputElm.remove()}focus(){this.inputElm.focus()}getValue(){return this.inputElm.value}setValue(e){this.inputElm.value=e}loadValue(e){this.defaultValue=e[this.args.column.field]||"",this.inputElm.value=this.defaultValue,this.inputElm.defaultValue=this.defaultValue,this.inputElm.select()}serializeValue(){return this.inputElm.value}applyValue(e,a){const u=this.validate(a);e[this.args.column.field]=u&&u.valid?a:""}isValueChanged(){const e=this._lastInputEvent?.key;return!(!this.columnEditor?.alwaysSaveOnEnterKey||"Enter"!==e)||!(""===this.inputElm.value&&null===this.defaultValue)&&this.inputElm.value!==this.defaultValue}save(){this.validate()?.valid&&(this.hasAutoCommitEdit?this.args.grid.getEditorLock().commitCurrentEdit():this.args.commitChanges())}validate(e){if(this.validator){const a=void 0!==e?e:this.inputElm?.value;return this.validator(a,this.args)}return{valid:!0,msg:null}}}const tJ="assets/data/collection_100_numbers.json",uJ="assets/data/countries.json",iJ="assets/data/country_names.json",qT=(t,e)=>{((e&&e.grid)?.getOptions()??{}).i18n;return null!=t&&t.length?/^Task\s\d+$/.test(t)?{valid:!0,msg:""}:{valid:!1,msg:'Your title is invalid, it must start with "Task" followed by a number'}:{valid:!1,msg:"This is a required field"}},m3e=(t,e,a,u,i)=>{if(a&&Array.isArray(a)){const o=a.map(d=>`Task ${d}`).join(", ");return`${o}`}return""};let f9=class{constructor(e,a){this.http=e,this.translate=a,this.title="Example 3: Editors / Delete",this.subTitle='\n Grid with Inline Editors and onCellClick actions (Wiki docs).\n
    \n
  • Multiple Editors & Filters are available: AutoComplete, Checkbox, Date, Slider, SingleSelect, MultipleSelect, Float, Text, LongText... even Custom Editor
  • \n
  • When using "enableCellNavigation: true", clicking on a cell will automatically make it active & selected.
  • \n
    • If you don\'t want this behavior, then you should disable "enableCellNavigation"
    \n
  • Inline Editors requires "enableCellNavigation: true" (not sure why though)
  • \n
  • \n Support Excel Copy Buffer (SlickGrid Copy Manager Plugin), you can use it by simply enabling "enableExcelCopyBuffer" flag.\n Note that it will only evaluate Formatter when the "exportWithFormatter" flag is enabled (through "ExportOptions" or the column definition)\n
  • \n
  • MultipleSelect & SingeSelect Editors & Filters can use a regular "collection" or "collectionAsync" to load it asynchronously
  • \n
      \n
    • Click on "Add Item" and see the Editor/Filter or the "Prerequesites" column change
    • \n
    • Any Editor/Filter with a "collection" can be changed dynamically later in the future
    • \n
    \n
\n ',this._commandQueue=[],this.isAutoEdit=!0,this.selectedLanguage="en",this.duplicateTitleHeaderCount=1}ngOnInit(){this.prepareGrid()}angularGridReady(e){this.angularGrid=e,this.gridObj=e.slickGrid}prepareGrid(){this.columnDefinitions=[{id:"edit",field:"id",excludeFromColumnPicker:!0,excludeFromGridMenu:!0,excludeFromHeaderMenu:!0,formatter:j.icon,params:{iconCssClass:"mdi mdi-pencil pointer"},minWidth:30,maxWidth:30,onCellClick:(e,a)=>{console.log(a),this.alertWarning=`Editing: ${a.dataContext.title}`,this.angularGrid.gridService.highlightRow(a.row,1500),this.angularGrid.gridService.setSelectedRow(a.row)}},{id:"delete",field:"id",excludeFromColumnPicker:!0,excludeFromGridMenu:!0,excludeFromHeaderMenu:!0,formatter:j.icon,params:{iconCssClass:"mdi mdi-trash-can pointer"},minWidth:30,maxWidth:30},{id:"title",name:"Title",field:"title",minWidth:100,filterable:!0,sortable:!0,type:w.string,editor:{model:qe.longText,required:!0,maxLength:12,editorOptions:{cols:42,rows:5,buttonTexts:{}},validator:qT},onCellChange:(e,a)=>{console.log(a),this.alertWarning=`Updated Title: ${a.dataContext.title}`}},{id:"title2",name:"Title, Custom Editor",field:"title",minWidth:70,filterable:!0,sortable:!0,type:w.string,editor:{model:c3e,placeholder:"custom",validator:qT},filter:{model:WT,placeholder:"\u{1f50e}\ufe0e custom"}},{id:"duration",name:"Duration (days)",field:"duration",minWidth:100,filterable:!0,sortable:!0,formatter:j.complexObject,type:w.number,exportWithFormatter:!0,filter:{model:ie.slider,filterOptions:{hideSliderNumber:!1}},editor:{model:qe.slider,minValue:0,maxValue:100}},{id:"complete",name:"% Complete",field:"percentComplete",minWidth:100,filterable:!0,formatter:j.multiple,type:w.number,editor:{model:qe.singleSelect,enableRenderHtml:!0,collection:Array.from(Array(101).keys()).map(e=>({value:e,label:e,symbol:''})),customStructure:{value:"value",label:"label",labelSuffix:"symbol"},collectionSortBy:{property:"label",sortDesc:!0},collectionFilterBy:{property:"value",value:0,operator:te.notEqual},editorOptions:{maxHeight:400}},params:{formatters:[j.collectionEditor,j.percentCompleteBar]}},{id:"start",name:"Start",field:"start",minWidth:100,filterable:!0,filter:{model:ie.compoundDate},formatter:j.multiple,params:{formatters:[j.complexObject,j.dateIso]},exportWithFormatter:!0,sortable:!0,type:w.date,editor:{model:qe.date}},{id:"finish",name:"Finish",field:"finish",minWidth:100,filterable:!0,sortable:!0,filter:{model:ie.compoundDate},formatter:j.dateIso,exportWithFormatter:!0,type:w.date,saveOutputType:w.dateUtc,editor:{model:qe.date,editorOptions:{range:{min:"today"}}}},{id:"cityOfOrigin",name:"City of Origin",field:"cityOfOrigin",filterable:!0,minWidth:100,editor:{model:qe.autocompleter,placeholder:"\u{1f50e}\ufe0e search city",editorOptions:{forceUserInput:!0,minLength:3,fetch:(e,a)=>{aJ()(`http://gd.geobytes.com/AutoCompleteCity?q=${e}`).then(u=>u.json()).then(u=>a(u)).catch(u=>console.log("invalid JSONP response",u))}}},filter:{model:ie.autocompleter,filterOptions:{minLength:3,fetch:(e,a)=>{aJ()(`http://gd.geobytes.com/AutoCompleteCity?q=${e}`).then(u=>u.json()).then(u=>a(u)).catch(u=>console.log("invalid JSONP response",u))}}}},{id:"countryOfOrigin",name:"Country of Origin",field:"countryOfOrigin",formatter:j.complexObject,exportWithFormatter:!0,dataKey:"code",labelKey:"name",type:w.object,sortComparer:ul.objectString,filterable:!0,sortable:!0,minWidth:100,editor:{model:qe.autocompleter,customStructure:{label:"name",value:"code"},collectionAsync:this.http.get(uJ)},filter:{model:ie.autocompleter,customStructure:{label:"name",value:"code"},collectionAsync:this.http.get(uJ)}},{id:"countryOfOriginName",name:"Country of Origin Name",field:"countryOfOriginName",filterable:!0,sortable:!0,minWidth:100,editor:{model:qe.autocompleter,collectionAsync:this.http.get(iJ)},filter:{model:ie.autocompleter,collectionAsync:this.http.get(iJ)}},{id:"effort-driven",name:"Effort Driven",field:"effortDriven",minWidth:70,filterable:!0,type:w.boolean,filter:{model:ie.singleSelect,collection:[{value:"",label:""},{value:!0,label:"True"},{value:!1,label:"False"}]},formatter:j.checkmarkMaterial,editor:{model:qe.checkbox}},{id:"prerequisites",name:"Prerequisites",field:"prerequisites",minWidth:100,filterable:!0,formatter:m3e,exportWithFormatter:!0,sanitizeDataExport:!0,sortable:!0,type:w.string,editor:{placeholder:"choose option",collectionAsync:this.http.get(tJ),collectionSortBy:{property:"label",sortDesc:!0},customStructure:{label:"label",value:"value",labelPrefix:"prefix"},collectionOptions:{separatorBetweenTextLabels:" "},model:qe.multipleSelect,required:!0},filter:{collectionAsync:this.http.get(tJ),collectionSortBy:{property:"label",sortDesc:!0},customStructure:{label:"label",value:"value",labelPrefix:"prefix"},collectionOptions:{separatorBetweenTextLabels:" "},model:ie.multipleSelect,operator:te.inContains}}],this.gridOptions={asyncEditorLoading:!1,autoEdit:this.isAutoEdit,autoCommitEdit:!1,autoResize:{container:"#demo-container",rightPadding:10},editable:!0,enableCellNavigation:!0,enableColumnPicker:!0,enableExcelCopyBuffer:!0,enableFiltering:!0,editCommandHandler:(e,a,u)=>{this._commandQueue.push(u),u.execute()},i18n:this.translate},this.dataset=this.mockData(100)}addItem(){const e=this.dataset.length,a=this.mockData(1,e);setTimeout(()=>{const u=this.columnDefinitions.find(i=>"prerequisites"===i.id);if(u){const i=u.filter.collectionAsync,r=u.editor.collection;Array.isArray(r)&&(this.angularGrid.gridService.addItem(a[0]),r.push({value:e,label:e,prefix:"Task"}),i instanceof sa&&i.next(r))}},250)}deleteItem(){const e=this.columnDefinitions.find(a=>"prerequisites"===a.id);if(e){const a=e.filter.collectionAsync,u=e.filter.collection;if(Array.isArray(u)){const i=this.sortCollectionDescending(u).pop();this.angularGrid.gridService.deleteItemById(i.value),a instanceof sa&&a.next(u)}}}sortCollectionDescending(e){return e.sort((a,u)=>a.value-u.value)}mockData(e,a=0){const u=[];for(let i=a;i[{type:jt},{type:at}]};f9=Ze([ca({template:'
\n

\n {{title}}\n \n \n code\n \n \n

\n
\n\n
\n
\n \n \n \n \n \n
\n \n \n \n \n
\n
\n
\n \n \n \n \n
\n
\n
\n
\n \n \n
\n
\n
\n\n
\n
\n Updated Item: {{updatedObject | json}}\n
\n
\n Updated Item: {{alertWarning}}\n
\n
\n
\n\n
\n \n \n
\n
'}),Ct("design:paramtypes",[jt,at])],f9);let D9=class{constructor(){this._darkMode=!1,this.title="Example 37: Footer Totals Row",this.subTitle="Display a totals row at the end of the grid.",this.columnDefinitions=[]}angularGridReady(e){this.angularGrid=e,this.updateAllTotals()}ngOnInit(){this.defineGrid(),this.dataset=this.loadData(100)}ngOnDestroy(){document.querySelector(".panel-wm-content").classList.remove("dark-mode"),document.querySelector("#demo-container").dataset.bsTheme="light"}defineGrid(){const e=[];for(let a=0;a<10;a++)e.push({id:a,name:String.fromCharCode(65+a),field:String(a),type:w.number,width:58,editor:{model:qe.integer}});this.columnDefinitions=e,this.gridOptions={autoEdit:!0,autoCommitEdit:!0,editable:!0,darkMode:this._darkMode,gridHeight:450,gridWidth:800,enableCellNavigation:!0,rowHeight:30,createFooterRow:!0,showFooterRow:!0,footerRowHeight:28}}loadData(e){const a=[];for(let u=0;u\n

\n {{title}}\n \n \n \n code\n \n \n

\n
\n\n \n \n
'})],D9);var v3e=O(236),b3e=O.n(v3e);const x3e=(t,e,a,u,i,r)=>{const o=function k3e(t,e,a){const u=a.getOptions(),i=e.editor;return u.editable&&i}(0,u,r);a=a??"";const d=document.createElement("div");return d.className="editing-field",a instanceof HTMLElement?d.appendChild(a):d.textContent=a,o?d:a};class YT{constructor(e,a){this.field=e,this.taxRate=a,this._sum=0,this._type="sum"}get type(){return this._type}init(){this._sum=0}accumulate(e){if("taxes"===this.field&&e.taxable&&(this._sum+=e.price*e.qty*(this.taxRate/100)),"subTotal"===this.field&&(this._sum+=e.price*e.qty),"total"===this.field){let a=0;e.taxable&&(a=e.price*e.qty*(this.taxRate/100)),this._sum+=e.price*e.qty+a}}storeResult(e){(!e||void 0===e[this._type])&&(e[this._type]={}),e[this._type][this.field]=this._sum}}let C9=class{constructor(){this.columnDefinitions=[],this.dataset=[],this.isDataGrouped=!1,this.taxRate=7.5,this.excelExportService=new Ao}angularGridReady(e){this.angularGrid=e}ngOnInit(){this.prepareGrid(),this.dataset=this.getData()}prepareGrid(){this.columnDefinitions=[{id:"sel",name:"#",field:"id",headerCssClass:"header-centered",cssClass:"cell-unselectable",excludeFromExport:!0,maxWidth:30},{id:"name",name:"Name",field:"name",sortable:!0,width:140,filterable:!0,excelExportOptions:{width:18}},{id:"price",name:"Price",field:"price",type:w.number,editor:{model:qe.float,decimal:2},sortable:!0,width:70,filterable:!0,formatter:j.dollar,groupTotalsFormatter:Wa.sumTotalsDollarBold,groupTotalsExcelExportOptions:{style:{font:{bold:!0,size:11.5},format:"$0.00",border:{top:{color:"FF747474",style:"thick"}}},valueParserCallback:this.excelGroupCellParser.bind(this)}},{id:"qty",name:"Quantity",field:"qty",type:w.number,groupTotalsFormatter:Wa.sumTotalsBold,groupTotalsExcelExportOptions:{style:{font:{bold:!0,size:11.5},border:{top:{color:"FF747474",style:"thick"}}},valueParserCallback:this.excelGroupCellParser.bind(this)},params:{minDecimal:0,maxDecimal:0},editor:{model:qe.integer},sortable:!0,width:60,filterable:!0},{id:"subTotal",name:"Sub-Total",field:"subTotal",cssClass:"text-sub-total",type:w.number,sortable:!0,width:70,filterable:!0,exportWithFormatter:!1,formatter:j.multiple,groupTotalsFormatter:Wa.sumTotalsDollarBold,params:{formatters:[(e,a,u,i,r)=>r.price*r.qty,j.dollar]},excelExportOptions:{style:{font:{outline:!0,italic:!0,color:"FF215073"},format:"$0.00"},width:12,valueParserCallback:this.excelRegularCellParser.bind(this)},groupTotalsExcelExportOptions:{style:{font:{bold:!0,italic:!0,size:11.5},format:"$0.00",border:{top:{color:"FF747474",style:"thick"}}},valueParserCallback:this.excelGroupCellParser.bind(this)}},{id:"taxable",name:"Taxable",field:"taxable",cssClass:"text-center",sortable:!0,width:60,filterable:!0,formatter:j.checkmarkMaterial,exportCustomFormatter:(e,a,u)=>u?"\u2713":"",excelExportOptions:{style:{alignment:{horizontal:"center"}}}},{id:"taxes",name:"Taxes",field:"taxes",cssClass:"text-taxes",type:w.number,sortable:!0,width:70,filterable:!0,formatter:j.multiple,groupTotalsFormatter:Wa.sumTotalsDollarBold,params:{formatters:[(e,a,u,i,r)=>r.taxable?r.price*r.qty*(this.taxRate/100):null,j.dollar]},excelExportOptions:{style:{font:{outline:!0,italic:!0,color:"FFC65911"},format:"$0.00"},width:12,valueParserCallback:this.excelRegularCellParser.bind(this)},groupTotalsExcelExportOptions:{style:{font:{bold:!0,italic:!0,color:"FFC65911",size:11.5},format:"$0.00",border:{top:{color:"FF747474",style:"thick"}}},valueParserCallback:this.excelGroupCellParser.bind(this)}},{id:"total",name:"Total",field:"total",type:w.number,sortable:!0,width:70,filterable:!0,cssClass:"text-total",formatter:j.multiple,groupTotalsFormatter:Wa.sumTotalsDollarBold,params:{formatters:[(e,a,u,i,r)=>{let o=r.price*r.qty;return r.taxable&&(o+=o*(this.taxRate/100)),o},j.dollar]},excelExportOptions:{style:{font:{outline:!0,bold:!0,color:"FF005A9E"},format:"$0.00"},width:12,valueParserCallback:this.excelRegularCellParser.bind(this)},groupTotalsExcelExportOptions:{style:{font:{bold:!0,color:"FF005A9E",size:12},format:"$0.00",border:{top:{color:"FF747474",style:"thick"}}},valueParserCallback:this.excelGroupCellParser.bind(this)}}],this.gridOptions={autoAddCustomEditorFormatter:x3e,gridHeight:410,gridWidth:750,enableCellNavigation:!0,autoEdit:!0,autoCommitEdit:!0,editable:!0,rowHeight:33,formatterOptions:{maxDecimal:2,minDecimal:2},enableGrouping:!0,externalResources:[this.excelExportService],enableExcelExport:!0,excelExportOptions:{filename:"grocery-list",sanitizeDataExport:!0,sheetName:"Grocery List",columnHeaderStyle:{font:{color:"FFFFFFFF"},fill:{type:"pattern",patternType:"solid",fgColor:"FF4a6c91"}},customExcelHeader:(e,a)=>{const u=e.getStyleSheet().createFormat({font:{size:18,fontName:"Calibri",bold:!0,color:"FFFFFFFF"},alignment:{wrapText:!0,horizontal:"center"},fill:{type:"pattern",patternType:"solid",fgColor:"FF203764"}});a.setRowInstructions(0,{height:40});const r=this.isDataGrouped?"H1":"G1";a.mergeCells("A1",r),a.data.push([{value:"Grocery Shopping List",metadata:{style:u.id}}])}}}}invalidateAll(){this.angularGrid.dataView?.refresh(),this.angularGrid.slickGrid?.invalidate()}updateTaxRate(){this.isDataGrouped&&this.groupByTaxable(),this.invalidateAll()}exportToExcel(){this.excelExportService.exportToExcel()}excelGroupCellParser(e,{columnDef:a,excelFormatId:u,dataRowIdx:i}){const d=this.angularGrid.slickGrid?.getColumnIndex("price")||0,h=this.angularGrid.slickGrid?.getColumnIndex("qty")||0,m=this.angularGrid.slickGrid?.getColumnIndex("taxes")||0,g=this.angularGrid.slickGrid?.getColumnIndex("subTotal")||0,v=this.angularGrid.slickGrid?.getColumnIndex("total")||0,k=e?.group?.count||0,x=`${String.fromCharCode(65+d-0)}`,D=`${String.fromCharCode(65+h-0)}`,C=`${String.fromCharCode(65+g-0)}`,F=`${String.fromCharCode(65+m-0)}`,A=`${String.fromCharCode(65+v-0)}`;let z="";switch(a.id){case"price":z=x;break;case"qty":z=D;break;case"subTotal":z=C;break;case"taxes":z=F;break;case"total":z=A}return{value:`SUM(${z}${i+3-k}:${z}${i+3-1})`,metadata:{type:"formula",style:u}}}excelRegularCellParser(e,{columnDef:a,excelFormatId:u,dataRowIdx:i,dataContext:r}){const o=this.isDataGrouped?0:1,h=this.angularGrid.slickGrid?.getColumnIndex("price")||0,m=this.angularGrid.slickGrid?.getColumnIndex("qty")||0,g=this.angularGrid.slickGrid?.getColumnIndex("taxes")||0,v=`${String.fromCharCode(65+h-o)}${i+3}`,k=`${String.fromCharCode(65+m-o)}${i+3}`,x=`${String.fromCharCode(65+g-o)}${i+3}`;let D="";switch(a.id){case"subTotal":D=`${v}*${k}`;break;case"taxes":D=r.taxable?`${v}*${k}*${this.taxRate/100}`:"";break;case"total":D=`(${v}*${k})+${x}`}return{value:D,metadata:{type:"formula",style:u}}}getData(){let e=1;return[{id:e++,name:"Oranges",qty:4,taxable:!1,price:2.22},{id:e++,name:"Apples",qty:3,taxable:!1,price:1.55},{id:e++,name:"Honeycomb Cereals",qty:2,taxable:!0,price:4.55},{id:e++,name:"Raisins",qty:77,taxable:!1,price:.23},{id:e++,name:"Corn Flake Cereals",qty:1,taxable:!0,price:6.62},{id:e++,name:"Tomatoes",qty:3,taxable:!1,price:1.88},{id:e++,name:"Butter",qty:1,taxable:!1,price:3.33},{id:e++,name:"BBQ Chicken",qty:1,taxable:!1,price:12.33},{id:e++,name:"Chicken Wings",qty:12,taxable:!0,price:.53},{id:e++,name:"Drinkable Yogurt",qty:6,taxable:!0,price:1.22},{id:e++,name:"Milk",qty:3,taxable:!0,price:3.11}]}clearGrouping(){this.isDataGrouped=!1,this.angularGrid?.dataView?.setGrouping([])}groupByTaxable(){this.isDataGrouped=!0,this.angularGrid?.dataView?.setGrouping({getter:"taxable",formatter:u=>`Taxable: (${u.count} items)`,comparer:(u,i)=>i.value-u.value,aggregators:[new Nt_Sum("price"),new Nt_Sum("qty"),new YT("subTotal",this.taxRate),new YT("taxes",this.taxRate),new YT("total",this.taxRate)],aggregateCollapsed:!1,lazyTotalsCalculation:!1}),this.angularGrid?.dataView?.refresh()}static#e=this.ctorParameters=()=>[]};C9=Ze([ca({template:'
\n

\n Example 36: Excel Export Formulas\n \n \n code\n \n \n

\n
\n Grid with Excel Formulas (Wiki docs).\n Calculate Totals via Formatters in the UI, but use Excel Formula when exporting via excelExportOptions.valueParserCallback\n When Grouped we will also calculate the Group Totals in the UI via Group Formatter and we again use Excel Formula to calculate the Group Totals (sum) dynamically.\n For Grouping we need to use groupTotalsExcelExportOptions.valueParserCallback instead.\n
\n\n
\n
\n \n \n \n \n \n \n Tax Rate (%):\n \n \n \n
\n
\n\n \n \n
',encapsulation:Ga.None,styles:[b3e()]}),Ct("design:paramtypes",[])],C9);const D3e=(t,e,a)=>a?'':{text:'',addClasses:"lightblue",toolTip:"Freezing"},C3e=(t,e,a)=>`\n \n `;let y9=class{constructor(){this.title="Example 2: Grid with Formatters",this.subTitle='\n Grid with Custom and/or included Slickgrid Formatters (Wiki docs).\n
    \n
  • The 2 last columns are using Custom Formatters
  • \n
    • The "Completed" column uses a the "onCellClick" event and a formatter to simulate a toggle action
    \n
  • \n Support Excel Copy Buffer (SlickGrid Copy Manager Plugin), you can use it by simply enabling "enableExcelCopyBuffer" flag.\n Note that it will only evaluate Formatter when the "exportWithFormatter" flag is enabled (through "ExportOptions" or the column definition)\n
  • \n
  • This example also has auto-resize enabled, and we also demo how you can pause the resizer if you wish to
  • \n
\n ',this.columnDefinitions=[],this.resizerPaused=!1}angularGridReady(e){this.angularGrid=e}ngOnInit(){this.columnDefinitions=[{id:"title",name:"Title",field:"title",sortable:!0,type:w.string,width:70},{id:"phone",name:"Phone Number using mask",field:"phone",sortable:!0,type:w.number,minWidth:100,formatter:j.mask,params:{mask:"(000) 000-0000"}},{id:"duration",name:"Duration (days)",field:"duration",formatter:j.decimal,params:{minDecimal:1,maxDecimal:2},sortable:!0,type:w.number,minWidth:90,exportWithFormatter:!0},{id:"complete",name:"% Complete",field:"percentComplete",formatter:j.percentCompleteBar,type:w.number,sortable:!0,minWidth:100},{id:"percent2",name:"% Complete",field:"percentComplete2",formatter:j.progressBar,type:w.number,sortable:!0,minWidth:100},{id:"start",name:"Start",field:"start",formatter:j.dateIso,sortable:!0,type:w.date,minWidth:90,exportWithFormatter:!0},{id:"finish",name:"Finish",field:"finish",formatter:j.dateIso,sortable:!0,type:w.date,minWidth:90,exportWithFormatter:!0},{id:"effort-driven",name:"Effort Driven",field:"effortDriven",formatter:D3e,type:w.number,sortable:!0,minWidth:100},{id:"completed",name:"Completed",field:"completed",type:w.number,sortable:!0,minWidth:100,formatter:C3e,onCellClick:(a,u)=>{this.toggleCompletedProperty(u&&u.dataContext)}}],this.gridOptions={autoResize:{container:"#demo-container",rightPadding:10},enableAutoResize:!0,enableCellNavigation:!0,showCustomFooter:!0,customFooterOptions:{leftFooterText:"custom footer text",hideTotalItemCount:!0,hideLastUpdateTimestamp:!0},enableExcelCopyBuffer:!0};const e=[];for(let a=0;a<500;a++){const u=2e3+Math.floor(10*Math.random()),i=Math.floor(11*Math.random()),r=Math.floor(29*Math.random()),o=Math.round(100*Math.random());e[a]={id:a,title:"Task "+a,phone:this.generatePhoneNumber(),duration:a%33==0?null:100*Math.random()+"",percentComplete:o,percentComplete2:o,percentCompleteNumber:o,start:new Date(u,i,r),finish:new Date(u,i+1,r),effortDriven:a%5==0}}this.dataset=e}generatePhoneNumber(){let e="";for(let a=0;a<10;a++)e+=Math.round(9*Math.random())+"";return e}togglePauseResizer(){this.resizerPaused=!this.resizerPaused,this.angularGrid.resizerService.pauseResizer(this.resizerPaused)}toggleCompletedProperty(e){"object"==typeof e&&(e.completed=!e.completed,setTimeout(()=>{this.angularGrid.gridService.updateItemById(e.id,e,{highlightRow:!1})},250))}};y9=Ze([ca({template:'
\n

\n {{title}}\n \n \n code\n \n \n

\n
\n\n \n\n \n \n
'})],y9);var _3e=O(944),F3e=O.n(_3e);let _9=class{constructor(){this.title="Example 20: Pinned (frozen) Columns/Rows",this.subTitle='\n This example demonstrates the use of Pinned (aka frozen) Columns and/or Rows (Wiki docs)\n
    \n
  • Option to pin any number of columns (left only) or rows
  • \n
  • Option to pin the rows at the bottom instead of the top (default)
  • \n
  • You can also dynamically any of these options, through SlickGrid "setOptions()"
  • \n
  • Possibility to change the styling of the line border between pinned columns/rows
  • \n
\n ',this.frozenColumnCount=2,this.frozenRowCount=3,this.isFrozenBottom=!1,this.slickEventHandler=new Ut}ngOnInit(){this.prepareDataGrid()}ngOnDestroy(){this.slickEventHandler.unsubscribeAll()}angularGridReady(e){this.angularGrid=e,this.gridObj=e.slickGrid,this.slickEventHandler.subscribe(this.gridObj.onMouseEnter,a=>this.colorizeHoveringRow(a,!0)),this.slickEventHandler.subscribe(this.gridObj.onMouseLeave,a=>this.colorizeHoveringRow(a,!1))}colorizeHoveringRow(e,a){const u=this.gridObj.getCellFromEvent(e),i=a?[u?.row??0]:[];this.gridObj.setSelectedRows(i),e.preventDefault()}prepareDataGrid(){this.columnDefinitions=[{id:"sel",name:"#",field:"id",minWidth:40,width:40,maxWidth:40,cannotTriggerInsert:!0,resizable:!1,unselectable:!0},{id:"title",name:"Title",field:"title",minWidth:100,width:120,filterable:!0,sortable:!0},{id:"percentComplete",name:"% Complete",field:"percentComplete",resizable:!1,minWidth:130,width:140,formatter:j.percentCompleteBar,type:w.number,filterable:!0,filter:{model:ie.slider,operator:">="},sortable:!0},{id:"start",name:"Start",field:"start",minWidth:100,width:120,filterable:!0,sortable:!0,formatter:j.dateIso},{id:"finish",name:"Finish",field:"finish",minWidth:100,width:120,filterable:!0,sortable:!0,formatter:j.dateIso},{id:"cost",name:"Cost | Duration",field:"cost",formatter:this.costDurationFormatter.bind(this),minWidth:150,width:170,sortable:!0,filter:{model:ie.compoundSlider},editor:{model:qe.dualInput,params:{leftInput:{field:"cost",type:"float",decimal:2,minValue:0,maxValue:5e4,placeholder:"< 50K",errorMessage:"Cost must be positive and below $50K."},rightInput:{field:"duration",type:"float",minValue:0,maxValue:100,title:"make sure Duration is withing its range of 0 to 100",errorMessage:"Duration must be between 0 and 100."}}}},{id:"effortDriven",name:"Effort Driven",field:"effortDriven",minWidth:100,width:120,formatter:j.checkmarkMaterial,filterable:!0,filter:{collection:[{value:"",label:""},{value:!0,label:"True"},{value:!1,label:"False"}],model:ie.singleSelect},sortable:!0},{id:"title1",name:"Title 1",field:"title1",minWidth:100,width:120,filterable:!0,sortable:!0},{id:"title2",name:"Title 2",field:"title2",minWidth:100,width:120,filterable:!0,sortable:!0},{id:"title3",name:"Title 3",field:"title3",minWidth:100,width:120,filterable:!0,sortable:!0},{id:"title4",name:"Title 4",field:"title4",minWidth:100,width:120,filterable:!0,sortable:!0}],this.gridOptions={autoResize:{container:"#demo-container",rightPadding:10},enableExcelCopyBuffer:!0,enableCellNavigation:!0,editable:!0,autoEdit:!0,asyncEditorLoading:!0,frozenColumn:this.frozenColumnCount,frozenRow:this.frozenRowCount,gridMenu:{hideClearFrozenColumnsCommand:!1},headerMenu:{hideFreezeColumnsCommand:!1}},this.dataset=this.getData()}getData(){const e=[];for(let a=0;a<500;a++)e[a]={id:a,title:"Task "+a,cost:a%33==0?null:1e4*Math.random(),duration:a%8?Math.round(100*Math.random())+"":null,percentComplete:Math.round(100*Math.random()),start:new Date(2009,0,1),finish:new Date(2009,4,5),effortDriven:a%5==0,title1:`Some Text ${Math.round(25*Math.random())}`,title2:`Some Text ${Math.round(25*Math.random())}`,title3:`Some Text ${Math.round(25*Math.random())}`,title4:`Some Text ${Math.round(25*Math.random())}`};return e}changeFrozenColumnCount(){this.gridObj&&this.gridObj.setOptions&&this.gridObj.setOptions({frozenColumn:this.frozenColumnCount})}changeFrozenRowCount(){this.gridObj&&this.gridObj.setOptions&&this.gridObj.setOptions({frozenRow:this.frozenRowCount})}costDurationFormatter(e,a,u,i,r){const o=this.isNullUndefinedOrEmpty(r.cost)?"n/a":Mu(r.cost,0,2,!1,"$","",".",",");let d="n/a";return!this.isNullUndefinedOrEmpty(r.duration)&&r.duration>=0&&(d=`${r.duration} ${r.duration>1?"days":"day"}`),`${o} | ${d}`}isNullUndefinedOrEmpty(e){return""===e||null==e}onValidationError(e,a){alert(a.validationResults.msg)}setFrozenColumns(e){this.gridObj.setOptions({frozenColumn:e}),this.gridOptions=this.gridObj.getOptions()}toggleFrozenBottomRows(){this.gridObj&&this.gridObj.setOptions&&(this.gridObj.setOptions({frozenBottom:!this.isFrozenBottom}),this.isFrozenBottom=!this.isFrozenBottom)}static#e=this.ctorParameters=()=>[]};_9=Ze([ca({template:'
\n

\n {{title}}\n \n \n code\n \n \n

\n
\n\n
\n
\n \n \n
\n
\n \n
\n
\n
\n \n \n
\n
\n \n
\n
\n\n
\n
\n \n \n\n \n \n : {{ isFrozenBottom ? \'Bottom\' : \'Top\' }}\n \n
\n
\n
\n
\n
\n \n \n
',encapsulation:Ga.None,styles:[F3e()]}),Ct("design:paramtypes",[])],_9);class Wh{constructor(e,a){if(this.queryFnName=e,this.head=[],"string"==typeof a)this.alias=a;else if("object"==typeof a)this.filter(a);else{if(void 0===a&&2===arguments.length)throw new TypeError('You have passed undefined as Second argument to "Query"');if(void 0!==a)throw new TypeError(`Second argument to "Query" should be an alias name(String) or filter arguments(Object). What was passed is: ${a}`)}}filter(e){for(const a of Object.keys(e)){if("function"==typeof e[a])continue;const u=this.getGraphQLValue(e[a]);"{}"!==u&&this.head.push(`${a}:${u}`)}return this}find(...e){if(!e||!Array.isArray(e)||0===e.length)throw new TypeError("find value can not be >>falsy<<");const a=1===e.length&&Array.isArray(e[0])?e[0]:e;return this.body=this.parceFind(a),this}setAlias(e){this.alias=e}toString(){if(void 0===this.body)throw new ReferenceError("return properties are not defined. use the 'find' function to defined them");return`${this.alias?this.alias+":":""} ${this.queryFnName} ${this.head.length>0?"("+this.head.join(",")+")":""} { ${this.body} }`}parceFind(e){return e.map((u,i)=>{const r=e[i];if(r instanceof Wh)return r.toString();if(Array.isArray(r)||"object"!=typeof r){if("string"==typeof r)return r;throw new RangeError(`cannot handle Find value of ${r}`)}{const o=Object.keys(r);if(1!==o.length)throw new RangeError(`Alias objects should only have one value. was passed: ${JSON.stringify(r)}`);const d=o[0],h=r[d];return Array.isArray(h)?new Wh(d).find(h):`${d} : ${h} `}}).join(",")}getGraphQLValue(e){return"string"==typeof e?e=JSON.stringify(e):Array.isArray(e)?e=`[${e=e.map(a=>this.getGraphQLValue(a)).join()}]`:e instanceof Date?e=JSON.stringify(e):null!==e&&"object"==typeof e&&(e=this.objectToString(e)),e}objectToString(e){const a=[];for(const u of Object.keys(e))"function"!=typeof e[u]&&a.push(`${u}:${this.getGraphQLValue(e[u])}`);return`{${a.join()}}`}}class QT{constructor(){this._currentFilters=[],this._currentPagination=null,this._currentSorters=[],this._datasetIdPropName="id",this.defaultPaginationOptions={first:25,offset:0}}get columnDefinitions(){return this._columnDefinitions}get _gridOptions(){return this._grid?.getOptions()??{}}init(e,a,u,i){this._grid=u,this.options=e||{datasetName:""},this.pagination=a,this._datasetIdPropName=this._gridOptions.datasetIdPropertyName||"id","function"==typeof u?.getColumns&&(this._columnDefinitions=i?.allColumns??u.getColumns()??[])}buildQuery(){if(!this.options||!this.options.datasetName||!Array.isArray(this._columnDefinitions))throw new Error('GraphQL Service requires the "datasetName" property to properly build the GraphQL query');let e=this._columnDefinitions||[];e=e.filter(g=>!g.excludeFromQuery);const a=new Wh(`query ${this.options.operationName??""}`),u=new Wh(this.options.datasetName),i=new Wh("nodes"),r=[];if(Array.isArray(e))for(const g of e)g.excludeFieldFromQuery||r.push(g.field),g.fields&&r.push(...g.fields);-1===r.indexOf(this._datasetIdPropName)&&r.unshift(this._datasetIdPropName);const o=this.buildFilterQuery(r);let d=[];if(!1!==this._gridOptions.enablePagination||this.options.infiniteScroll){if(this.options.useCursor){const g=new Wh("edges"),v=new Wh("pageInfo");v.find("hasNextPage","hasPreviousPage","endCursor","startCursor"),i.find(o),g.find(["cursor"]),d=["totalCount",i,v,g]}else i.find(o),d=["totalCount",i];u.find(d)}else u.find(o);let h={};if(!1!==this._gridOptions.enablePagination||this.options.infiniteScroll)if(h={},this.options.useCursor&&this.options.paginationOptions)h={...this.options.paginationOptions};else{const g=this.options?.paginationOptions;h.first=this.options?.infiniteScroll?.fetchSize??this.options?.paginationOptions?.first??this.pagination?.pageSize??this.defaultPaginationOptions.first,h.offset=g?.hasOwnProperty("offset")?+g.offset:0}if(this.options.sortingOptions&&Array.isArray(this.options.sortingOptions)&&this.options.sortingOptions.length>0&&(h.orderBy=this.options.sortingOptions),this.options.filteringOptions&&Array.isArray(this.options.filteringOptions)&&this.options.filteringOptions.length>0&&(h.filterBy=this.options.filteringOptions),this.options.addLocaleIntoQuery&&(h.locale=this._gridOptions.translater?.getCurrentLanguage()||this._gridOptions.locale||"en"),this.options.extraQueryArguments)for(const g of this.options.extraQueryArguments)h[g.field]=g.value;u.filter(h),a.find(u);return this.trimDoubleQuotesOnEnumField(a.toString(),["direction:","field:","operator:"],this.options.keepArgumentFieldDoubleQuotes||!1)}postProcess(e){e.data&&this.pagination&&(this.pagination.totalItems=e.data[this.getDatasetName()]?.totalCount||0)}buildFilterQuery(e){const a=(i={},r)=>{const o=r.shift();return i[o]=r.length?a(i[o]??{},r):null,i},u=e.reduce((i,r)=>a(i,r.split(".")),{});return JSON.stringify(u).replace(/"|:|null/g,"").replace(/^\{/,"").replace(/\}$/,"")}clearFilters(){this._currentFilters=[],this.updateOptions({filteringOptions:[]})}clearSorters(){this._currentSorters=[],this.updateOptions({sortingOptions:[]})}getInitPaginationOptions(){const e=this.options?.infiniteScroll?.fetchSize??this.pagination?.pageSize??25;return this.options?.useCursor?{first:e}:{first:e,offset:0}}getDatasetName(){return this.options?.datasetName||""}getCurrentFilters(){return this._currentFilters}getCurrentPagination(){return this._currentPagination}getCurrentSorters(){return this._currentSorters}resetPaginationOptions(){let e;this.options?.useCursor?e=this.getInitPaginationOptions():(e=this.options&&this.options.paginationOptions||this.getInitPaginationOptions(),e.offset=0),this._currentPagination={pageNumber:1,pageSize:e.first||20},this._gridOptions&&(this._gridOptions.enablePagination||!this._gridOptions.hasOwnProperty("enablePagination")||this.options?.infiniteScroll)&&this.updateOptions({paginationOptions:e})}updateOptions(e){this.options={...this.options,...e}}processOnFilterChanged(e,a){if(void 0===this._gridOptions.backendServiceApi)throw new Error('Something went wrong in the GraphqlService, "backendServiceApi" is not initialized');if(this._currentFilters=this.castFilterToColumnFilters(a.columnFilters),!a||!a.grid)throw new Error('Something went wrong when trying create the GraphQL Backend Service, it seems that "args" is not populated correctly');return this.updateFilters(a.columnFilters,!1),this.resetPaginationOptions(),this.buildQuery()}processOnPaginationChanged(e,a){const u=+(this.options?.infiniteScroll?.fetchSize||a.pageSize||(this.pagination?this.pagination.pageSize:20));return"first"in a||"last"in a?this.updatePagination(a.newPage,u,a):this.updatePagination(a.newPage,u),this.buildQuery()}processOnSortChanged(e,a){const u=a.multiColumnSort?a.sortCols:new Array({columnId:a.sortCol?.id??"",sortCol:a.sortCol,sortAsc:a.sortAsc});return this.updateSorters(u),this.options?.infiniteScroll&&this.updateOptions({paginationOptions:{offset:0}}),this.buildQuery()}updateFilters(e,a){const u=[];let i;a&&(this._currentFilters=this.castFilterToColumnFilters(e));for(const r in e)if(e.hasOwnProperty(r)){const o=e[r];let d;if(d=a&&Array.isArray(this._columnDefinitions)?this._columnDefinitions.find(M=>M.id===o.columnId):o.columnDef,!d)throw new Error("[GraphQL Service]: Something went wrong in trying to get the column definition of the specified filter (or preset filters). Did you make a typo on the filter columnId?");let h=d.filter?.queryField||d.queryFieldFilter||d.queryField||d.field||d.name||"";h instanceof HTMLElement&&(h=Tu(h.innerHTML));const m=d.type||w.string;let g=o?.searchTerms??[],v=Array.isArray(g)&&1===g.length?g[0]:"";if(typeof v>"u"&&(v=""),!h)throw new Error('GraphQL filter could not find the field name to query the search, your column definition must include a valid "field" or "name" (optionally you can also use the "queryfield").');if(this.options?.useVerbatimSearchTerms||o.verbatimSearchTerms){u.push({field:ui(h),operator:o.operator,value:JSON.stringify(o.searchTerms)});continue}v=null==v?"":`${v}`;const x=!1!==(d.autoParseInputFilterOperator??this._gridOptions.autoParseInputFilterOperator)?v.match(/^((.*[^\\*\r\n])[*]{1}(.*[^*\r\n]))|^([<>!=*]{0,2})(.*[^<>!=*])([*]?)$/)||[]:[v,"","","","",v,""],D=x?.[2]||"",C=x?.[3]||"";let F=o.operator||x?.[4];i=x?.[1]||x?.[5]||"";const A=x?.[6]||"*z"===F||F===te.endsWith?"*":"";if(h&&""===i&&0===g.length)continue;let z;if("function"==typeof this.options?.filterQueryOverride&&(z=this.options?.filterQueryOverride({fieldName:ui(h),columnDef:d,operator:F,columnFilterOperator:o.operator,searchValues:g,grid:this._grid})),void 0!==z)u.push(z);else{if(D&&C?(g=[D,C],F=te.startsWithEndsWith):Array.isArray(g)&&1===g.length&&"string"==typeof g[0]&&g[0].indexOf("..")>=0&&(F!==te.rangeInclusive&&F!==te.rangeExclusive&&(F=this._gridOptions.defaultFilterRangeOperator??te.rangeInclusive),g=g[0].split("..",2),""===g[0]?(F=F===te.rangeInclusive?"<=":F===te.rangeExclusive?"<":F,g=g.slice(1),i=g[0]):""===g[1]&&(F=F===te.rangeInclusive?">=":F===te.rangeExclusive?">":F,g=g.slice(0,1),i=g[0])),"string"==typeof i&&("*"===F||"a*"===F||"*z"===F||"*"===A)&&(F="*"===F||"*z"===F?"EndsWith":"StartsWith"),!F&&d.filter&&d.filter.operator&&(F=d.filter.operator),!F&&Array.isArray(g)&&2===g.length&&g[0]&&g[1]&&(F=this._gridOptions.defaultFilterRangeOperator),(F===te.rangeInclusive||F===te.rangeExclusive)&&Array.isArray(g)&&1===g.length&&m===w.date&&(F=te.equal),i=this.normalizeSearchValue(m,i),Array.isArray(g)&&g.forEach((M,L)=>{g[L]=this.normalizeSearchValue(m,g[L])}),F===te.startsWithEndsWith&&Array.isArray(g)&&2===g.length){u.push({field:ui(h),operator:te.startsWith,value:D}),u.push({field:ui(h),operator:te.endsWith,value:C});continue}if(g?.length>1&&("IN"===F||"NIN"===F||"NOT_IN"===F))i=g.join(",");else if(2===g?.length&&(F===te.rangeExclusive||F===te.rangeInclusive)){u.push({field:ui(h),operator:F===te.rangeInclusive?"GE":"GT",value:g[0]}),u.push({field:ui(h),operator:F===te.rangeInclusive?"LE":"LT",value:g[1]});continue}F||(F=R2(m)),u.push({field:ui(h),operator:MG(F),value:i})}}this.updateOptions({filteringOptions:u})}updatePagination(e,a,u){this._currentPagination={pageNumber:e,pageSize:a};let i={};if(this.options?.useCursor)if(u&&u instanceof Object){const{pageSize:r,newPage:o,...d}=u;i=d}else i={first:a};else i={first:a,offset:e>1?(e-1)*a:0};this.updateOptions({paginationOptions:i})}updateSorters(e,a){let u=[];const i=[];if(!e&&a){u=a,u.forEach(o=>o.direction=o.direction.toUpperCase());const r=u.map(o=>{const d=this._columnDefinitions?.find(h=>h.id===o.columnId);return i.push({field:d?(d.queryFieldSorter||d.queryField||d.field)+"":o.columnId+"",direction:o.direction}),d?{columnId:o.columnId,sortAsc:o.direction.toUpperCase()===xi.ASC}:null});Array.isArray(r)&&this._grid&&this._grid.setSortColumns(r.filter(o=>o)||[])}else if(e&&!a&&Array.isArray(e)&&e.length>0)for(const r of e)if(r&&r.sortCol){u.push({columnId:r.sortCol.id+"",direction:r.sortAsc?xi.ASC:xi.DESC});const o=(r.sortCol.queryFieldSorter||r.sortCol.queryField||r.sortCol.field||"")+"";o&&i.push({field:o,direction:r.sortAsc?xi.ASC:xi.DESC})}this._currentSorters=u,this.updateOptions({sortingOptions:i})}trimDoubleQuotesOnEnumField(e,a,u){const i='s?((field:s*)?".*?")';let r=a.join(i+"|");r+=i;const o=new RegExp(r,"g");return e.replace(o,d=>{let h=!0;return d.startsWith("field:")&&u&&(h=!1),h?d.replace(/"/g,""):d})}castFilterToColumnFilters(e){const a="object"==typeof e?Object.keys(e).map(u=>e[u]):e;return Array.isArray(a)?a.map(u=>{const i={columnId:u.columnId||""};return u.operator&&(i.operator=u.operator),u.targetSelector&&(i.targetSelector=u.targetSelector),Array.isArray(u.searchTerms)&&(i.searchTerms=u.searchTerms),i}):[]}normalizeSearchValue(e,a){switch(e){case w.date:case w.string:case w.text:case w.readonly:"string"==typeof a&&(a=a.replace(/'/g,"''"));break;case w.integer:case w.number:case w.float:"string"==typeof a&&((""===(a=(a=(a=(a=(a=a.replace(/\.\./g,".")).replace(/\.+$/g,"")).replace(/^\.+/g,"0.")).replace(/^-+\.+/g,"-0.")).replace(/(?!^-)[^\d.]/g,""))||"-"===a)&&(a="0"))}return a}}const XT="users",oJ="gridStateGraphql";let F9=class{constructor(e,a){this.cd=e,this.translate=a,this.title="Example 6: Grid connected to Backend Server with GraphQL",this.subTitle='\n Sorting/Paging connected to a Backend GraphQL Service (Wiki docs).\n
\n
    \n
  • (*) NO DATA SHOWING - just change Filters & Pages and look at the "GraphQL Query" changing :)
  • \n
  • This example also demos the Grid State feature, open the console log to see the changes
  • \n
  • String column also support operator (>, >=, <, <=, <>, !=, =, ==, *)\n
      \n
    • The (*) can be used as startsWith (ex.: "abc*" => startsWith "abc") / endsWith (ex.: "*xyz" => endsWith "xyz")
    • \n
    • The other operators can be used on column type number for example: ">=100" (bigger or equal than 100)
    • \n
    \n
  • You can also preload a grid with certain "presets" like Filters / Sorters / Pagination Wiki - Grid Preset
  • \n
  • Also note that the column Name has a filter with a custom %% operator that behaves like an SQL LIKE operator supporting % wildcards.
  • \n
  • Depending on your configuration, your GraphQL Server might already support regex querying (e.g. Hasura _regex)\n or you could add your own implementation (e.g. see this SO Question).
  • \n
\n ',this.subscriptions=[],this.dataset=[],this.isWithCursor=!1,this.graphqlQuery="",this.processing=!0,this.status={text:"processing...",class:"alert alert-danger"},this.serverWaitDelay=250;this.translate.use("en"),this.selectedLanguage="en"}ngOnDestroy(){rd(this.subscriptions)}ngOnInit(){this.columnDefinitions=[{id:"name",field:"name",nameKey:"NAME",width:60,columnGroupKey:"CUSTOMER_INFORMATION",type:w.string,sortable:!0,filterable:!0,filter:{model:ie.compoundInput,compoundOperatorList:[{operator:"",desc:"Contains"},{operator:"<>",desc:"Not Contains"},{operator:"=",desc:"Equals"},{operator:"!=",desc:"Not equal to"},{operator:"a*",desc:"Starts With"},{operator:"Custom",desc:"SQL Like"}]}},{id:"gender",field:"gender",nameKey:"GENDER",filterable:!0,sortable:!0,width:60,columnGroupKey:"CUSTOMER_INFORMATION",filter:{model:ie.singleSelect,collection:[{value:"",label:""},{value:"male",label:"male",labelKey:"MALE"},{value:"female",label:"female",labelKey:"FEMALE"}]}},{id:"company",field:"company",nameKey:"COMPANY",width:60,columnGroupKey:"CUSTOMER_INFORMATION",sortable:!0,filterable:!0,filter:{model:ie.multipleSelect,collection:[{value:"acme",label:"Acme"},{value:"abc",label:"Company ABC"},{value:"xyz",label:"Company XYZ"}],filterOptions:{filter:!0}}},{id:"billingAddressStreet",field:"billing.address.street",nameKey:"BILLING.ADDRESS.STREET",width:60,filterable:!0,sortable:!0,columnGroupKey:"BILLING.INFORMATION"},{id:"billingAddressZip",field:"billing.address.zip",nameKey:"BILLING.ADDRESS.ZIP",width:60,type:w.number,columnGroupKey:"BILLING.INFORMATION",filterable:!0,sortable:!0,filter:{model:ie.compoundInput},formatter:j.multiple,params:{formatters:[j.complexObject,j.translate]}},{id:"finish",field:"finish",name:"Date",formatter:j.dateIso,sortable:!0,minWidth:90,width:120,exportWithFormatter:!0,type:w.date,columnGroupKey:"BILLING.INFORMATION",filterable:!0,filter:{model:ie.dateRange,filterShortcuts:[{titleKey:"NEXT_20_DAYS",iconCssClass:"mdi mdi-calendar",searchTerms:[Pi(new Date,"YYYY-MM-DD"),Pi(K2(new Date,20),"YYYY-MM-DD")]}]}}];const e=(new Date).getFullYear(),a=`${e}-01-01`,u=`${e}-02-15`;this.gridOptions={gridHeight:200,gridWidth:900,compoundOperatorAltTexts:{text:{Custom:{operatorAlt:"%%",descAlt:"SQL Like"}}},enableFiltering:!0,enableCellNavigation:!0,enableTranslate:!0,createPreHeaderPanel:!0,showPreHeaderPanel:!0,preHeaderPanelHeight:28,i18n:this.translate,gridMenu:{resizeOnShowHeaderRow:!0,commandItems:[{iconCssClass:"mdi mdi-close text-danger",title:"Reset Grid",disabled:!1,command:"reset-grid",positionOrder:60}],onCommand:(i,r)=>{"reset-grid"===r.command&&(this.angularGrid.gridService.resetGrid(this.columnDefinitions),localStorage[oJ]=null)}},enablePagination:!0,pagination:{pageSizes:[10,15,20,25,30,40,50,75,100],pageSize:20,totalItems:0},presets:{columns:[{columnId:"name",width:100},{columnId:"gender",width:55},{columnId:"company"},{columnId:"billingAddressZip"},{columnId:"billingAddressStreet",width:120},{columnId:"finish",width:130}],filters:[{columnId:"gender",searchTerms:["male"],operator:te.equal},{columnId:"name",searchTerms:["Joh*oe"],operator:te.startsWithEndsWith},{columnId:"company",searchTerms:["xyz"],operator:"IN"},{columnId:"finish",searchTerms:[a,u],operator:te.rangeInclusive}],sorters:[{columnId:"name",direction:"asc"},{columnId:"company",direction:xi.DESC}],pagination:{pageNumber:this.isWithCursor?1:2,pageSize:20}},backendServiceApi:{service:new QT,options:{datasetName:XT,addLocaleIntoQuery:!0,extraQueryArguments:[{field:"userId",value:123}],filterQueryOverride:({fieldName:i,columnDef:r,columnFilterOperator:o,searchValues:d})=>{if(o===te.custom&&"name"===r?.id)return{field:i,operator:"Like",value:d[0]}},useCursor:this.isWithCursor,keepArgumentFieldDoubleQuotes:!0},preProcess:()=>this.displaySpinner(!0),process:i=>this.getCustomerApiCall(i),postProcess:i=>{this.metrics=i.metrics,this.displaySpinner(!1),this.cd.detectChanges()}}}}angularGridReady(e){this.angularGrid=e}displaySpinner(e){this.processing=e,this.status=e?{text:"processing...",class:"alert alert-danger"}:{text:"finished",class:"alert alert-success"}}getCustomerApiCall(e){let a;if(this.angularGrid?.paginationService){const{paginationService:i}=this.angularGrid,r=i._initialized?i.getCurrentPageNumber():1,o=String.fromCharCode(65+r-1),d=String.fromCharCode(o.charCodeAt(0)+1);a={hasPreviousPage:0===i.dataFrom,hasNextPage:100===i.dataTo,startCursor:o,endCursor:d}}else a={hasPreviousPage:!1,hasNextPage:!0,startCursor:"A",endCursor:"B"};const u={data:{[XT]:{nodes:[],totalCount:100,pageInfo:a}}};return new Promise(i=>{setTimeout(()=>{this.graphqlQuery=this.angularGrid.backendService.buildQuery(),this.isWithCursor&&this.angularGrid?.paginationService?.setCursorPageInfo(u.data[XT].pageInfo),i(u)},this.serverWaitDelay)})}goToFirstPage(){this.angularGrid.paginationService.goToFirstPage()}goToLastPage(){this.angularGrid.paginationService.goToLastPage()}gridStateChanged(e){console.log("GraphQL Example, Grid State changed:: ",e),localStorage[oJ]=JSON.stringify(e.gridState)}clearAllFiltersAndSorts(){this.angularGrid?.gridService&&this.angularGrid.gridService.clearAllFiltersAndSorts()}saveCurrentGridState(){console.log("GraphQL current grid state",this.angularGrid.gridStateService.getCurrentGridState())}setFiltersDynamically(){const e=(new Date).getFullYear(),a=`${e}-01-01`,u=`${e}-02-15`;this.angularGrid.filterService.updateFilters([{columnId:"gender",searchTerms:["female"],operator:te.equal},{columnId:"name",searchTerms:["Jane"],operator:te.startsWith},{columnId:"company",searchTerms:["acme"],operator:"IN"},{columnId:"billingAddressZip",searchTerms:["11"],operator:te.greaterThanOrEqual},{columnId:"finish",searchTerms:[a,u],operator:te.rangeInclusive}])}setSortingDynamically(){this.angularGrid.sortService.updateSorting([{columnId:"billingAddressZip",direction:"DESC"},{columnId:"company",direction:"ASC"}])}resetToOriginalPresets(){const e=(new Date).getFullYear(),a=`${e}-01-01`,u=`${e}-02-15`;this.angularGrid.filterService.updateFilters([{columnId:"gender",searchTerms:["male"],operator:te.equal},{columnId:"name",searchTerms:["Joh*oe"],operator:te.startsWithEndsWith},{columnId:"company",searchTerms:["xyz"],operator:"IN"},{columnId:"finish",searchTerms:[a,u],operator:te.rangeInclusive}]),this.angularGrid.sortService.updateSorting([{columnId:"name",direction:"asc"},{columnId:"company",direction:xi.DESC}]),setTimeout(()=>{this.angularGrid.paginationService?.changeItemPerPage(20),this.angularGrid.paginationService?.goToPageNumber(2)})}setIsWithCursor(e){return this.isWithCursor=e,this.resetOptions({useCursor:this.isWithCursor}),!0}resetOptions(e){this.displaySpinner(!0);const a=this.gridOptions.backendServiceApi.service;this.angularGrid.paginationService.setCursorBased(e.useCursor),a.updateOptions(e),this.gridOptions={...this.gridOptions},this.angularGrid.paginationService?.goToFirstPage()}switchLanguage(){const e="en"===this.selectedLanguage?"fr":"en";this.subscriptions.push(this.translate.use(e).subscribe(()=>{this.selectedLanguage=e}))}static#e=this.ctorParameters=()=>[{type:Xu},{type:at}]};F9=Ze([ca({template:'
\n

\n {{title}}\n \n \n code\n \n \n

\n
\n\n
\n
\n
\n Status: {{status.text}}\n \n \n \n
\n\n
\n
\n \n \n \n \n \n \n
\n
\n
\n
\n \n Locale:\n \n {{selectedLanguage + \'.json\'}}\n \n
\n\n \n \n \n \n
\n
\n
\n Metrics: {{metrics.endTime | date: \'yyyy-MM-dd hh:mm aaaaa\\\'m\\\'\'}} | {{metrics.executionTime}}ms\n | {{metrics.totalItemCount}} items\n
\n
\n
\n \n
\n \n \n
\n
\n
\n
\n\n
\n
\n GraphQL Query:\n
\n
\n
\n
\n\n
\n \n \n
'}),Ct("design:paramtypes",[Xu,at])],F9);var z3e=O(134),M3e=O.n(z3e);const eP="https://countries.trevorblades.com/";let A9=class{constructor(e){this.http=e,this.title="Example 27: GraphQL Basic API without Pagination",this.subTitle='\n Use basic GraphQL query with any external public APIs (Wiki docs).\n
    \n
  • This Examples uses a Public GraphQL API that you can find at this link https://countries.trevorblades.com/
  • \n
  • Compare to the regular and default GraphQL implementation, you will find the following differences
  • \n
      \n
    • There are no Pagination and we only use GraphQL once to load the data, then we use the grid as a regular local in-memory grid
    • \n
    • We enabled the following 2 flags "useLocalFiltering" and "useLocalSorting" to use regular (in memory) DataView filtering/sorting
    • \n
    \n
  • NOTE - This Example calls multiple GraphQL queries, this is ONLY for demo purposes, you would typically only call 1 query (which is what GraphQL is good at)
  • \n
  • This example is mainly to demo the use of GraphqlService to build the query and retrieve the data but also to demo how to mix that with local (in-memory) Filtering/Sorting strategies
  • \n
\n ',this.dataset=[],this.graphqlQuery="",this.processing=!0,this.status={text:"processing...",class:"alert alert-danger"},this.isDataLoaded=!1}ngOnInit(){this.columnDefinitions=[{id:"countryCode",field:"code",name:"Code",maxWidth:90,sortable:!0,filterable:!0,columnGroup:"Country"},{id:"countryName",field:"name",name:"Name",width:60,sortable:!0,filterable:!0,columnGroup:"Country"},{id:"countryNative",field:"native",name:"Native",width:60,sortable:!0,filterable:!0,columnGroup:"Country"},{id:"countryPhone",field:"phone",name:"Phone Area Code",maxWidth:110,sortable:!0,filterable:!0,columnGroup:"Country"},{id:"countryCurrency",field:"currency",name:"Currency",maxWidth:90,sortable:!0,filterable:!0,columnGroup:"Country"},{id:"countryEmoji",field:"emoji",name:"Emoji",maxWidth:90,sortable:!0,columnGroup:"Country"},{id:"languageName",field:"languages.name",name:"Names",width:60,formatter:j.arrayObjectToCsv,columnGroup:"Language",params:{propertyNames:["name"],useFormatterOuputToFilter:!0},filterable:!0,filter:{model:ie.multipleSelect,collectionAsync:this.getLanguages(),operator:te.inContains,collectionOptions:{addBlankEntry:!0,collectionInsideObjectProperty:"data.languages"},collectionFilterBy:[{property:"name",value:"",operator:"NE"},{property:"name",value:null,operator:"NE"}],collectionSortBy:{property:"name"},customStructure:{value:"name",label:"name"},filterOptions:{filter:!0}}},{id:"languageNative",field:"languages.native",name:"Native",width:60,formatter:j.arrayObjectToCsv,params:{propertyNames:["native"],useFormatterOuputToFilter:!0},columnGroup:"Language",filterable:!0,filter:{model:ie.multipleSelect,collectionAsync:this.getLanguages(),operator:te.inContains,collectionOptions:{addBlankEntry:!0,collectionInsideObjectProperty:"data.languages"},collectionFilterBy:[{property:"native",value:"",operator:"NE"},{property:"native",value:null,operator:"NE"}],collectionSortBy:{property:"native"},customStructure:{value:"native",label:"native"},filterOptions:{filter:!0}}},{id:"languageCode",field:"languages.code",name:"Codes",maxWidth:100,formatter:j.arrayObjectToCsv,params:{propertyNames:["code"],useFormatterOuputToFilter:!0},columnGroup:"Language",filterable:!0},{id:"continentName",field:"continent.name",name:"Name",width:60,sortable:!0,filterable:!0,formatter:j.complexObject,columnGroup:"Continent"},{id:"continentCode",field:"continent.code",name:"Code",maxWidth:90,sortable:!0,filterable:!0,filter:{model:ie.singleSelect,collectionAsync:this.getContinents(),collectionOptions:{collectionInsideObjectProperty:"data.continents",addBlankEntry:!0,separatorBetweenTextLabels:": "},customStructure:{value:"code",label:"code",labelSuffix:"name"}},formatter:j.complexObject,columnGroup:"Continent"}],this.gridOptions={autoResize:{container:"#demo-container",rightPadding:10},enableFiltering:!0,enableCellNavigation:!0,enablePagination:!1,createPreHeaderPanel:!0,showPreHeaderPanel:!0,preHeaderPanelHeight:28,datasetIdPropertyName:"code",showCustomFooter:!0,backendServiceApi:{service:new QT,useLocalFiltering:!0,useLocalSorting:!0,options:{datasetName:"countries"},preProcess:()=>this.isDataLoaded?"":this.displaySpinner(!0),process:e=>this.getCountries(e),postProcess:e=>{this.metrics=e.metrics,this.displaySpinner(!1),this.isDataLoaded=!0}}}}displaySpinner(e){this.processing=e,this.status=e?{text:"processing...",class:"alert alert-danger"}:{text:"finished",class:"alert alert-success"}}getCountries(e){return this.http.post(eP,{query:e})}getContinents(){return this.http.post(eP,{query:"query { continents { code, name }}"})}getLanguages(){return this.http.post(eP,{query:"query { languages { code, name, native }}"})}static#e=this.ctorParameters=()=>[{type:jt}]};A9=Ze([ca({template:'
\n

\n {{title}}\n \n \n code\n \n \n

\n
\n
\n
\n
\n\n
\n
\n
\n Status: {{status.text}}\n \n \n \n
\n
\n
\n\n \n \n
',encapsulation:Ga.None,styles:[M3e()]}),Ct("design:paramtypes",[jt])],A9);let w9=class{constructor(){this.title="Example 14: Grouping & Aggregators",this.subTitle='\n (Wiki docs)\n
    \n
  • \n Fully dynamic and interactive multi-level grouping with filtering and aggregates over 50\'000 items\n
  • \n
  • Each grouping level can have its own aggregates (over child rows, child groups, or all descendant rows)..
  • \n
\n ',this.processing=!1,this.excelExportService=new Ao,this.textExportService=new $T}ngOnInit(){this.initializeGrid()}initializeGrid(){const e=document.createElement("div"),a=document.createElement("button"),u=document.createElement("span");u.className="mdi mdi-help-circle no-padding",a.dataset.test="col1-hello-btn",a.className="btn btn-outline-secondary btn-xs btn-icon ms-1",a.textContent="Click me",a.title="simple column header test with a button click listener",a.addEventListener("click",()=>alert("Hello World")),a.appendChild(u),e.appendChild(document.createTextNode("Id ")),e.appendChild(a),this.columnDefinitions=[{id:"sel",name:e,field:"num",type:w.number,columnPickerLabel:"Custom Label",width:140,maxWidth:150,excludeFromExport:!0,resizable:!0,filterable:!0,selectable:!1,focusable:!1},{id:"title",name:"Title",field:"title",width:50,minWidth:50,cssClass:"cell-title",filterable:!0,sortable:!0},{id:"duration",name:"Duration",field:"duration",minWidth:50,width:60,filterable:!0,filter:{model:ie.slider,operator:">="},sortable:!0,type:w.number,groupTotalsFormatter:Wa.sumTotals,params:{groupFormatterPrefix:"Total: "}},{id:"%",name:"% Complete",field:"percentComplete",minWidth:70,width:90,formatter:j.percentCompleteBar,filterable:!0,filter:{model:ie.compoundSlider},sortable:!0,type:w.number,groupTotalsFormatter:Wa.avgTotalsPercentage,params:{groupFormatterPrefix:"Avg: "}},{id:"start",name:"Start",field:"start",minWidth:60,filterable:!0,filter:{model:ie.compoundDate},sortable:!0,type:w.dateIso,formatter:j.dateIso,exportWithFormatter:!0},{id:"finish",name:"Finish",field:"finish",minWidth:60,filterable:!0,filter:{model:ie.compoundDate},sortable:!0,type:w.dateIso,formatter:j.dateIso,exportWithFormatter:!0},{id:"cost",name:"Cost",field:"cost",minWidth:70,width:80,sortable:!0,filterable:!0,filter:{model:ie.compoundInputNumber},type:w.number,formatter:j.currency,groupTotalsFormatter:Wa.sumTotalsCurrency,params:{displayNegativeNumberWithParentheses:!0,currencyPrefix:"\u20ac",groupFormatterCurrencyPrefix:"\u20ac",minDecimal:2,maxDecimal:4,groupFormatterPrefix:"Total: "},excelExportOptions:{style:{font:{outline:!0,italic:!0},format:"\u20ac0.00##;[Red](\u20ac0.00##)"},width:18},groupTotalsExcelExportOptions:{style:{alignment:{horizontal:"center"},font:{bold:!0,color:"FF005289",underline:"single",fontName:"Consolas",size:10},fill:{type:"pattern",patternType:"solid",fgColor:"FFE6F2F6"},border:{top:{color:"FFa500ff",style:"thick"},left:{color:"FFa500ff",style:"medium"},right:{color:"FFa500ff",style:"dotted"},bottom:{color:"FFa500ff",style:"double"}},format:'"Total: "\u20ac0.00##;[Red]"Total: "(\u20ac0.00##)'}}},{id:"effort-driven",name:"Effort Driven",minWidth:20,width:80,maxWidth:80,cssClass:"cell-effort-driven",field:"effortDriven",formatter:j.checkmarkMaterial,sortable:!0,filterable:!0,filter:{collection:[{value:"",label:""},{value:!0,label:"True"},{value:!1,label:"False"}],model:ie.singleSelect}}],this.gridOptions={autoResize:{container:"#demo-container",rightPadding:10},enableExcelExport:!0,enableFiltering:!0,enableGrouping:!0,enableTextExport:!0,gridMenu:{hideExportTextDelimitedCommand:!1},excelExportOptions:{sanitizeDataExport:!0},textExportOptions:{sanitizeDataExport:!0},externalResources:[this.excelExportService,this.textExportService],showCustomFooter:!0,customFooterOptions:{hideMetrics:!1,hideTotalItemCount:!1,hideLastUpdateTimestamp:!1}},this.loadData(500)}angularGridReady(e){this.angularGrid=e,this.gridObj=e.slickGrid,this.dataviewObj=e.dataView}loadData(e){const a=[];for(let u=0;u`Duration: ${e.value} (${e.count} items)`,aggregators:[new Nt_Avg("percentComplete"),new Nt_Sum("cost")],comparer:(e,a)=>ul.numeric(e.value,a.value,Gt.asc),aggregateCollapsed:!1,lazyTotalsCalculation:!0}),this.angularGrid.filterService.setSortColumnIcons([{columnId:"duration",sortAsc:!0}]),this.gridObj.invalidate()}groupByDurationOrderByCount(e){this.angularGrid.filterService.setSortColumnIcons([]),this.dataviewObj.setGrouping({getter:"duration",formatter:a=>`Duration: ${a.value} (${a.count} items)`,comparer:(a,u)=>a.count-u.count,aggregators:[new Nt_Avg("percentComplete"),new Nt_Sum("cost")],aggregateCollapsed:e,lazyTotalsCalculation:!0}),this.gridObj.invalidate()}groupByDurationEffortDriven(){this.angularGrid.filterService.setSortColumnIcons([]),this.dataviewObj.setGrouping([{getter:"duration",formatter:e=>`Duration: ${e.value} (${e.count} items)`,aggregators:[new Nt_Sum("duration"),new Nt_Sum("cost")],aggregateCollapsed:!0,lazyTotalsCalculation:!0},{getter:"effortDriven",formatter:e=>`Effort-Driven: ${e.value?"True":"False"} (${e.count} items)`,aggregators:[new Nt_Avg("percentComplete"),new Nt_Sum("cost")],collapsed:!0,lazyTotalsCalculation:!0}]),this.gridObj.invalidate()}groupByDurationEffortDrivenPercent(){this.angularGrid.filterService.setSortColumnIcons([]),this.dataviewObj.setGrouping([{getter:"duration",formatter:e=>`Duration: ${e.value} (${e.count} items)`,aggregators:[new Nt_Sum("duration"),new Nt_Sum("cost")],aggregateCollapsed:!0,lazyTotalsCalculation:!0},{getter:"effortDriven",formatter:e=>`Effort-Driven: ${e.value?"True":"False"} (${e.count} items)`,aggregators:[new Nt_Sum("duration"),new Nt_Sum("cost")],lazyTotalsCalculation:!0},{getter:"percentComplete",formatter:e=>`% Complete: ${e.value} (${e.count} items)`,aggregators:[new Nt_Avg("percentComplete")],aggregateCollapsed:!0,collapsed:!0,lazyTotalsCalculation:!0}]),this.gridObj.invalidate()}};w9=Ze([ca({template:'
\n

\n {{title}}\n \n \n code\n \n \n

\n
\n\n
\n
\n \n \n \n \n \n \n
\n
\n
\n
\n
\n \n \n
\n
\n
\n
\n \n \n \n \n \n \n
\n
\n\n \n \n
'})],w9);var T3e=O(158),P3e=O.n(T3e);const lJ="assets/data",B9="users";function aP(t){return t.replace(/^"/,"").replace(/"$/,"").toLowerCase()}let S9=class{constructor(e,a,u){this.cd=e,this.http=a,this.translate=u,this._darkMode=!1,this.subscriptions=[],this.dataset=[],this.tagDataClass="",this.graphqlQuery="...",this.processing=!1,this.status={text:"processing...",class:"alert alert-danger"},this.serverWaitDelay=250,this.backendService=new QT;this.translate.use("en"),this.selectedLanguage="en"}ngOnDestroy(){rd(this.subscriptions)}ngOnInit(){this.initializeGrid()}angularGridReady(e){this.angularGrid=e}initializeGrid(){this.columnDefinitions=[{id:"name",field:"name",nameKey:"NAME",width:60,type:w.string,sortable:!0,filterable:!0,filter:{model:ie.compoundInput}},{id:"gender",field:"gender",nameKey:"GENDER",filterable:!0,sortable:!0,width:60,filter:{model:ie.singleSelect,collection:[{value:"",label:""},{value:"male",labelKey:"MALE"},{value:"female",labelKey:"FEMALE"}]}},{id:"company",field:"company",nameKey:"COMPANY",width:60,sortable:!0,filterable:!0,filter:{model:ie.multipleSelect,customStructure:{label:"company",value:"company"},collectionSortBy:{property:"company",sortDesc:!1},collectionAsync:this.http.get(`${lJ}/customers_100.json`),filterOptions:{filter:!0}}}],this.gridOptions={enableAutoResize:!0,autoResize:{container:"#demo-container",rightPadding:10},enableAutoTooltip:!0,autoTooltipOptions:{enableForHeaderCells:!0},enableTranslate:!0,i18n:this.translate,enableFiltering:!0,enableCellNavigation:!0,multiColumnSort:!1,gridMenu:{resizeOnShowHeaderRow:!0},backendServiceApi:{disableInternalPostProcess:!0,service:this.backendService,options:{datasetName:B9,addLocaleIntoQuery:!0,extraQueryArguments:[{field:"userId",value:123}],infiniteScroll:{fetchSize:30}},preProcess:()=>this.displaySpinner(!0),process:e=>this.getCustomerApiCall(e),postProcess:e=>{this.metrics={endTime:new Date,totalItemCount:e.data[B9].totalCount||0},this.displaySpinner(!1),this.getCustomerCallback(e),this.cd.detectChanges()}}}}clearAllFiltersAndSorts(){this.angularGrid?.gridService&&this.angularGrid.gridService.clearAllFiltersAndSorts()}displaySpinner(e){this.processing=e,this.status=e?{text:"processing...",class:"alert alert-danger"}:{text:"finished",class:"alert alert-success"}}getCustomerCallback(e){const{nodes:a,totalCount:u}=e.data[B9];this.angularGrid&&(this.metrics.totalItemCount=u,e.infiniteScrollBottomHit?this.angularGrid.dataView?.addItems(a):(this.angularGrid.slickGrid?.scrollTo(0),this.dataset=a,this.metrics.itemCount=a.length))}getCustomerApiCall(e){return this.getCustomerDataApiMock(e)}getCustomerDataApiMock(e){return new Promise(a=>{let u=0,i=0,r="",o="";this.http.get(`${lJ}/customers_100.json`).subscribe(d=>{let h=d;if(e.includes("first:")&&(u=+(e.match(/first:([0-9]+),/)||[])[1]),e.includes("offset:")&&(i=+(e.match(/offset:([0-9]+),/)||[])[1]),e.includes("orderBy:")){const[x,D,C]=/orderBy:\[{field:([a-zA-Z/]+),direction:(ASC|DESC)}\]/gi.exec(e)||[];r=D||"",o=C||""}if(e.includes("orderBy:")){const[x,D,C]=/orderBy:\[{field:([a-zA-Z/]+),direction:(ASC|DESC)}\]/gi.exec(e)||[];r=D||"",o=C||""}if(e.includes("filterBy:")){const x=/{field:(\w+),operator:(\w+),value:([0-9a-z',"\s]*)}/gi;let D;for(;null!==(D=x.exec(e));){const C=D[1]||"",F=D[2]||"",A=D[3]||"";let[z,M]=A.split(",");C&&F&&""!==A&&(h=h.filter(L=>{const R=L[C];switch(z=aP(z),M=aP(M||""),F){case"EQ":return R.toLowerCase()===z;case"NE":return R.toLowerCase()!==z;case"LE":return R.toLowerCase()<=z;case"LT":return R.toLowerCase()z;case"GE":return R.toLowerCase()>=z;case"EndsWith":return R.toLowerCase().endsWith(z);case"StartsWith":return R.toLowerCase().startsWith(z);case"Starts+Ends":return R.toLowerCase().startsWith(z)&&R.toLowerCase().endsWith(M);case"Contains":return R.toLowerCase().includes(z);case"Not_Contains":return!R.toLowerCase().includes(z);case"IN":const G=A.toLocaleLowerCase().split(",");for(const $ of G)if(R.toLocaleLowerCase()===aP($))return!0}}))}}let m=i;m>h.length&&(e=e.replace(`offset:${m}`,""),m=0);const g=x=>r?x[r]:x;switch(o.toUpperCase()){case"ASC":h=h.sort((x,D)=>g(x).localeCompare(g(D)));break;case"DESC":h=h.sort((x,D)=>g(D).localeCompare(g(x)))}const v=h.slice(m,m+u),k={data:{[B9]:{nodes:v,totalCount:h.length}}};setTimeout(()=>{this.graphqlQuery=this.gridOptions.backendServiceApi.service.buildQuery(),a(k)},this.serverWaitDelay)})})}refreshMetrics(e){e?.current>=0&&(this.metrics.itemCount=this.angularGrid.dataView?.getFilteredItemCount()||0,this.tagDataClass=this.metrics.itemCount===this.metrics.totalItemCount?"fully-loaded":"partial-load")}switchLanguage(){const e="en"===this.selectedLanguage?"fr":"en";this.subscriptions.push(this.translate.use(e).subscribe(()=>{this.selectedLanguage=e})),this.getCustomerApiCall(this.backendService.buildQuery()||"")}toggleDarkMode(){this._darkMode=!this._darkMode,this.toggleBodyBackground(),this.angularGrid.slickGrid?.setOptions({darkMode:this._darkMode})}toggleBodyBackground(){this._darkMode?(document.querySelector(".panel-wm-content").classList.add("dark-mode"),document.querySelector("#demo-container").dataset.bsTheme="dark"):(document.querySelector(".panel-wm-content").classList.remove("dark-mode"),document.querySelector("#demo-container").dataset.bsTheme="light")}static#e=this.ctorParameters=()=>[{type:Xu},{type:jt},{type:at}]};S9=Ze([ca({encapsulation:Ga.None,template:'
\n

\n Example 39: GraphQL Backend Service with Infinite Scroll\n \n \n code\n \n \n

\n\n
\n
    \n
  • \n Infinite scrolling allows the grid to lazy-load rows from the server when reaching the scroll bottom (end) position.\n In its simplest form, the more the user scrolls down, the more rows get loaded.\n If we reached the end of the dataset and there is no more data to load, then we\'ll assume to have the entire dataset loaded in memory.\n This contrast with the regular Pagination approach which will hold only hold data for 1 page at a time.\n
  • \n
  • NOTES
  • \n
      \n
    1. \n presets.pagination is not supported with Infinite Scroll and will revert to the first page,\n simply because since we keep appending data, we always have to start from index zero (no offset).\n
    2. \n
    3. \n Pagination is not shown BUT in fact, that is what is being used behind the scene whenever reaching the scroll end (fetching next batch).\n
    4. \n
    5. \n Also note that whenever the user changes the Sort(s)/Filter(s) it will always reset and go back to zero index (first page).\n
    6. \n
    \n
\n
\n\n
\n
\n
\n Status: {{status.text}}\n \n \n \n
\n\n
\n
\n \n \n \n
\n
\n
\n
\n \n Locale:\n \n {{selectedLanguage + \'.json\'}}\n \n
\n
\n
\n
\n Metrics:\n \n {{metrics.endTime | date: \'dd MMM, h:mm:ssa\'}} \u2014\n {{metrics.itemCount}}\n of\n {{metrics.totalItemCount}}\n items\n \n All Data Loaded!!!\n
\n
\n\n
\n
\n GraphQL Query:\n
\n
\n
\n
\n\n \n \n
',styles:[P3e()]}),Ct("design:paramtypes",[Xu,jt,at])],S9);let z9=class{constructor(){this.dataset=[],this.scrollEndCalled=!1,this.shouldResetOnSort=!1}ngOnInit(){this.defineGrid(),this.dataset=this.loadData(0,50),this.metrics={itemCount:50,totalItemCount:50}}angularGridReady(e){this.angularGrid=e}defineGrid(){this.columnDefinitions=[{id:"title",name:"Title",field:"title",sortable:!0,minWidth:100,filterable:!0},{id:"duration",name:"Duration (days)",field:"duration",sortable:!0,minWidth:100,filterable:!0,type:w.number},{id:"percentComplete",name:"% Complete",field:"percentComplete",sortable:!0,minWidth:100,filterable:!0,type:w.number},{id:"start",name:"Start",field:"start",formatter:j.dateIso,exportWithFormatter:!0,filterable:!0},{id:"finish",name:"Finish",field:"finish",formatter:j.dateIso,exportWithFormatter:!0,filterable:!0},{id:"effort-driven",name:"Effort Driven",field:"effortDriven",sortable:!0,minWidth:100,filterable:!0,formatter:j.checkmarkMaterial}],this.gridOptions={autoResize:{container:"#demo-container",rightPadding:10},enableAutoResize:!0,enableFiltering:!0,enableGrouping:!0,editable:!1,rowHeight:33}}handleOnScroll(e){const a=e.grid.getViewportNode();if(["mousewheel","scroll"].includes(e.triggeredBy||"")&&!this.scrollEndCalled&&a.scrollTop>0&&Math.ceil(a.offsetHeight+e.scrollTop)>=e.scrollHeight){console.log("onScroll end reached, add more items");const u=this.angularGrid.dataView?.getItemCount()||0,i=this.loadData(u,50);this.angularGrid.dataView?.addItems(i),this.scrollEndCalled=!1}}handleOnSort(){if(this.shouldResetOnSort){const e=this.loadData(0,50);this.angularGrid.slickGrid?.scrollTo(0),this.angularGrid.dataView?.setItems(e),this.angularGrid.dataView?.reSort()}}groupByDuration(){this.angularGrid?.dataView?.setGrouping({getter:"duration",formatter:e=>`Duration: ${e.value} (${e.count} items)`,comparer:(e,a)=>ul.numeric(e.value,a.value,Gt.asc),aggregators:[new Nt_Avg("percentComplete"),new Nt_Sum("cost")],aggregateCollapsed:!1,lazyTotalsCalculation:!0}),this.angularGrid?.slickGrid?.setSortColumns([{columnId:"duration",sortAsc:!0}]),this.angularGrid?.slickGrid?.invalidate()}loadData(e,a){const u=[];for(let i=e;i="}])}refreshMetrics(e){this.angularGrid&&e?.current>=0&&(this.metrics.itemCount=this.angularGrid.dataView?.getFilteredItemCount()||0,this.metrics.totalItemCount=e.itemCount||0)}setSortingDynamically(){this.angularGrid?.sortService.updateSorting([{columnId:"title",direction:"DESC"}])}};z9=Ze([ca({template:'
\n

\n Example 40: Infinite Scroll from JSON data\n \n \n code\n \n \n

\n\n
\n
    \n
  • \n Infinite scrolling allows the grid to lazy-load rows from the server when reaching the scroll bottom (end) position.\n In its simplest form, the more the user scrolls down, the more rows get loaded.\n
  • \n
  • NOTES: presets.pagination is not supported with Infinite Scroll and will revert to the first page,\n simply because since we keep appending data, we always have to start from index zero (no offset).\n
  • \n
\n
\n\n
\n
\n \n \n \n \n\n \n \n \n
\n
\n\n
\n Metrics:\n \n {{metrics.endTime | date: \'dd MMM, h:mm:ssa\'}} \u2014\n {{metrics.totalItemCount}}\n items\n \n
\n\n \n \n
'})],z9);var H3e=O(454),V3e=O.n(H3e);class j3e{set columnDefinitions(e){this._columnDefinitions=e}set datasetIdPropName(e){this._datasetIdPropName=e}constructor(){this._filterCount=0,this._columnDefinitions=[],this._datasetIdPropName="id",this._odataOptions={filterQueue:[],orderBy:""},this._defaultSortBy="",this._columnFilters={}}buildQuery(){if(!this._odataOptions)throw new Error('Odata Service requires certain options like "top" for it to work');this._odataOptions.filterQueue=[];const e=[];if(this._odataOptions&&!0===this._odataOptions.enableCount){const a=this._odataOptions.version&&this._odataOptions.version>=4?"$count=true":"$inlinecount=allpages";e.push(a)}if(this._odataOptions.top&&e.push(`$top=${this._odataOptions.top}`),this._odataOptions.skip&&e.push(`$skip=${this._odataOptions.skip}`),this._odataOptions.orderBy){let a="";a=Array.isArray(this._odataOptions.orderBy)?this._odataOptions.orderBy.join(","):this._odataOptions.orderBy,e.push(`$orderby=${a}`)}if(this._odataOptions.filterBy||this._odataOptions.filter){const a=this._odataOptions.filter||this._odataOptions.filterBy;if(a){this._filterCount=1,this._odataOptions.filterQueue=[];let u=a;Array.isArray(a)&&(this._filterCount=a.length,u=a.join(` ${this._odataOptions.filterBySeparator||"and"} `)),"string"==typeof u&&("("===u[0]&&")"===u.slice(-1)?this.addToFilterQueueWhenNotExists(u):this.addToFilterQueueWhenNotExists(`(${u})`))}}if(this._odataOptions.filterQueue.length>0){const a=this._odataOptions.filterQueue.join(` ${this._odataOptions.filterBySeparator||"and"} `);this._odataOptions.filter=a,e.push(`$filter=${a}`)}if(this._odataOptions.enableSelect||this._odataOptions.enableExpand){const a=this._columnDefinitions.flatMap(i=>i.fields??[i.field]);a.unshift(this._datasetIdPropName);const u=this.buildSelectExpand([...new Set(a)]);if(this._odataOptions.enableSelect){const i=u.selectParts.join(",");e.push(`$select=${i}`)}if(this._odataOptions.enableExpand){const i=u.expandParts.join(",");e.push(`$expand=${i}`)}}return e.join("&")}getFilterCount(){return this._filterCount}get columnFilters(){return this._columnFilters}get options(){return this._odataOptions}set options(e){this._odataOptions=e}removeColumnFilter(e){this._columnFilters&&this._columnFilters.hasOwnProperty(e)&&delete this._columnFilters[e]}saveColumnFilter(e,a,u){this._columnFilters[e]={search:u,value:a}}updateOptions(e){for(const a of Object.keys(e))if(e.hasOwnProperty(a)&&(this._odataOptions[a]=e[a]),"orderBy"===a||"sortBy"===a){let u=e[a];this._odataOptions.caseType===Fp.pascalCase&&(Array.isArray(u)?u.forEach((i,r,o)=>{o[r]=yo(i)}):u=yo(e[a])),this._odataOptions.orderBy=u,this._defaultSortBy=u}}addToFilterQueueWhenNotExists(e){this._odataOptions.filterQueue&&-1===this._odataOptions.filterQueue.indexOf(e)&&this._odataOptions.filterQueue.push(e)}buildSelectExpand(e){const a={},u=new Set;for(const i of e){const r=i.split("/");if(1===r.length)u.add(i);else{const o=r[0],d=r.splice(1).join("/");a[o]||(a[o]=[]),a[o].push(d),this._odataOptions.enableExpand&&!(this._odataOptions.version&&this._odataOptions.version>=4)&&u.add(o)}}return{selectParts:[...u],expandParts:this._odataOptions.enableExpand?this.buildExpand(a):[]}}buildExpand(e){const a=[];for(const u of Object.keys(e))if(this._odataOptions.enableSelect&&this._odataOptions.version&&this._odataOptions.version>=4){const i=this.buildSelectExpand(e[u]);let r=i.selectParts.join(",");r.length>0&&(r="$select="+r),this._odataOptions.enableExpand&&i.expandParts.length>0&&(r+=(r.length>0?";":"")+"$expand="+i.expandParts.join(",")),r.length>0&&(r="("+r+")"),a.push(u+r)}else a.push(u);return a}}class dJ{get columnDefinitions(){return this._columnDefinitions}get odataService(){return this._odataService}get _gridOptions(){return this._grid?.getOptions()??{}}constructor(){this._currentFilters=[],this._currentPagination=null,this._currentSorters=[],this._columnDefinitions=[],this.defaultOptions={top:25,orderBy:"",caseType:Fp.pascalCase},this._odataService=new j3e}init(e,a,u,i){this._grid=u;const r={...this.defaultOptions,...e};if(this._gridOptions.enablePagination||r?.infiniteScroll){const o=r.infiniteScroll?.fetchSize??a?.pageSize??this.defaultOptions.top;this._odataService.options={...r,top:o},this._currentPagination={pageNumber:1,pageSize:this._odataService.options.top||this.defaultOptions.top||20}}else this._odataService.options={...r,top:void 0},this._currentPagination=null;if(this.options=this._odataService.options,this.pagination=a,u?.getColumns){const o=i?.allColumns??u.getColumns()??[];this._columnDefinitions=o.filter(d=>!d.excludeFromQuery)}this._odataService.columnDefinitions=this._columnDefinitions,this._odataService.datasetIdPropName=this._gridOptions.datasetIdPropertyName||"id"}buildQuery(){return this._odataService.buildQuery()}postProcess(e){const a=this._odataService.options.version??2;if(this.pagination&&this._odataService.options.enableCount){const i=(this._odataService.options.countExtractor??a>=4?r=>r?.["@odata.count"]:3===a?r=>r?.__count:r=>r?.d?.__count)(e);"number"==typeof i&&(this.pagination.totalItems=i)}if(this._odataService.options.enableExpand){const i=(this._odataService.options.datasetExtractor??a>=4?r=>r?.value:3===a?r=>r?.results:r=>r?.d?.results)(e);if(Array.isArray(i)){const r=new Set(this._columnDefinitions.flatMap(o=>o.fields??[o.field]).filter(o=>o.includes("/")));if(r.size>0){const o=new Set;for(const d of i){for(const h of r){const m=h.split("/"),g=m[0];o.add(g);let v=d[g];for(let k=1;k":a="gt";break;case">=":a="ge";break;case"<>":case"!=":a="ne";break;default:a="eq"}return a}resetPaginationOptions(){this._odataService.updateOptions({skip:0})}saveColumnFilter(e,a,u){this._odataService.saveColumnFilter(e,a,u)}processOnFilterChanged(e,a){if(void 0===this._gridOptions.backendServiceApi)throw new Error('Something went wrong in the GridOdataService, "backendServiceApi" is not initialized');if(this._currentFilters=this.castFilterToColumnFilters(a.columnFilters),!a||!a.grid)throw new Error('Something went wrong when trying create the GridOdataService, it seems that "args" is not populated correctly');return this.updateFilters(a.columnFilters),this.resetPaginationOptions(),this._odataService.buildQuery()}processOnPaginationChanged(e,a){const u=+(this.options?.infiniteScroll?.fetchSize||a.pageSize||(this.pagination?this.pagination.pageSize:20));return this.updatePagination(a.newPage,u),this._odataService.buildQuery()}processOnSortChanged(e,a){const u=a.multiColumnSort?a.sortCols:new Array({columnId:a.sortCol?.id??"",sortCol:a.sortCol,sortAsc:a.sortAsc});return this.updateSorters(u),this.options?.infiniteScroll&&this._odataService.updateOptions({skip:void 0}),this._odataService.buildQuery()}updateFilters(e,a){let u="";const i=[],r=this._odataService.options.version??2;a&&(this._currentFilters=this.castFilterToColumnFilters(e));for(const o in e)if(e.hasOwnProperty(o)){const d=e[o];let h;if(h=a&&Array.isArray(this._columnDefinitions)?this._columnDefinitions.find(R=>R.id===d.columnId):d.columnDef,!h)throw new Error("[GridOData Service]: Something went wrong in trying to get the column definition of the specified filter (or preset filters). Did you make a typo on the filter columnId?");let m=h.filter?.queryField||h.queryFieldFilter||h.queryField||h.field||h.name||"";m instanceof HTMLElement&&(m=Tu(m.innerHTML));const g=h.type||w.string;let v=(d?.searchTerms?[...d.searchTerms]:null)||[],k=Array.isArray(v)&&1===v.length?v[0]:"";if(typeof k>"u"&&(k=""),!m)throw new Error('GridOData filter could not find the field name to query the search, your column definition must include a valid "field" or "name" (optionally you can also use the "queryfield").');if(this._odataService.options.useVerbatimSearchTerms||d.verbatimSearchTerms){i.push(`${m} ${d.operator} ${JSON.stringify(d.searchTerms)}`.trim());continue}k=null==k?"":`${k}`;const D=!1!==(h.autoParseInputFilterOperator??this._gridOptions.autoParseInputFilterOperator)?k.match(/^((.*[^\\*\r\n])[*]{1}(.*[^*\r\n]))|^([<>!=*]{0,2})(.*[^<>!=*])([*]?)$/)||[]:[k,"","","","",k,""],C=D?.[2]||"",F=D?.[3]||"";let A=d.operator||D?.[4],z=D?.[1]||D?.[5]||"";const M=D?.[6]||"*z"===A||A===te.endsWith?"*":"",L=d.bypassBackendQuery||!1;if(m&&""===z&&v.length<=1){this.removeColumnFilter(ui(m));continue}if(C&&F?(v=[C,F],A=te.startsWithEndsWith):Array.isArray(v)&&1===v.length&&"string"==typeof v[0]&&v[0].indexOf("..")>=0&&(A!==te.rangeInclusive&&A!==te.rangeExclusive&&(A=this._gridOptions.defaultFilterRangeOperator??te.rangeInclusive),v=v[0].split("..",2),""===v[0]?(A=A===te.rangeInclusive?"<=":A===te.rangeExclusive?"<":A,v=v.slice(1),z=v[0]):""===v[1]&&(A=A===te.rangeInclusive?">=":A===te.rangeExclusive?">":A,v=v.slice(0,1),z=v[0])),!A&&h.filter&&(A=h.filter.operator),!A&&Array.isArray(v)&&2===v.length&&v[0]&&v[1]&&(A=this._gridOptions.defaultFilterRangeOperator),(A===te.rangeInclusive||A===te.rangeExclusive)&&Array.isArray(v)&&1===v.length&&g===w.date&&(A=te.equal),A||(A=R2(g)),L)m&&this.saveColumnFilter(ui(m),k,v);else{let R;if(z=this.normalizeSearchValue(g,z,r),Array.isArray(v)&&v.forEach((G,$)=>{v[$]=this.normalizeSearchValue(g,v[$],r)}),u="",this._odataService.options.caseType===Fp.pascalCase&&(m=yo(ui(m||""))),"function"==typeof this._odataService.options.filterQueryOverride&&(R=this._odataService.options.filterQueryOverride({fieldName:ui(m),columnDef:h,operator:A,columnFilterOperator:d.operator,searchValues:v,grid:this._grid})),void 0!==R)u=R;else if(A===te.startsWithEndsWith&&Array.isArray(v)&&2===v.length){const G=[],[$,Y]=v;G.push(`startswith(${m}, ${$})`),G.push(`endswith(${m}, ${Y})`),u=G.join(" and ")}else if(v?.length>1&&("IN"===A||"NIN"===A||"NOTIN"===A||"NOT IN"===A||"NOT_IN"===A)){const G=[];if("IN"===A){for(let $=0,Y=v.length;$=4?`contains(${m}, ${z})`:`substringof(${z}, ${m})`,A===te.notContains&&(u=`not ${u}`));""!==u&&(i.push(u.trim()),this.saveColumnFilter(ui(m||""),k,z))}}this._odataService.updateOptions({filter:i.length>0?i.join(" and "):"",skip:void 0})}updatePagination(e,a){this._currentPagination={pageNumber:e,pageSize:a},this._gridOptions&&(this._gridOptions.enablePagination||!this._gridOptions.hasOwnProperty("enablePagination")||this.options?.infiniteScroll)&&this._odataService.updateOptions({top:a,skip:(e-1)*a})}updateSorters(e,a){let u=[];const i=[];if(!e&&a){u=a,u.forEach(d=>d.direction=d.direction.toLowerCase());const o=u.map(d=>{const h=this._columnDefinitions.find(m=>m.id===d.columnId);return i.push({field:h?(h.queryFieldSorter||h.queryField||h.field)+"":d.columnId+"",direction:d.direction}),h?{columnId:d.columnId,sortAsc:d.direction.toUpperCase()===xi.ASC}:null});Array.isArray(o)&&this._grid&&this._grid.setSortColumns(o)}else if(e&&!a&&0!==e?.length&&e)for(const o of e)if(o.sortCol){let d=(o.sortCol.queryFieldSorter||o.sortCol.queryField||o.sortCol.field)+"",h=(o.sortCol.field||o.sortCol.id)+"",m=(o.sortCol.queryFieldSorter||o.sortCol.queryField||o.sortCol.field||"")+"";this._odataService.options.caseType===Fp.pascalCase&&(d=yo(d),h=yo(h),m=yo(m)),u.push({columnId:o.sortCol.id,direction:o.sortAsc?xi.asc:xi.desc}),""!==m&&i.push({field:m,direction:o.sortAsc?xi.ASC:xi.DESC})}u=u||[];const r=i.map(o=>{let d="";return o&&o.field&&(d=`${this._odataService.options.caseType===Fp.pascalCase?yo(o.field):o.field} ${o&&o.direction&&o.direction.toLowerCase()||""}`),d}).join(",");return this._odataService.updateOptions({orderBy:r}),this._currentSorters=u,this._odataService.buildQuery()}castFilterToColumnFilters(e){const a="object"==typeof e?Object.keys(e).map(u=>e[u]):e;return Array.isArray(a)?a.map(u=>{const i={columnId:u.columnId||""};return u.operator&&(i.operator=u.operator),u.targetSelector&&(i.targetSelector=u.targetSelector),Array.isArray(u.searchTerms)&&(i.searchTerms=u.searchTerms),i}):[]}filterBySearchTermRange(e,a,u){let i="";return Array.isArray(u)&&2===u.length&&(a===te.rangeInclusive?(i=`(${e} ge ${u[0]}`,""!==u[1]&&(i+=` and ${e} le ${u[1]}`),i+=")"):a===te.rangeExclusive&&(i=`(${e} gt ${u[0]}`,""!==u[1]&&(i+=` and ${e} lt ${u[1]}`),i+=")")),i}normalizeSearchValue(e,a,u){switch(e){case w.date:a=nce(a),a=u>=4?a:`DateTime'${a}'`;break;case w.string:case w.text:case w.readonly:"string"==typeof a&&(a=a.replace(/'/g,"''"),a=`'${a=encodeURIComponent(a)}'`);break;case w.integer:case w.number:case w.float:"string"==typeof a&&((""===(a=(a=(a=(a=(a=a.replace(/\.\./g,".")).replace(/\.+$/g,"")).replace(/^\.+/g,"0.")).replace(/^-+\.+/g,"-0.")).replace(/(?!^-)[^\d.]/g,""))||"-"===a)&&(a="0"))}return a}}let M9=class{constructor(e,a){this.cd=e,this.http=a,this.dataset=[],this.isPageErrorTest=!1,this.tagDataClass="",this.odataQuery="",this.processing=!1,this.errorStatus="",this.errorStatusClass="hidden",this.status={text:"processing...",class:"alert alert-danger"},this.backendService=new dJ}ngOnInit(){this.initializeGrid()}angularGridReady(e){this.angularGrid=e}initializeGrid(){this.columnDefinitions=[{id:"name",name:"Name",field:"name",sortable:!0,type:w.string,filterable:!0,filter:{model:ie.compoundInput}},{id:"gender",name:"Gender",field:"gender",filterable:!0,sortable:!0,filter:{model:ie.singleSelect,collection:[{value:"",label:""},{value:"male",label:"male"},{value:"female",label:"female"}]}},{id:"company",name:"Company",field:"company",filterable:!0,sortable:!0},{id:"category_name",name:"Category",field:"category/name",filterable:!0,sortable:!0,formatter:(e,a,u,i,r)=>r.category?.name||""}],this.gridOptions={enableAutoResize:!0,autoResize:{container:"#demo-container",rightPadding:10},checkboxSelector:{hideInFilterHeaderRow:!1,hideInColumnTitleRow:!0},enableCellNavigation:!0,enableFiltering:!0,enableCheckboxSelector:!0,enableRowSelection:!0,enableGrouping:!0,headerMenu:{hideFreezeColumnsCommand:!1},presets:{},backendServiceApi:{service:this.backendService,options:{infiniteScroll:{fetchSize:30},enableCount:!0,version:4},onError:e=>{this.errorStatus=e.message,this.errorStatusClass="visible notification is-light is-danger is-small is-narrow",this.displaySpinner(!1,!0)},preProcess:()=>{this.errorStatus="",this.errorStatusClass="hidden",this.displaySpinner(!0)},process:e=>this.getCustomerApiCall(e),postProcess:e=>{this.metrics=e.metrics,this.displaySpinner(!1),this.getCustomerCallback(e),this.cd.detectChanges()}}}}displaySpinner(e,a){this.processing=e,this.status=a?{text:"ERROR!!!",class:"alert alert-danger"}:e?{text:"loading",class:"alert alert-warning"}:{text:"finished",class:"alert alert-success"},this.cd.detectChanges()}getCustomerCallback(e){const a=e["@odata.count"];this.metrics.totalItemCount=a,e.infiniteScrollBottomHit?this.angularGrid.dataView?.addItems(e.value):(this.angularGrid.slickGrid?.scrollTo(0),this.dataset=e.value,this.metrics.itemCount=e.value.length),this.odataQuery=e.query}getCustomerApiCall(e){return this.getCustomerDataApiMock(e)}getCustomerDataApiMock(e){return this.errorStatusClass="hidden",new Promise(a=>{const u=e.toLowerCase().split("&");let i=0,r=0,o="",d=100;const h={};if(this.isPageErrorTest)throw this.isPageErrorTest=!1,new Error("Server timed out trying to retrieve data for the last page");for(const m of u){if(m.includes("$top=")&&(i=+m.substring(5),5e4===i))throw new Error("Server timed out retrieving 50,000 rows");if(m.includes("$skip=")&&(r=+m.substring(6)),m.includes("$orderby=")&&(o=m.substring(9)),m.includes("$filter=")){const g=m.substring(8).replace("%20"," ");if(g.includes("matchespattern")){const v=new RegExp("matchespattern\\(([a-zA-Z]+),\\s'%5E(.*?)'\\)","i"),k=g.match(v)||[],x=k[1].trim();h[x]={type:"matchespattern",term:"^"+k[2].trim()}}if(g.includes("contains")){const v=g.match(/contains\(([a-zA-Z/]+),\s?'(.*?)'/)||[],k=v[1].trim();h[k]={type:"substring",term:v[2].trim()}}if(g.includes("substringof")){const v=g.match(/substringof\('(.*?)',\s([a-zA-Z/]+)/)||[],k=v[2].trim();h[k]={type:"substring",term:v[1].trim()}}for(const v of["eq","ne","le","lt","gt","ge"])if(g.includes(v)){const x=new RegExp(`([a-zA-Z ]*) ${v} '(.*?)'`).exec(g);if(Array.isArray(x)){const D=x[1].trim();h[D]={type:v,term:x[2].trim()}}}if(g.includes("startswith")&&g.includes("endswith")){const v=g.match(/startswith\(([a-zA-Z ]*),\s?'(.*?)'/)||[],k=g.match(/endswith\(([a-zA-Z ]*),\s?'(.*?)'/)||[],x=v[1].trim();h[x]={type:"starts+ends",term:[v[2].trim(),k[2].trim()]}}else if(g.includes("startswith")){const v=g.match(/startswith\(([a-zA-Z ]*),\s?'(.*?)'/)||[],k=v[1].trim();h[k]={type:"starts",term:v[2].trim()}}else if(g.includes("endswith")){const v=g.match(/endswith\(([a-zA-Z ]*),\s?'(.*?)'/)||[],k=v[1].trim();h[k]={type:"ends",term:v[2].trim()}}if(g.includes("company"))throw new Error('Server could not filter using the field "Company"')}}if(o.includes("company"))throw new Error('Server could not sort using the field "Company"');this.http.get("assets/data/customers_100.json").subscribe(m=>{let g=m;if(o?.length>0){const D=o.split(",");for(const C of D){const F=C.split(" "),A=F[0];let z=L=>L;for(const L of A.split("/")){const R=z;z=G=>R(G)[L]}switch((F[1]??"asc").toLocaleLowerCase()){case"asc":g=g.sort((L,R)=>z(L).localeCompare(z(R)));break;case"desc":g=g.sort((L,R)=>z(R).localeCompare(z(L)))}}}let v=r,k=g;if(h){for(const D in h)h.hasOwnProperty(D)&&(k=k.filter(C=>{const F=h[D].type,A=h[D].term;let z=D;if(-1!==D?.indexOf(" ")){const R=D.split(" ");z=R[R.length-1]}let M,L=C;for(const R of z.split("/"))M=L[R],L=M;if(M){const[R,G]=Array.isArray(A)?A:[A];switch(F){case"eq":return M.toLowerCase()===R;case"ne":return M.toLowerCase()!==R;case"le":return M.toLowerCase()<=R;case"lt":return M.toLowerCase()R;case"ge":return M.toLowerCase()>=R;case"ends":return M.toLowerCase().endsWith(R);case"starts":return M.toLowerCase().startsWith(R);case"starts+ends":return M.toLowerCase().startsWith(R)&&M.toLowerCase().endsWith(G);case"substring":return M.toLowerCase().includes(R);case"matchespattern":return new RegExp(R.replaceAll("%25",".*"),"i").test(M)}}}));d=k.length}v>k.length&&(e=e.replace(`$skip=${v}`,""),v=0);const x=k.slice(v,v+i);setTimeout(()=>{const D={query:e};D.value=x,D["@odata.count"]=d,a(D)},100)})})}groupByGender(){this.angularGrid?.dataView?.setGrouping({getter:"gender",formatter:e=>`Gender: ${e.value} (${e.count} items)`,comparer:(e,a)=>ul.string(e.value,a.value),aggregators:[new Nt_Sum("gemder")],aggregateCollapsed:!1,lazyTotalsCalculation:!0}),this.angularGrid?.slickGrid.setSortColumns([{columnId:"duration",sortAsc:!0}]),this.angularGrid?.slickGrid.invalidate()}clearAllFiltersAndSorts(){this.angularGrid?.gridService&&this.angularGrid.gridService.clearAllFiltersAndSorts()}setFiltersDynamically(){this.angularGrid?.filterService.updateFilters([{columnId:"gender",searchTerms:["female"]}])}refreshMetrics(e){e?.current>=0&&(this.metrics.itemCount=this.angularGrid.dataView?.getFilteredItemCount()||0,this.tagDataClass=this.metrics.itemCount===this.metrics.totalItemCount?"fully-loaded":"partial-load")}setSortingDynamically(){this.angularGrid?.sortService.updateSorting([{columnId:"name",direction:"DESC"}])}static#e=this.ctorParameters=()=>[{type:Xu},{type:jt}]};M9=Ze([ca({encapsulation:Ga.None,template:'
\n

\n Example 38: OData (v4) Backend Service with Infinite Scroll\n \n \n code\n \n \n

\n\n
\n
    \n
  • \n Infinite scrolling allows the grid to lazy-load rows from the server when reaching the scroll bottom (end) position.\n In its simplest form, the more the user scrolls down, the more rows get loaded.\n If we reached the end of the dataset and there is no more data to load, then we\'ll assume to have the entire dataset loaded in memory.\n This contrast with the regular Pagination approach which will hold only hold data for 1 page at a time.\n
  • \n
  • NOTES
  • \n
      \n
    1. \n presets.pagination is not supported with Infinite Scroll and will revert to the first page,\n simply because since we keep appending data, we always have to start from index zero (no offset).\n
    2. \n
    3. \n Pagination is not shown BUT in fact, that is what is being used behind the scene whenever reaching the scroll end (fetching next batch).\n
    4. \n
    5. \n Also note that whenever the user changes the Sort(s)/Filter(s) it will always reset and go back to zero index (first page).\n
    6. \n
    \n
\n
\n\n
\n
\n
\n Backend Error: \n
\n
\n
\n\n
\n
\n
\n Status: {{status.text}}\n \n \n \n
\n
\n
\n
\n OData Query: {{odataQuery}}\n
\n
\n
\n\n
\n
\n \n \n \n \n\n
\n Metrics:\n \n {{metrics.endTime | date: \'dd MMM, h:mm:ssa\'}} \u2014\n {{metrics.itemCount}}\n of\n {{metrics.totalItemCount}}\n items\n \n All Data Loaded!!!\n
\n
\n
\n\n \n \n
',styles:[V3e()]}),Ct("design:paramtypes",[Xu,jt])],M9);var J3e=O(133),Z3e=O.n(J3e);let L9={},T9={},P9=class{constructor(){this.title="Example 7: Header Button Plugin",this.subTitle='\n This example demonstrates using the Slick.Plugins.HeaderButtons plugin to easily add buttons to colum headers.\n These buttons can be specified directly in the column definition, and are very easy to configure and use.\n (Wiki docs)\n
    \n
  • Resize the 1st column to see all icon/command
  • \n
  • Mouse hover the 2nd column to see it\'s icon/command
  • \n
  • For all the other columns, click on top-right red circle icon to enable highlight of negative numbers.
  • \n
  • Use override callback functions to change the properties of show/hide, enable/disable the menu or certain item(s) from the list
  • \n
      \n
    1. These callbacks are: "itemVisibilityOverride", "itemUsabilityOverride"
    2. \n
    3. for example the "Column E" does not show the header button via "itemVisibilityOverride"
    4. \n
    5. for example the "Column J" header button is displayed but it not usable via "itemUsabilityOverride"
    6. \n
    \n
\n ',this.columnDefinitions1=[],this.columnDefinitions2=[],this.dataset1=[],this.dataset2=[],L9={},T9={}}ngOnInit(){this.defineGrid(),this.dataset1=this.loadData(200,1),this.dataset2=this.loadData(200,2)}angularGrid1Ready(e){this.angularGrid1=e}angularGrid2Ready(e){this.angularGrid2=e}defineGrid(){this.gridOptions1={enableAutoResize:!0,enableHeaderButton:!0,enableHeaderMenu:!1,autoResize:{container:"#demo-container",rightPadding:10},enableFiltering:!1,enableExcelCopyBuffer:!0,excelCopyBufferOptions:{onCopyCells:(e,a)=>console.log("onCopyCells",e,a),onPasteCells:(e,a)=>console.log("onPasteCells",e,a),onCopyCancelled:(e,a)=>console.log("onCopyCancelled",e,a)},enableCellNavigation:!0,gridHeight:275,headerButton:{onCommand:(e,a)=>this.handleOnCommand(e,a,1)}},this.gridOptions2={...this.gridOptions1,enableHeaderMenu:!0,enableFiltering:!0,headerButton:{onCommand:(e,a)=>this.handleOnCommand(e,a,2)}}}handleOnCommand(e,a,u){const i=a.column,r=a.button;"toggle-highlight"===a.command&&("mdi mdi-lightbulb-on text-danger"===r.cssClass?(1===u?delete L9[i.id]:delete T9[i.id],r.cssClass="mdi mdi-lightbulb-outline text-warning faded",r.tooltip="Highlight negative numbers."):(1===u?L9[i.id]=!0:T9[i.id]=!0,r.cssClass="mdi mdi-lightbulb-on text-danger",r.tooltip="Remove highlight."),this[`angularGrid${u}`].slickGrid.invalidate())}loadData(e,a){for(let i=0;i<10;i++)this[`columnDefinitions${a}`].push({id:i,name:"Column "+String.fromCharCode(65+i),field:i+"",width:0===i?70:100,filterable:!0,sortable:!0,formatter:(r,o,d,h)=>1===a&&L9[h.id]&&d<0||2===a&&T9[h.id]&&d<0?`
${d}
`:d,header:{buttons:[{cssClass:"mdi mdi-lightbulb-outline text-warning faded",command:"toggle-highlight",tooltip:"Highlight negative numbers.",itemVisibilityOverride:r=>"Column E"!==r.column.name,itemUsabilityOverride:r=>"Column J"!==r.column.name,action:(r,o)=>{console.log(`execute a callback action to "${o.command}" on ${o.column.name}`)}}]}});this[`columnDefinitions${a}`][0].name="Resize me!",this[`columnDefinitions${a}`][0].header={buttons:[{cssClass:"mdi mdi-message-text",handler:()=>{alert("Tag")}},{cssClass:"mdi mdi-forum-outline",handler:()=>{alert("Comment")}},{cssClass:"mdi mdi-information",handler:()=>{alert("Info")}},{cssClass:"mdi mdi-help-circle",handler:()=>{alert("Help")}}]},2===a&&this.columnDefinitions2[0].header?.buttons?.reverse(),this[`columnDefinitions${a}`][1].name="Hover me!",this[`columnDefinitions${a}`][1].header={buttons:[{cssClass:"mdi mdi-help-circle",showOnHover:!0,tooltip:"This button only appears on hover.",handler:()=>{alert("Help")}}]};const u=[];for(let i=0;i[]};P9=Ze([ca({encapsulation:Ga.None,template:'
\n

\n {{title}}\n \n \n code\n \n \n

\n
\n\n
Grid 1
\n \n \n\n
\n
Grid 2 - with both Header Buttons & Menus
\n \n \n\n
',styles:[Z3e()]}),Ct("design:paramtypes",[])],P9);let tP=class{constructor(){this.clickedTimes=0}clickMe(){this.clickedTimes++}};tP=Ze([ca({template:'\n
You\'ve clicked me {{clickedTimes}} time(s)
',selector:"custom-footer"})],tP);let N9=class{constructor(){this.title="Example 34: Custom header & footer Templates",this.subTitle="\n Basic Grid with templates for custom headers and footers\n
    \n
  • Pass in custom templates to be rendered at predefined header and footer destinations
  • \n
\n ",this.columnDefinitions=[]}ngOnInit(){this.columnDefinitions=[{id:"title",name:"Title",field:"title",sortable:!0},{id:"duration",name:"Duration (days)",field:"duration",sortable:!0},{id:"%",name:"% Complete",field:"percentComplete",sortable:!0},{id:"start",name:"Start",field:"start",formatter:j.dateIso},{id:"finish",name:"Finish",field:"finish",formatter:j.dateIso},{id:"effort-driven",name:"Effort Driven",field:"effortDriven",sortable:!0}],this.gridOptions={enableAutoResize:!1,enableSorting:!0,gridHeight:225,gridWidth:800},this.dataset=this.mockData(995)}mockData(e){const a=[];for(let u=0;u\n

\n {{ title }}\n \n \n code\n \n \n

\n
\n\n \n \n

Grid with header and footer slot

\n
\n\n \n \n \n \n
\n'})],N9);var X3e=O(336),ege=O.n(X3e);let I9=class{constructor(e){this.translate=e,this.title="Example 8: Header Menu Plugin",this.subTitle='\n This example demonstrates using the Slick.Plugins.HeaderMenu plugin to easily add menus to colum headers.
\n These menus can be specified directly in the column definition, and are very easy to configure and use.\n (Wiki docs)\n
    \n
  • Now enabled by default in the Global Grid Options, it will add the default commands of (hide column, sort asc/desc)
  • \n
  • Hover over any column header to see an arrow showing up on the right
  • \n
  • Try Sorting (multi-sort) the 2 columns "Duration" and "% Complete" (the other ones are disabled)
  • \n
  • Try hiding any columns (you use the "Column Picker" plugin by doing a right+click on the header to show the column back)
  • \n
  • Note: The "Header Button" & "Header Menu" Plugins cannot be used at the same time
  • \n
  • You can change the menu icon via SASS variables as shown in this demo (check all SASS variables)
  • \n
  • Use override callback functions to change the properties of show/hide, enable/disable the menu or certain item(s) from the list
  • \n
      \n
    1. These callbacks are: "itemVisibilityOverride", "itemUsabilityOverride"
    2. \n
    3. for example if we want to disable the "Help" command over the "Title" and "Completed" column
    4. \n
    5. for example don\'t show Help on column "% Complete"
    6. \n
    \n
\n ',this.subscriptions=[];this.translate.use("en"),this.selectedLanguage="en"}ngOnDestroy(){rd(this.subscriptions)}ngOnInit(){this.columnDefinitions=[{id:"title",name:"Title",field:"title",nameKey:"TITLE"},{id:"duration",name:"Duration",field:"duration",nameKey:"DURATION",sortable:!0},{id:"percentComplete",name:"% Complete",field:"percentComplete",nameKey:"PERCENT_COMPLETE",sortable:!0},{id:"start",name:"Start",field:"start",nameKey:"START"},{id:"finish",name:"Finish",field:"finish",nameKey:"FINISH"},{id:"completed",name:"Completed",field:"completed",nameKey:"COMPLETED"}],this.columnDefinitions.forEach(e=>{e.header={menu:{commandItems:[{iconCssClass:"mdi mdi-help-circle",titleKey:"HELP",command:"help",tooltip:"Need assistance?",cssClass:"bold",textCssClass:"title"===e.id||"completed"===e.id?"":"blue",positionOrder:99,itemUsabilityOverride:a=>!("title"===a.column.id||"completed"===a.column.id),itemVisibilityOverride:a=>"percentComplete"!==a.column.id,action:(a,u)=>{console.log("execute an action on Help",u)}},{divider:!0,command:"",positionOrder:98},{command:"custom-actions",title:"Hello",positionOrder:99,commandItems:[{command:"hello-world",title:"Hello World"},{command:"hello-slickgrid",title:"Hello SlickGrid"},{command:"sub-menu",title:"Let's play",cssClass:"green",subMenuTitle:"choose your game",subMenuTitleCssClass:"text-italic salmon",commandItems:[{command:"sport-badminton",title:"Badminton"},{command:"sport-tennis",title:"Tennis"},{command:"sport-racquetball",title:"Racquetball"},{command:"sport-squash",title:"Squash"}]}]},{command:"feedback",title:"Feedback",positionOrder:100,commandItems:[{command:"request-update",title:"Request update from supplier",iconCssClass:"mdi mdi-star",tooltip:"this will automatically send an alert to the shipping team to contact the user for an update"},"divider",{command:"sub-menu",title:"Contact Us",iconCssClass:"mdi mdi-account",subMenuTitle:"contact us...",subMenuTitleCssClass:"italic",commandItems:[{command:"contact-email",title:"Email us",iconCssClass:"mdi mdi-pencil-outline"},{command:"contact-chat",title:"Chat with us",iconCssClass:"mdi mdi-message-text-outline"},{command:"contact-meeting",title:"Book an appointment",iconCssClass:"mdi mdi-coffee"}]}]}]}}}),this.gridOptions={enableAutoResize:!0,enableHeaderMenu:!0,autoResize:{container:"#demo-container",rightPadding:10},enableFiltering:!1,enableCellNavigation:!0,headerMenu:{hideSortCommands:!1,hideColumnHideCommand:!1,subItemChevronClass:"mdi mdi-chevron-down mdi-rotate-270",onCommand:(e,a)=>{const u=a.item?.command;u.includes("hello-")?alert(a?.item.title):u.includes("sport-")?alert("Just do it, play "+a?.item?.title):u.includes("contact-")?alert("Command: "+a?.item?.command):"help"===a.command&&alert("Please help!!!")}},enableTranslate:!0,i18n:this.translate},this.getData()}getData(){const e=[];for(let a=0;a<1e3;a++)e[a]={id:a,title:"Task "+a,duration:Math.round(25*Math.random())+" days",percentComplete:Math.round(100*Math.random()),start:"01/01/2009",finish:"01/05/2009",completed:a%5==0};this.dataset=e}angularGridReady(e){this.angularGrid=e}switchLanguage(){const e="en"===this.selectedLanguage?"fr":"en";this.subscriptions.push(this.translate.use(e).subscribe(()=>{this.selectedLanguage=e}))}static#e=this.ctorParameters=()=>[{type:at}]};I9=Ze([ca({template:'
\n

\n {{title}}\n \n \n code\n \n \n

\n
\n\n \n Locale:\n \n {{selectedLanguage + \'.json\'}}\n \n\n
\n \n \n
\n
',encapsulation:Ga.None,styles:[ege()]}),Ct("design:paramtypes",[at])],I9);const cJ=(t,e,a,u,i,r)=>r.getOptions().i18n.instant("TASK_X",{x:a});let R9=class{constructor(e){this.translate=e,this.title="Example 12: Localization (i18n)",this.subTitle='Support multiple locales with the ngx-translate plugin, following these steps (Wiki docs)\n
    \n
  1. You first need to "enableTranslate" in the Grid Options
  2. \n
  3. In the Column Definitions, you have following options
  4. \n
      \n
    • To translate a header title, use "nameKey" with a translate key (nameKey: \'TITLE\')
    • \n
    • For the cell values, you need to use a Formatter, there\'s 2 ways of doing it
    • \n
        \n
      • formatter: myCustomTranslateFormatter <= "Title" column uses it
      • \n
      • formatter: Formatters.translate, i18n: this.translateService <= "Completed" column uses it
      • \n
      \n
    \n
  5. For date localization, you need to create your own custom formatter.
  6. \n
      \n
    • You can easily implement logic to switch between Formatters "dateIso" or "dateUs", depending on current locale.
    • \n
    \n
  7. For the Select (dropdown) filter, you can fill in the "labelKey" property, if found it will use it, else it will use "label"
  8. \n
      \n
    • What if your select options have totally different value/label pair? In this case, you can use the customStructure: { label: \'customLabel\', value: \'customValue\'} to change the property name(s) to use.\'
    • \n
    • What if you want to use "customStructure" and translation? Simply pass this flag enableTranslateLabel: true
    • \n
    • More info on the Select Filter Wiki page\n
    \n
  9. For more info about "Download to File", read the Wiki page
  10. \n
\n ',this.subscriptions=[],this.duplicateTitleHeaderCount=1,this.excelExportService=new Ao,this.textExportService=new $T;this.translate.use("en"),this.selectedLanguage="en"}ngOnDestroy(){rd(this.subscriptions)}ngOnInit(){this.columnDefinitions=[{id:"title",name:"Title",field:"id",nameKey:"TITLE",minWidth:100,formatter:cJ,sortable:!0,filterable:!0,params:{useFormatterOuputToFilter:!0}},{id:"description",name:"Description",field:"description",filterable:!0,sortable:!0,minWidth:80},{id:"duration",name:"Duration (days)",field:"duration",nameKey:"DURATION",sortable:!0,formatter:j.percentCompleteBar,minWidth:100,exportWithFormatter:!1,filterable:!0,type:w.number,filter:{model:ie.slider,filterOptions:{hideSliderNumber:!0}}},{id:"start",name:"Start",field:"start",nameKey:"START",minWidth:100,formatter:j.dateIso,outputType:w.dateIso,type:w.date,exportWithFormatter:!0,filterable:!0,filter:{model:ie.compoundDate}},{id:"finish",name:"Finish",field:"finish",nameKey:"FINISH",formatter:j.dateIso,outputType:w.dateIso,type:w.date,minWidth:100,filterable:!0,filter:{model:ie.compoundDate}},{id:"completedBool",name:"Completed",field:"completedBool",nameKey:"COMPLETED",minWidth:100,sortable:!0,formatter:j.checkmarkMaterial,exportCustomFormatter:j.translateBoolean,filterable:!0,filter:{collection:[{value:"",label:""},{value:!0,labelKey:"TRUE"},{value:!1,labelKey:"FALSE"}],model:ie.singleSelect,enableTranslateLabel:!0}},{id:"completed",name:"Completed",field:"completed",nameKey:"COMPLETED",formatter:j.translate,sortable:!0,minWidth:100,exportWithFormatter:!0,filterable:!0,filter:{collection:[{value:"",label:""},{value:"TRUE",labelKey:"TRUE"},{value:"FALSE",labelKey:"FALSE"}],collectionSortBy:{property:"labelKey"},enableTranslateLabel:!0,model:ie.singleSelect}}],this.gridOptions={autoResize:{container:"#demo-container",rightPadding:10},enableAutoResize:!0,enableExcelCopyBuffer:!0,enableFiltering:!0,enableTranslate:!0,i18n:this.translate,checkboxSelector:{hideInFilterHeaderRow:!1,hideInColumnTitleRow:!0},enableCheckboxSelector:!0,enableRowSelection:!0,showCustomFooter:!0,customFooterOptions:{metricTexts:{itemsKey:"ITEMS",ofKey:"OF",lastUpdateKey:"LAST_UPDATE"},dateFormat:"YYYY-MM-DD, hh:mm a",hideTotalItemCount:!1,hideLastUpdateTimestamp:!1},excelExportOptions:{customExcelHeader:(e,a)=>{const u="fr"===this.translate.currentLang?"Titre qui est suffisament long pour \xeatre coup\xe9":"My header that is long enough to wrap",o=e.getStyleSheet().createFormat({font:{size:12,fontName:"Calibri",bold:!0,color:"FF0000FF"},alignment:{wrapText:!0}});a.setRowInstructions(0,{height:30}),a.mergeCells("B1","D1");const d=[];d.push({value:""}),d.push({value:u,metadata:{style:o.id}}),a.data.push(d)}},gridMenu:{hideExportCsvCommand:!1,hideExportTextDelimitedCommand:!1},enableExcelExport:!0,enableTextExport:!0,textExportOptions:{exportWithFormatter:!0,sanitizeDataExport:!0},externalResources:[this.excelExportService,this.textExportService]},this.loadData(1500)}loadData(e){const a=[];for(let u=0;u{this.selectedLanguage=e}))}static#e=this.ctorParameters=()=>[{type:at}]};R9=Ze([ca({template:'
\n

\n {{title}}\n \n \n code\n \n \n

\n
\n\n
\n\n
\n
\n \n Locale: {{selectedLanguage + \'.json\'}}\n\n \n \n \n \n \n \n
\n
\n\n
\n \n \n
\n
'}),Ct("design:paramtypes",[at])],R9);var ige=O(735),nge=O.n(ige);let H9=class{constructor(e){this.translate=e,this.title="Example 9: Grid Menu Control",this.subTitle='\n This example demonstrates using the Slick.Controls.GridMenu plugin to easily add a Grid Menu (aka hamburger menu) on the top right corner of the grid.\n (Wiki docs)\n
\n
    \n
  • You can change the Grid Menu icon, for example "mdi-dots-vertical"    (which is shown in this example)
  • \n
  • By default the Grid Menu shows all columns which you can show/hide them
  • \n
  • You can configure multiple custom "commands" to show up in the Grid Menu and use the "onGridMenuCommand()" callback
  • \n
  • Doing a "right + click" over any column header will also provide a way to show/hide a column (via the Column Picker Plugin)
  • \n
  • You can change the icons of both picker via SASS variables as shown in this demo (check all SASS variables)
  • \n
  • You can also show the Grid Menu anywhere on your page
  • \n
\n ',this.subscriptions=[];this.translate.use("en"),this.selectedLanguage="en"}ngOnDestroy(){rd(this.subscriptions)}ngOnInit(){this.columnDefinitions=[{id:"title",name:"Title",field:"title",nameKey:"TITLE",filterable:!0,type:w.string},{id:"duration",name:"Duration",field:"duration",nameKey:"DURATION",sortable:!0,filterable:!0,type:w.string},{id:"percentComplete",name:"% Complete",field:"percentComplete",nameKey:"PERCENT_COMPLETE",sortable:!0,filterable:!0,type:w.number,formatter:j.percentCompleteBar,filter:{model:ie.compoundSlider,filterOptions:{hideSliderNumber:!1}}},{id:"start",name:"Start",field:"start",nameKey:"START",filterable:!0,type:w.string},{id:"finish",name:"Finish",field:"finish",nameKey:"FINISH",filterable:!0,type:w.string},{id:"effort-driven",name:"Completed",field:"effortDriven",nameKey:"COMPLETED",maxWidth:80,formatter:j.checkmarkMaterial,type:w.boolean,minWidth:100,sortable:!0,filterable:!0,filter:{collection:[{value:"",label:""},{value:!0,label:"true"},{value:!1,label:"false"}],model:ie.singleSelect}}],this.gridOptions={columnPicker:{hideForceFitButton:!0,hideSyncResizeButton:!0,onColumnsChanged:(e,a)=>{console.log("Column selection changed from Column Picker, visible columns: ",a.visibleColumns)}},enableAutoResize:!0,enableGridMenu:!0,autoResize:{container:"#demo-container",rightPadding:10},enableFiltering:!0,enableCellNavigation:!0,gridMenu:{menuUsabilityOverride:()=>!0,commandTitleKey:"CUSTOM_COMMANDS",iconCssClass:"mdi mdi-dots-vertical",hideForceFitButton:!0,hideSyncResizeButton:!0,hideToggleFilterCommand:!1,menuWidth:17,resizeOnShowHeaderRow:!0,subItemChevronClass:"mdi mdi-chevron-down mdi-rotate-270",commandItems:[{iconCssClass:"mdi mdi-help-circle",titleKey:"HELP",disabled:!1,command:"help",positionOrder:90,cssClass:"bold",textCssClass:"blue"},{divider:!0,command:"",positionOrder:89},{title:"Command 1",command:"command1",positionOrder:91,cssClass:"orange",iconCssClass:"mdi mdi-alert",action:(e,a)=>alert(a.command),itemUsabilityOverride:e=>!e||!Array.isArray(e.columns)||e.columns.length===e.visibleColumns.length},{title:"Command 2",command:"command2",positionOrder:92,cssClass:"red",textCssClass:"italic",action:(e,a)=>alert(a.command),itemVisibilityOverride:()=>!this.angularGrid||this.isObjectEmpty(this.angularGrid.filterService.getColumnFilters())},{title:"Disabled command",disabled:!0,command:"disabled-command",positionOrder:98},{command:"",divider:!0,positionOrder:98},{command:"export",title:"Exports",positionOrder:99,commandItems:[{command:"exports-txt",title:"Text (tab delimited)"},{command:"sub-menu",title:"Excel",cssClass:"green",subMenuTitle:"available formats",subMenuTitleCssClass:"text-italic orange",commandItems:[{command:"exports-csv",title:"Excel (csv)"},{command:"exports-xlsx",title:"Excel (xlsx)"}]}]},{command:"feedback",title:"Feedback",positionOrder:100,commandItems:[{command:"request-update",title:"Request update from supplier",iconCssClass:"mdi mdi-star",tooltip:"this will automatically send an alert to the shipping team to contact the user for an update"},"divider",{command:"sub-menu",title:"Contact Us",iconCssClass:"mdi mdi-account",subMenuTitle:"contact us...",subMenuTitleCssClass:"italic",commandItems:[{command:"contact-email",title:"Email us",iconCssClass:"mdi mdi-pencil-outline"},{command:"contact-chat",title:"Chat with us",iconCssClass:"mdi mdi-message-text-outline"},{command:"contact-meeting",title:"Book an appointment",iconCssClass:"mdi mdi-coffee"}]}]}],onCommand:(e,a)=>{const u=a.item?.command;u.includes("exports-")?alert("Exporting as "+a?.item.title):u.includes("contact-")||"help"===u?alert("Command: "+a.command):console.log("onGridMenuCommand",a.command)},onColumnsChanged:(e,a)=>{console.log("Column selection changed from Grid Menu, visible columns: ",a.visibleColumns)}},enableTranslate:!0,i18n:this.translate},this.getData()}angularGridReady(e){this.angularGrid=e}getData(){const e=[];for(let a=0;a<500;a++)e[a]={id:a,title:"Task "+a,phone:this.generatePhoneNumber(),duration:Math.round(25*Math.random())+" days",percentComplete:Math.round(100*Math.random()),start:"01/01/2009",finish:"01/05/2009",effortDriven:a%5==0};this.dataset=e}generatePhoneNumber(){let e="";for(let a=0;a<10;a++)e+=Math.round(9*Math.random())+"";return e}switchLanguage(){const e="en"===this.selectedLanguage?"fr":"en";this.subscriptions.push(this.translate.use(e).subscribe(()=>{this.selectedLanguage=e}))}toggleGridMenu(e){this.angularGrid&&this.angularGrid.extensionService&&this.angularGrid.extensionService.getExtensionInstanceByName(Ea.gridMenu).showGridMenu(e,{dropSide:"right"})}isObjectEmpty(e){for(const a in e)if(e.hasOwnProperty(a)&&""!==e[a])return!1;return!0}static#e=this.ctorParameters=()=>[{type:at}]};H9=Ze([ca({template:'
\n

\n {{title}}\n \n \n code\n \n \n

\n
\n\n \n \n\n Locale:\n {{selectedLanguage + \'.json\'}}\n \n\n
\n \n \n
\n
',encapsulation:Ga.None,styles:[nge()]}),Ct("design:paramtypes",[at])],H9);let V9=class{constructor(e,a){this.cd=e,this.http=a,this.title="Example 5: Grid connected to Backend Server with OData",this.subTitle='\n Sorting/Paging connected to a Backend OData Service (Docs).\n
\n
    \n
  • Only "Name" field is sortable for the demo (because we use JSON files), however "multiColumnSort: true" is also supported
  • \n
  • This example also demos the Grid State feature, open the console log to see the changes
  • \n
  • String column also support operator (>, >=, <, <=, <>, !=, =, ==, *)\n
      \n
    • The (*) can be used as startsWith (ex.: "abc*" => startsWith "abc") / endsWith (ex.: "*xyz" => endsWith "xyz")
    • \n
    • The other operators can be used on column type number for example: ">=100" (bigger or equal than 100)
    • \n
    \n
  • OData Service could be replaced by other Service type in the future (GraphQL or whichever you provide)
  • \n
  • You can also preload a grid with certain "presets" like Filters / Sorters / Pagination Docs - Grid Preset\n
  • NOTE: For demo purposes, the last column (filter & sort) will always throw an\n error and its only purpose is to demo what would happen when you encounter a backend server error\n (the UI should rollback to previous state before you did the action).\n Also changing Page Size to 50,000 will also throw which again is for demo purposes.\n
  • \n
\n ',this.dataset=[],this.isCountEnabled=!0,this.isSelectEnabled=!1,this.isExpandEnabled=!1,this.odataVersion=2,this.odataQuery="",this.processing=!0,this.errorStatus="",this.isPageErrorTest=!1,this.status={text:"processing...",class:"alert alert-danger"}}angularGridReady(e){this.angularGrid=e}ngOnInit(){this.columnDefinitions=[{id:"name",name:"Name",field:"name",sortable:!0,type:w.string,filterable:!0,filter:{model:ie.compoundInput,compoundOperatorList:[{operator:"",desc:"Contains"},{operator:"<>",desc:"Not Contains"},{operator:"=",desc:"Equals"},{operator:"!=",desc:"Not equal to"},{operator:"a*",desc:"Starts With"},{operator:"Custom",desc:"SQL Like"}]}},{id:"gender",name:"Gender",field:"gender",filterable:!0,sortable:!0,filter:{model:ie.singleSelect,collection:[{value:"",label:""},{value:"male",label:"male"},{value:"female",label:"female"}]}},{id:"company",name:"Company",field:"company",filterable:!0,sortable:!0},{id:"category_name",name:"Category",field:"category/name",filterable:!0,sortable:!0}],this.gridOptions={enableAutoResize:!0,autoResize:{container:"#demo-container",rightPadding:10},checkboxSelector:{hideInFilterHeaderRow:!1,hideInColumnTitleRow:!0},compoundOperatorAltTexts:{text:{Custom:{operatorAlt:"%%",descAlt:"SQL Like"}}},enableCellNavigation:!0,enableFiltering:!0,enableCheckboxSelector:!0,enableRowSelection:!0,enablePagination:!0,pagination:{pageSizes:[10,20,50,100,500,5e4],pageSize:20,totalItems:0},presets:{filters:[{columnId:"gender",searchTerms:["male"],operator:te.equal}],sorters:[{columnId:"name",direction:"asc"}],pagination:{pageNumber:2,pageSize:20}},backendServiceApi:{service:new dJ,options:{enableCount:this.isCountEnabled,enableSelect:this.isSelectEnabled,enableExpand:this.isExpandEnabled,filterQueryOverride:({fieldName:e,columnDef:a,columnFilterOperator:u,searchValues:i})=>{if(u===te.custom&&"name"===a?.id){let r=i[0].replace(/\*/g,".*");return r=r.slice(0,1)+"%5E"+r.slice(1),r=r.slice(0,-1)+"$'",`matchesPattern(${e}, ${r})`}},version:this.odataVersion},onError:e=>{this.errorStatus=e.message,this.displaySpinner(!1,!0)},preProcess:()=>{this.errorStatus="",this.displaySpinner(!0)},process:e=>this.getCustomerApiCall(e),postProcess:e=>{this.metrics=e.metrics,this.displaySpinner(!1),this.getCustomerCallback(e),this.cd.detectChanges()}}}}displaySpinner(e,a){this.processing=e,this.status=a?{text:"ERROR!!!",class:"alert alert-danger"}:e?{text:"loading",class:"alert alert-warning"}:{text:"finished",class:"alert alert-success"},this.cd.detectChanges()}getCustomerCallback(e){let a=e.totalRecordCount;this.isCountEnabled&&(a=4===this.odataVersion?e["@odata.count"]:e.d.__count),this.metrics&&(this.metrics.totalItemCount=a),this.paginationOptions={...this.gridOptions.pagination,totalItems:a},this.dataset=4===this.odataVersion?e.value:e.d.results,this.odataQuery=e.query}getCustomerApiCall(e){return this.getCustomerDataApiMock(e)}goToFirstPage(){this.angularGrid.paginationService.goToFirstPage()}goToLastPage(){this.angularGrid.paginationService.goToLastPage()}setFiltersDynamically(){this.angularGrid.filterService.updateFilters([{columnId:"name",searchTerms:["A"],operator:"a*"}])}setSortingDynamically(){this.angularGrid.sortService.updateSorting([{columnId:"name",direction:"DESC"}])}getCustomerDataApiMock(e){return new Promise((a,u)=>{const i=e.toLowerCase().split("&");let r,o=0,d="",h=100;const m={};if(this.isPageErrorTest)throw this.isPageErrorTest=!1,new Error("Server timed out trying to retrieve data for the last page");for(const g of i){if(g.includes("$top=")&&(r=+g.substring(5),5e4===r))throw new Error("Server timed out retrieving 50,000 rows");if(g.includes("$skip=")&&(o=+g.substring(6)),g.includes("$orderby=")&&(d=g.substring(9)),g.includes("$filter=")){const v=g.substring(8).replace("%20"," ");if(v.includes("matchespattern")){const k=new RegExp("matchespattern\\(([a-zA-Z]+),\\s'%5E(.*?)'\\)","i"),x=v.match(k)||[],D=x[1].trim();m[D]={type:"matchespattern",term:"^"+x[2].trim()}}if(v.includes("contains")){const k=v.match(/contains\(([a-zA-Z\/]+),\s?'(.*?)'/),x=k[1].trim();m[x]={type:"substring",term:k[2].trim()}}if(v.includes("substringof")){const k=v.match(/substringof\('(.*?)',\s([a-zA-Z\/]+)/),x=k[2].trim();m[x]={type:"substring",term:k[1].trim()}}for(const k of["eq","ne","le","lt","gt","ge"])if(v.includes(k)){const D=new RegExp(`([a-zA-Z ]*) ${k} '(.*?)'`).exec(v);if(Array.isArray(D)){const C=D[1].trim();m[C]={type:k,term:D[2].trim()}}}if(v.includes("startswith")&&v.includes("endswith")){const k=v.match(/startswith\(([a-zA-Z ]*),\s?'(.*?)'/)||[],x=v.match(/endswith\(([a-zA-Z ]*),\s?'(.*?)'/)||[],D=k[1].trim();m[D]={type:"starts+ends",term:[k[2].trim(),x[2].trim()]}}else if(v.includes("startswith")){const k=v.match(/startswith\(([a-zA-Z ]*),\s?'(.*?)'/),x=k[1].trim();m[x]={type:"starts",term:k[2].trim()}}else if(v.includes("endswith")){const k=v.match(/endswith\(([a-zA-Z ]*),\s?'(.*?)'/),x=k[1].trim();m[x]={type:"ends",term:k[2].trim()}}if(v.includes("company"))throw new Error('Server could not filter using the field "Company"')}}if(d.includes("company"))throw new Error('Server could not sort using the field "Company"');this.http.get("assets/data/customers_100.json").subscribe(g=>{let v=g;if(d?.length>0){const C=d.split(",");for(const F of C){const A=F.split(" "),z=A[0];let M=R=>R;for(const R of z.split("/")){const G=M;M=$=>G($)[R]}switch((A[1]??"asc").toLocaleLowerCase()){case"asc":v=v.sort((R,G)=>M(R).localeCompare(M(G)));break;case"desc":v=v.sort((R,G)=>M(G).localeCompare(M(R)))}}}let k=o,x=v;if(m){for(const C in m)m.hasOwnProperty(C)&&(x=x.filter(F=>{const A=m[C].type,z=m[C].term;let M=C;if(-1!==C?.indexOf(" ")){const G=C.split(" ");M=G[G.length-1]}let L,R=F;for(const G of M.split("/"))L=R[G],R=L;if(L){const[G,$]=Array.isArray(z)?z:[z];switch(A){case"eq":return L.toLowerCase()===G;case"ne":return L.toLowerCase()!==G;case"le":return L.toLowerCase()<=G;case"lt":return L.toLowerCase()G;case"ge":return L.toLowerCase()>=G;case"ends":return L.toLowerCase().endsWith(G);case"starts":return L.toLowerCase().startsWith(G);case"starts+ends":return L.toLowerCase().startsWith(G)&&L.toLowerCase().endsWith($);case"substring":return L.toLowerCase().includes(G);case"matchespattern":return new RegExp(G.replaceAll("%25",".*"),"i").test(L)}}}));h=x.length}k>x.length&&(e=e.replace(`$skip=${k}`,""),k=0);const D=x.slice(k,k+r);setTimeout(()=>{const C={query:e};this.isCountEnabled||(C.totalRecordCount=h),4===this.odataVersion?(C.value=D,this.isCountEnabled&&(C["@odata.count"]=h)):(C.d={results:D},this.isCountEnabled&&(C.d.__count=h)),a(C)},100)})})}gridStateChanged(e){console.log("Client sample, Grid State changed:: ",e.change)}throwPageChangeError(){this.isPageErrorTest=!0,this.angularGrid?.paginationService?.goToLastPage()}handleOnBeforeSort(e){return!0}handleOnBeforeSearchChange(e){return!0}handleOnBeforePaginationChange(e){return!0}changeCountEnableFlag(){return this.isCountEnabled=!this.isCountEnabled,this.resetOptions({enableCount:this.isCountEnabled}),!0}changeEnableSelectFlag(){return this.isSelectEnabled=!this.isSelectEnabled,this.resetOptions({enableSelect:this.isSelectEnabled}),!0}changeEnableExpandFlag(){return this.isExpandEnabled=!this.isExpandEnabled,this.resetOptions({enableExpand:this.isExpandEnabled}),!0}setOdataVersion(e){return this.odataVersion=e,this.resetOptions({version:this.odataVersion}),!0}resetOptions(e){this.displaySpinner(!0);const a=this.gridOptions.backendServiceApi.service;a.updateOptions(e),a.clearFilters(),this.angularGrid?.filterService.clearFilters()}static#e=this.ctorParameters=()=>[{type:Xu},{type:jt}]};V9=Ze([ca({template:'
\n

\n {{title}}\n \n \n code\n \n \n

\n
\n
\n
\n
\n
\n
\n Backend Error: \n
\n
\n
\n\n
\n
\n
\n Status: {{status.text}}\n \n \n \n
\n
\n
\n
\n OData Query: {{odataQuery}}\n
\n
\n
\n\n
\n
\n \n \n
\n \n Metrics: {{metrics.endTime | date: \'yyyy-MM-dd hh:mm aaaaa\\\'m\\\'\'}} | {{metrics.executionTime}}ms\n | {{metrics.totalItemCount}} items\n \n
\n\n
\n \n \n \n \n \n \n \n \n
\n
\n
\n
\n \n\n \n \n
\n \n \n
\n
\n
\n
\n\n \n \n
'}),Ct("design:paramtypes",[Xu,jt])],V9);function _f(t,e){return Math.floor(Math.random()*(e-t+1)+t)}const cge=(t,e,a,u,i,r)=>r.getOptions().i18n.instant("TASK_X",{x:a});let O9=class{constructor(e){this.translate=e,this.title="Example 25: Filtering from Range of Search Values",this.subTitle='\n This demo shows how to use Filters with Range of Search Values (Wiki docs)\n
\n
    \n
  • All input filters support the following operators: (>, >=, <, <=, <>, !=, =, ==, *) and now also the (..) for an input range
  • \n
  • All filters (which support ranges) can be defined via the 2 dots (..) which represents a range, this also works for dates and slider in the "presets"
  • \n
      \n
    • For a numeric range defined in an input filter (must be of type text), you can use 2 dots (..) to represent a range
    • \n
    • example: typing "10..90" will filter values between 10 and 90 (but excluding the number 10 and 90)
    • \n
    \n
      \n
    • note that the examples shown below for the operator, are case sensitive
    • \n
    • by default the range is inclusive which would be the same as defining the filter options to "operator: \'RangeInclusive\'" or "operator: OperatoryType.rangeInclusive"
    • \n
    • you can also set the inverse (exclusive) by defining the filter options to "operator: \'RangeExclusive\'" or "operator: OperatoryType.rangeExclusive"
    • \n
    \n
  • Date Range with Vanilla Calendar Date Picker, they will also use the locale, choose a start date then drag or click on the end date
  • \n
\n ',this.subscriptions=[],this.filterList=[{value:"",label:""},{value:"currentYearTasks",label:"Current Year Completed Tasks"},{value:"nextYearTasks",label:"Next Year Active Tasks"}];this.translate.use("en"),this.selectedLanguage="en"}ngOnDestroy(){rd(this.subscriptions)}ngOnInit(){this.columnDefinitions=[{id:"title",name:"Title",field:"id",nameKey:"TITLE",minWidth:100,formatter:cge,sortable:!0,filterable:!0,params:{useFormatterOuputToFilter:!0}},{id:"description",name:"Description",field:"description",filterable:!0,sortable:!0,minWidth:80,type:w.string,filter:{model:WT,enableTrimWhiteSpace:!0}},{id:"percentComplete",name:"% Complete",field:"percentComplete",nameKey:"PERCENT_COMPLETE",minWidth:120,sortable:!0,customTooltip:{position:"center"},formatter:j.progressBar,type:w.number,filterable:!0,filter:{model:ie.sliderRange,maxValue:100,operator:te.rangeInclusive,filterOptions:{hideSliderNumbers:!1,min:0,step:5}}},{id:"start",name:"Start",field:"start",nameKey:"START",formatter:j.dateIso,sortable:!0,minWidth:75,width:100,exportWithFormatter:!0,type:w.date,filterable:!0,filter:{model:ie.compoundDate}},{id:"finish",name:"Finish",field:"finish",nameKey:"FINISH",formatter:j.dateIso,sortable:!0,minWidth:75,width:120,exportWithFormatter:!0,type:w.date,filterable:!0,filter:{model:ie.dateRange}},{id:"duration",field:"duration",nameKey:"DURATION",maxWidth:90,type:w.number,sortable:!0,filterable:!0,filter:{model:ie.input,operator:te.rangeExclusive}},{id:"completed",name:"Completed",field:"completed",nameKey:"COMPLETED",minWidth:85,maxWidth:90,formatter:j.checkmarkMaterial,exportWithFormatter:!0,filterable:!0,filter:{collection:[{value:"",label:""},{value:!0,label:"True"},{value:!1,label:"False"}],model:ie.singleSelect,filterOptions:{autoAdjustDropHeight:!0}}}];const e=new Date,a=Pi(K2(new Date,-2),"YYYY-MM-DD"),u=Pi(K2(new Date,e.getDate()<14?28:25),"YYYY-MM-DD");this.gridOptions={autoResize:{container:"#demo-container",rightPadding:10},enableExcelCopyBuffer:!0,enableFiltering:!0,enableTranslate:!0,i18n:this.translate,presets:{filters:[{columnId:"duration",searchTerms:["4..88"]},{columnId:"percentComplete",operator:"RangeInclusive",searchTerms:[5,80]},{columnId:"finish",operator:"RangeInclusive",searchTerms:[a,u]}],sorters:[{columnId:"percentComplete",direction:"DESC"},{columnId:"duration",direction:"ASC"}]},externalResources:[new W7,new Ao]},this.dataset=this.mockData(1500)}angularGridReady(e){this.angularGrid=e}mockData(e,a=0){const u=[];for(let i=a;i=0&&setTimeout(()=>{this.metrics={startTime:new Date,itemCount:a&&a.current||0,totalItemCount:this.dataset.length||0}})}setFiltersDynamically(){const e=Pi(K2(new Date,-5),"YYYY-MM-DD"),a=Pi(K2(new Date,25),"YYYY-MM-DD");this.angularGrid.filterService.updateFilters([{columnId:"duration",searchTerms:["14..78"],operator:"RangeInclusive"},{columnId:"percentComplete",operator:"RangeExclusive",searchTerms:[15,85]},{columnId:"finish",operator:"RangeInclusive",searchTerms:[e,a]}])}setSortingDynamically(){this.angularGrid.sortService.updateSorting([{columnId:"finish",direction:"DESC"},{columnId:"percentComplete",direction:"ASC"}])}usePredefinedFilter(e){let a=[];const u=(new Date).getFullYear();switch(e){case"currentYearTasks":a=[{columnId:"finish",operator:te.rangeInclusive,searchTerms:[`${u}-01-01`,`${u}-12-31`]},{columnId:"completed",operator:te.equal,searchTerms:[!0]}];break;case"nextYearTasks":a=[{columnId:"start",operator:">=",searchTerms:[`${u+1}-01-01`]}]}this.angularGrid.filterService.updateFilters(a)}switchLanguage(){const e="en"===this.selectedLanguage?"fr":"en";this.subscriptions.push(this.translate.use(e).subscribe(()=>{this.selectedLanguage=e}))}static#e=this.ctorParameters=()=>[{type:at}]};O9=Ze([ca({template:'
\n

\n {{title}}\n \n \n code\n \n \n

\n
\n\n
\n\n \n Metrics: {{metrics.startTime | date: \'yyyy-MM-dd hh:mm aaaaa\\\'m\\\'\'}} | {{metrics.itemCount}} of\n {{metrics.totalItemCount}} items\n \n\n
\n
\n \n
\n
\n \n
\n
\n \n
\n
\n \n
\n
\n \n
\n
\n \n
\n
\n\n
\n
\n \n Locale: {{selectedLanguage + \'.json\'}}\n
\n
\n\n \n \n
'}),Ct("design:paramtypes",[at])],O9);const mge=(t,e,a,u,i)=>i&&i.brand&&i.brand.name||"",pge=(t,e,a,u,i)=>{let r="";return i&&i.octopart_url&&i.mpn&&(r=`${i.mpn}`),r};let j9=class{constructor(){this._eventHandler=new Ut,this.title="Example 18: Octopart Catalog Search - Remote Model Plugin",this.subTitle='\n This example demonstrates how to use "slick.remotemodel.js" or any Remote implementation through an external Remote Service\n
    \n
  • \n Your browser (Chrome) might block access to the Octopart query, if you get "block content" then just unblock it\n or try with different browser like Firefox or Edge\n
  • \n
  • If the demo throws some errors, try again later (there\'s a limit per day).
  • \n
  • \n Uses slick.remotemodel.js\n which is hooked up to load search results from Octopart, but can easily be extended\n to support any JSONP-compatible backend that accepts paging parameters.\n
  • \n
  • \n This demo implements a custom DataView, however please note that you are on your own to implement all necessary DataView methods\n for Sorting, Filtering, etc...\n
  • \n
  • \n Soure code for this example is available here\n
  • \n
\n ',this.dataset=[],this.loading=!1,this.search=""}angularGridReady(e){this.angularGrid=e,this.gridObj=e.slickGrid,this.loaderDataView?.setSort("score",-1),this.gridObj?.setSortColumn("score",!1),this.gridObj.onViewportChanged.notify()}ngOnDestroy(){this._eventHandler.unsubscribeAll()}ngOnInit(){this.defineGrid(),this.hookAllLoaderEvents()}defineGrid(){this.columnDefinitions=[{id:"mpn",name:"MPN",field:"mpn",formatter:pge,width:100,sortable:!0},{id:"brand",name:"Brand",field:"brand.name",formatter:mge,width:100,sortable:!0},{id:"short_description",name:"Description",field:"short_description",width:520}],this.gridOptions={enableAutoResize:!0,autoResize:{container:"#demo-container",rightPadding:10},enableCellNavigation:!0,enableColumnReorder:!1,enableGridMenu:!1,multiColumnSort:!1}}hookAllLoaderEvents(){this._eventHandler&&this._eventHandler.subscribe&&this.loaderDataView&&this.loaderDataView.onDataLoading&&this.loaderDataView.onDataLoaded&&(this._eventHandler.subscribe(this.loaderDataView.onDataLoading,(e,a)=>{this.loading=!0}),this._eventHandler.subscribe(this.loaderDataView.onDataLoaded,(e,a)=>{if(a&&this.gridObj&&this.gridObj.invalidateRow&&this.gridObj.updateRowCount&&this.gridObj.render){for(let u=a.from;u<=a.to;u++)this.gridObj.invalidateRow(u);this.gridObj.updateRowCount(),this.gridObj.render(),this.loading=!1}}))}onSort(e,a){if(this.gridObj&&this.gridObj.getViewport&&this.loaderDataView&&this.loaderDataView.ensureData&&this.loaderDataView.setSort){const u=this.gridObj.getViewport();a&&a.sortCol&&a.sortCol.field&&this.loaderDataView.setSort(a.sortCol.field,a.sortAsc?1:-1),this.loaderDataView.ensureData(u.top,u.bottom)}}onViewportChanged(){if(this.gridObj&&this.gridObj.getViewport&&this.loaderDataView&&this.loaderDataView.ensureData){const e=this.gridObj.getViewport();this.loaderDataView.ensureData(e.top,e.bottom)}}searchChanged(e){if(e&&this.gridObj&&this.gridObj.getViewport&&this.loaderDataView&&this.loaderDataView.ensureData&&this.loaderDataView.setSearch){const a=this.gridObj.getViewport();this.loaderDataView.setSearch(e),this.loaderDataView.ensureData(a.top,a.bottom)}}static#e=this.ctorParameters=()=>[]};j9=Ze([ca({template:'
\n

\n {{title}}\n \n \n code\n \n \n

\n
\n\n
\n \n \n
\n\n \n\n \n\n \n \n
'}),Ct("design:paramtypes",[])],j9);var Ege=O(110),vge=O.n(Ege);const xge=(t,e,a,u,i,r)=>(a=a??"",(r&&r.getOptions&&r.getOptions()).editable&&u.editor?{text:a,addClasses:"editable-field",toolTip:"Click to Edit"}:a),fge=t=>null!=t&&t.length?/^(task\s\d+)*$/i.test(t)?{valid:!0,msg:""}:{valid:!1,msg:'Your title is invalid, it must start with "Task" followed by a number.'}:{valid:!1,msg:"This is a required field."};let G9=class{constructor(e){this.http=e,this.title="Example 31: Columns Resize by Content",this.subTitle='The grid below uses the optional resize by cell content (with a fixed 950px for demo purposes), you can click on the 2 buttons to see the difference. The "autosizeColumns" is really the default option used by Angular-SlickGrid, the resize by cell content is optional because it requires to read the first thousand rows and do extra width calculation.',this.columnDefinitions=[],this.dataset=[],this.editQueue=[],this.editedItems={},this.isUsingDefaultResize=!1,this.isGridEditable=!0,this.isMassSelectionDisabled=!0,this.complexityLevelList=[{value:0,label:"Very Simple"},{value:1,label:"Simple"},{value:2,label:"Straightforward"},{value:3,label:"Complex"},{value:4,label:"Very Complex"}]}angularGridReady(e){this.angularGrid=e}ngOnInit(){this.defineGrid(),this.dataset=this.loadData(400)}defineGrid(){this.columnDefinitions=[{id:"title",name:"Title",field:"title",sortable:!0,type:w.string,minWidth:65,resizeExtraWidthPadding:4,resizeCharWidthInPx:7.6,resizeCalcWidthRatio:1,resizeMaxWidthThreshold:200,columnGroup:"Common Factor",cssClass:"text-uppercase fw-bold",filterable:!0,filter:{model:ie.inputText,filterPredicate:(e,a)=>{const u=a.parsedSearchTerms||[];if(u?.length){const i=a.columnId,r=u[0],o=e[i].toLowerCase(),d=r.matchAll(/^%([^%\r\n]+)[^%\r\n]*$|(.*)%(.+)%(.*)|(.+)%(.+)|([^%\r\n]+)%$/gi),h=Array.from(d),m=h.length?h[0]:[],[g,v,k,x,D,C,F,A]=m;return v?o.endsWith(v.toLowerCase()):k&&x?o.startsWith(k.toLowerCase())&&o.includes(x.toLowerCase()):x&&D?o.includes(x)&&o.endsWith(D.toLowerCase()):x&&!D?o.includes(x.toLowerCase()):C&&F?o.startsWith(C.toLowerCase())&&o.endsWith(F.toLowerCase()):A?o.startsWith(A.toLowerCase()):o.includes(r.toLowerCase())}return!0}},editor:{model:qe.longText,required:!0,alwaysSaveOnEnterKey:!0,maxLength:12,editorOptions:{cols:45,rows:6,buttonTexts:{cancel:"Close",save:"Done"}},validator:fge}},{id:"duration",name:"Duration",field:"duration",sortable:!0,filterable:!0,minWidth:65,type:w.number,columnGroup:"Common Factor",formatter:(e,a,u)=>null==u||""===u?"":u>1?`${u} days`:`${u} day`,editor:{model:qe.float,decimal:2,valueStep:1,minValue:0,maxValue:1e4,alwaysSaveOnEnterKey:!0,required:!0}},{id:"cost",name:"Cost",field:"cost",minWidth:65,sortable:!0,filterable:!0,type:w.number,columnGroup:"Analysis",filter:{model:ie.compoundInputNumber},formatter:j.dollar},{id:"percentComplete",name:"% Complete",field:"percentComplete",minWidth:100,type:w.number,sortable:!0,filterable:!0,columnGroup:"Analysis",filter:{model:ie.compoundSlider,operator:">="},editor:{model:qe.slider,minValue:0,maxValue:100}},{id:"complexity",name:"Complexity",field:"complexity",resizeCalcWidthRatio:.82,sortable:!0,filterable:!0,columnGroup:"Analysis",formatter:(e,a,u)=>this.complexityLevelList[u]?.label,exportCustomFormatter:(e,a,u)=>this.complexityLevelList[u]?.label,filter:{model:ie.multipleSelect,collection:this.complexityLevelList},editor:{model:qe.singleSelect,collection:this.complexityLevelList}},{id:"start",name:"Start",field:"start",sortable:!0,formatter:j.dateUs,columnGroup:"Period",exportCustomFormatter:j.dateUs,type:w.date,outputType:w.dateUs,saveOutputType:w.dateUtc,filterable:!0,filter:{model:ie.compoundDate},editor:{model:qe.date,params:{hideClearButton:!1}}},{id:"completed",name:"Completed",field:"completed",width:80,minWidth:75,maxWidth:100,cssClass:"text-center",columnGroup:"Period",formatter:j.checkmarkMaterial,exportWithFormatter:!1,filterable:!0,sortable:!0,filter:{collection:[{value:"",label:""},{value:!0,label:"True"},{value:!1,label:"False"}],model:ie.singleSelect},editor:{model:qe.checkbox}},{id:"finish",name:"Finish",field:"finish",sortable:!0,formatter:j.dateUs,columnGroup:"Period",type:w.date,outputType:w.dateUs,saveOutputType:w.dateUtc,filterable:!0,filter:{model:ie.compoundDate},exportCustomFormatter:j.dateUs,editor:{model:qe.date,editorOptions:{range:{min:"today"}},validator:(e,a)=>{const u=a&&a.item;return u&&u.completed&&!e?{valid:!1,msg:'You must provide a "Finish" date when "Completed" is checked.'}:{valid:!0,msg:""}}}},{id:"product",name:"Product",field:"product",filterable:!0,columnGroup:"Item",minWidth:100,resizeCharWidthInPx:8,exportWithFormatter:!0,dataKey:"id",labelKey:"itemName",formatter:j.complexObject,exportCustomFormatter:j.complex,type:w.object,sortComparer:ul.objectString,editor:{model:qe.autocompleter,alwaysSaveOnEnterKey:!0,editorOptions:{minLength:1,fetch:(e,a)=>{a(this.mockProducts().filter(i=>i.itemName.toLowerCase().includes(e.toLowerCase())))},renderItem:{layout:"fourCorners",templateCallback:e=>this.renderItemCallbackWith4Corners(e)}}},filter:{model:ie.inputText,type:w.string,queryField:"product.itemName"}},{id:"origin",name:"Country of Origin",field:"origin",formatter:j.complexObject,columnGroup:"Item",exportCustomFormatter:j.complex,dataKey:"code",labelKey:"name",type:w.object,sortComparer:ul.objectString,filterable:!0,sortable:!0,minWidth:100,editor:{model:qe.autocompleter,customStructure:{label:"name",value:"code"},collectionAsync:this.http.get("assets/data/countries.json")},filter:{model:ie.inputText,type:w.string,queryField:"origin.name"}},{id:"action",name:"Action",field:"action",width:70,minWidth:70,maxWidth:70,excludeFromExport:!0,formatter:()=>'
',cellMenu:{hideCloseButton:!1,commandTitle:"Commands",commandItems:[{command:"help",title:"Help!",iconCssClass:"mdi mdi-help-circle",positionOrder:66,action:()=>alert("Please Help!")},"divider",{command:"delete-row",title:"Delete Row",positionOrder:64,iconCssClass:"mdi mdi-close color-danger",cssClass:"red",textCssClass:"text-italic color-danger-light",itemVisibilityOverride:e=>!e.dataContext?.completed,action:(e,a)=>{const u=a.dataContext;confirm(`Do you really want to delete row (${(a?.row??0)+1}) with "${u.title}"`)&&this.angularGrid.gridService.deleteItemById(u.id)}}]}}],this.gridOptions={editable:!0,autoAddCustomEditorFormatter:xge,enableCellNavigation:!0,autoEdit:!0,autoCommitEdit:!0,autoResize:{container:"#smaller-container",rightPadding:10},enableAutoResize:!0,enablePagination:!0,pagination:{pageSize:10,pageSizes:[10,200,500,5e3]},autoFitColumnsOnFirstLoad:!1,enableAutoSizeColumns:!1,autosizeColumnsByCellContentOnFirstLoad:!0,enableAutoResizeColumnsByCellContent:!0,resizeByContentOptions:{defaultRatioForStringType:.92,formatterPaddingWidthInPx:8},enableExcelExport:!0,excelExportOptions:{exportWithFormatter:!1},externalResources:[new Ao],enableFiltering:!0,enableRowSelection:!0,enableCheckboxSelector:!0,checkboxSelector:{hideInFilterHeaderRow:!1,hideInColumnTitleRow:!0},rowSelectionOptions:{selectActiveRow:!1},createPreHeaderPanel:!0,showPreHeaderPanel:!0,preHeaderPanelHeight:28,rowHeight:33,headerRowHeight:35,editCommandHandler:(e,a,u)=>{const i=Array.isArray(u.prevSerializedValue)?u.prevSerializedValue:[u.prevSerializedValue],r=Array.isArray(u.serializedValue)?u.serializedValue:[u.serializedValue],o=this.columnDefinitions.filter(h=>void 0!==h.editor),d=[];i.forEach((h,m)=>{if(i[m]!==r[m]){const k=Array.isArray(u.prevSerializedValue)?o[m]:a;this.editedItems[this.gridOptions.datasetIdPropertyName||"id"]=e,this.angularGrid.slickGrid.invalidate(),u.execute(),this.renderUnsavedCellStyling(e,k,u),d.push(k)}}),this.editQueue.push({item:e,columns:d,editCommand:u})},enableCellMenu:!0}}loadData(e){const a=[];for(let u=0;u100?u>5?100:88:v,x=100===k;a[u]={id:u,title:"Task "+u,duration:Math.floor(100*Math.random())+10,percentComplete:k,analysis:{percentComplete:k},complexity:u%3?0:2,start:new Date(r,d,h,h,m,m,m),finish:x||u%3==0&&g>new Date&&u>3?x?new Date:g:"",cost:u%33==0?null:Math.round(1e4*Math.random())/100,completed:x||u%3==0&&g>new Date&&u>3,product:{id:this.mockProducts()[i]?.id,itemName:this.mockProducts()[i]?.itemName},origin:u%2?{code:"CA",name:"Canada"}:{code:"US",name:"United States"}},u%8||(delete a[u].finish,delete a[u].percentComplete)}return a}handleValidationError(e,a){return a.validationResults&&alert(a.validationResults.msg),!1}handleItemDeleted(e,a){console.log("item deleted with id:",a.itemId)}handleOnBeforeEditCell(e,a){const{column:u,item:i,grid:r}=a;return u&&i&&!function kge(t,e,a){const u=a&&a.getOptions&&a.getOptions(),i=e.editor;let o=!(!u.editable||!i);t&&e&&u&&u.editable&&"finish"===e.id&&(o=!!t?.completed);return o}(i,u,r)&&e.preventDefault(),!1}handleOnCellChange(e,a){const u=a?.item;u&&!u.completed&&(u.finish=null,this.angularGrid.gridService.updateItem(u))}handlePaginationChanged(){this.removeAllUnsavedStylingFromCell(),this.renderUnsavedStylingOnAllVisibleCells()}handleDefaultResizeColumns(){const e=this.angularGrid.slickGrid.getColumns();e.forEach(a=>a.width=a.originalWidth),this.angularGrid.slickGrid.setColumns(e),this.angularGrid.slickGrid.autosizeColumns(),this.isUsingDefaultResize=!0}handleNewResizeColumns(){this.angularGrid.resizerService.resizeColumnsByCellContent(!0),this.isUsingDefaultResize=!1}handleOnSelectedRowIdsChanged(e){console.log("Selected Ids:",e.selectedRowIds)}toggleGridEditReadonly(){this.undoAllEdits(),this.isGridEditable=!this.isGridEditable,this.isGridEditable||(this.isMassSelectionDisabled=!0),this.angularGrid.slickGrid.setOptions({editable:this.isGridEditable})}removeUnsavedStylingFromCell(e,a,u){this.angularGrid.slickGrid.removeCellCssStyles(`unsaved_highlight_${[a.id]}${u}`)}removeAllUnsavedStylingFromCell(){for(const e of this.editQueue){const a=e?.editCommand;if(a)for(const u of e.columns)this.removeUnsavedStylingFromCell(e.item,u,a.row)}}renderUnsavedStylingOnAllVisibleCells(){for(const e of this.editQueue)if(e){const{item:a,columns:u,editCommand:i}=e;Array.isArray(u)&&u.forEach(r=>{this.renderUnsavedCellStyling(a,r,i)})}}renderUnsavedCellStyling(e,a,u){if(u&&e&&a){const i=this.angularGrid.dataView.getRowByItem(e);if(i>=0){const r={[i]:{[a.id]:"unsaved-editable-field"}};this.angularGrid.slickGrid.setCellCssStyles(`unsaved_highlight_${[a.id]}${i}`,r)}}}setSelectedRowIds(){this.angularGrid.dataView?.setSelectedIds([3,4,11])}saveAll(){console.log(this.editQueue),console.log(this.editedItems),this.removeAllUnsavedStylingFromCell(),this.editQueue=[],this.editedItems={}}undoLastEdit(e=!1){const a=this.editQueue.pop(),u=a?.editCommand;if(a&&u&&td.cancelCurrentEdit()){u.undo();for(const i of a.columns)this.removeUnsavedStylingFromCell(a.item,i,u.row);this.angularGrid.slickGrid.invalidate(),e&&this.angularGrid?.slickGrid.gotoCell(u.row,u.cell,!1)}}undoAllEdits(){for(const e of this.editQueue){const a=e?.editCommand;if(a&&td.cancelCurrentEdit()){a.undo();for(const u of e.columns)this.removeUnsavedStylingFromCell(e.item,u,a.row)}}this.angularGrid.slickGrid.invalidate(),this.editQueue=[]}mockProducts(){return[{id:0,itemName:"Sleek Metal Computer",itemNameTranslated:"some fantastic sleek metal computer description",listPrice:2100.23,itemTypeName:"I",image:"http://i.stack.imgur.com/pC1Tv.jpg",icon:`mdi ${this.getRandomIcon(0)}`},{id:1,itemName:"Tasty Granite Table",itemNameTranslated:"an extremely huge and heavy table",listPrice:3200.12,itemTypeName:"I",image:"https://i.imgur.com/Fnm7j6h.jpg",icon:`mdi ${this.getRandomIcon(1)}`},{id:2,itemName:"Awesome Wooden Mouse",itemNameTranslated:"super old mouse",listPrice:15,itemTypeName:"I",image:"https://i.imgur.com/RaVJuLr.jpg",icon:`mdi ${this.getRandomIcon(2)}`},{id:3,itemName:"Gorgeous Fresh Shirt",itemNameTranslated:"what a gorgeous shirt seriously",listPrice:25.76,itemTypeName:"I",image:"http://i.stack.imgur.com/pC1Tv.jpg",icon:`mdi ${this.getRandomIcon(3)}`},{id:4,itemName:"Refined Cotton Table",itemNameTranslated:"super light table that will fall apart amazingly fast",listPrice:13.35,itemTypeName:"I",image:"https://i.imgur.com/Fnm7j6h.jpg",icon:`mdi ${this.getRandomIcon(4)}`},{id:5,itemName:"Intelligent Wooden Pizza",itemNameTranslated:"wood not included",listPrice:23.33,itemTypeName:"I",image:"https://i.imgur.com/RaVJuLr.jpg",icon:`mdi ${this.getRandomIcon(5)}`},{id:6,itemName:"Licensed Cotton Chips",itemNameTranslated:"not sure what that is",listPrice:71.21,itemTypeName:"I",image:"http://i.stack.imgur.com/pC1Tv.jpg",icon:`mdi ${this.getRandomIcon(6)}`},{id:7,itemName:"Ergonomic Rubber Soap",itemNameTranslated:"so good you'll want to use it every night",listPrice:2.43,itemTypeName:"I",image:"https://i.imgur.com/Fnm7j6h.jpg",icon:`mdi ${this.getRandomIcon(7)}`},{id:8,itemName:"Handcrafted Steel Car",itemNameTranslated:"aka tesla truck",listPrice:31288.39,itemTypeName:"I",image:"https://i.imgur.com/RaVJuLr.jpg",icon:`mdi ${this.getRandomIcon(8)}`}]}getRandomIcon(e){const a=["mdi-arrow-collapse","mdi-arrow-expand","mdi-cancel","mdi-check","mdi-checkbox-blank-outline","mdi-check-box-outline","mdi-checkbox-marked","mdi-close","mdi-close-circle","mdi-close-circle-outline","mdi-close-thick","mdi-content-copy","mdi-database-refresh","mdi-download","mdi-file-document-outline","mdi-file-excel-outline","mdi-file-music-outline","mdi-file-pdf-outline","mdi-filter-remove-outline","mdi-flip-vertical","mdi-folder","mdi-folder-open","mdi-help-circle","mdi-help-circle-outline","mdi-history","mdi-information","mdi-information-outline","mdi-link","mdi-link-variant","mdi-menu","mdi-microsoft-excel","mdi-minus","mdi-page-first","mdi-page-last","mdi-paperclip","mdi-pin-off-outline","mdi-pin-outline","mdi-playlist-plus","mdi-playlist-remove","mdi-plus","mdi-redo","mdi-refresh","mdi-shape-square-plus","mdi-sort-ascending","mdi-sort-descending","mdi-swap-horizontal","mdi-swap-vertical","mdi-sync","mdi-table-edit","mdi-table-refresh","mdi-undo"],u=Math.floor(Math.random()*a.length-1);return a[e??u]}renderItemCallbackWith2Rows(e){return`
\n
\n \x3c!----\x3e\n \n
\n
\n \n \n ${e.itemName}\n \n
\n
\n
\n
${e.itemNameTranslated}
\n
`}renderItemCallbackWith4Corners(e){return`
\n
\n \x3c!----\x3e\n \n
\n
\n \n \n ${e.itemName}\n \n ${Mu(e.listPrice,2,2,!1,"$")}\n
\n
\n
\n
${e.itemNameTranslated}
\n Type: ${"I"===e.itemTypeName?"Item":"C"===e.itemTypeName?"PdCat":"Cat"}\n
`}static#e=this.ctorParameters=()=>[{type:jt}]};G9=Ze([ca({template:'
\n

\n {{title}}\n \n \n code\n \n \n

\n
\n\n

Container Width (950px)

\n\n
\n
\n
\n \n \n
\n
\n\n
\n
\n \n \n \n \n
\n
\n
\n\n
\n \n \n
\n
',encapsulation:Ga.None,styles:[vge()]}),Ct("design:paramtypes",[jt])],G9);var Cge=O(569),yge=O.n(Cge),_ge=O(593),Fge=O.n(_ge);let K9=class{alertAssignee(e){alert("string"==typeof e?`Assignee on this task is: ${e.toUpperCase()}`:"No one is assigned to this task.")}deleteRow(e){confirm(`Are you sure that you want to delete ${e.title}?`)&&(this.addon.collapseAll(),this.dataView.deleteItem(e.rowId),this.parent.showFlashMessage(`Deleted row with ${e.title}`,"danger"))}callParentMethod(e){this.parent.showFlashMessage(`We just called Parent Method from the Row Detail Child Component on ${e.title}`)}};K9=Ze([ca({template:'
\n

{{model?.title}}

\n
\n
\n
{{model?.reporter}}
\n
{{model?.duration | number : \'1.2-2\'}}
\n
{{model?.percentComplete}}
\n
\n\n
\n
{{model?.start | date: \'yyyy-MM-dd\'}}
\n
{{model?.finish | date: \'yyyy-MM-dd\'}}
\n
\n
\n\n
\n\n
\n

\n Find out who is the Assignee\n \n \n \n

\n
\n
\n \n \n
\n
\n',styles:[yge(),Fge()]})],K9);let W9=class{};W9=Ze([ca({template:'

\n \n Loading...\n

'})],W9);let U9=class{constructor(){this._darkMode=!1,this.title="Example 21: Row Detail View",this.subTitle='\n Add functionality to show extra information with a Row Detail View, (Wiki docs)\n
    \n
  • Click on the row "+" icon or anywhere on the row to open it (the latter can be changed via property "useRowClick: false")
  • \n
  • Pass a View/Model as a Template to the Row Detail
  • \n
  • You can use "expandableOverride()" callback to override logic to display expand icon on every row (for example only show it every 2nd row)
  • \n
\n ',this.columnDefinitions=[],this.dataset=[],this.detailViewRowCount=9,this.flashAlertType="info",this.message=""}angularGridReady(e){this.angularGrid=e}get rowDetailInstance(){return this.angularGrid.extensions.rowDetailView?.instance||{}}ngOnInit(){this.defineGrid()}ngOnDestroy(){document.querySelector(".panel-wm-content").classList.remove("dark-mode"),document.querySelector("#demo-container").dataset.bsTheme="light"}defineGrid(){this.columnDefinitions=[{id:"title",name:"Title",field:"title",sortable:!0,type:w.string,width:70,filterable:!0,editor:{model:qe.text}},{id:"duration",name:"Duration (days)",field:"duration",formatter:j.decimal,params:{minDecimal:1,maxDecimal:2},sortable:!0,type:w.number,minWidth:90,filterable:!0},{id:"percent2",name:"% Complete",field:"percentComplete2",editor:{model:qe.slider},formatter:j.progressBar,type:w.number,sortable:!0,minWidth:100,filterable:!0,filter:{model:ie.slider,operator:">"}},{id:"start",name:"Start",field:"start",formatter:j.dateIso,sortable:!0,type:w.date,minWidth:90,exportWithFormatter:!0,filterable:!0,filter:{model:ie.compoundDate}},{id:"finish",name:"Finish",field:"finish",formatter:j.dateIso,sortable:!0,type:w.date,minWidth:90,exportWithFormatter:!0,filterable:!0,filter:{model:ie.compoundDate}},{id:"effort-driven",name:"Effort Driven",field:"effortDriven",minWidth:100,formatter:j.checkmarkMaterial,type:w.boolean,filterable:!0,sortable:!0,filter:{collection:[{value:"",label:""},{value:!0,label:"True"},{value:!1,label:"False"}],model:ie.singleSelect}}],this.gridOptions={autoResize:{container:"#demo-container",rightPadding:10},enableFiltering:!0,enableRowDetailView:!0,darkMode:this._darkMode,datasetIdPropertyName:"rowId",rowDetailView:{process:e=>this.simulateServerAsyncCall(e),loadOnce:!0,singleRowExpand:!1,useRowClick:!0,panelRows:this.detailViewRowCount,preloadComponent:W9,viewComponent:K9,parent:this,onBeforeRowDetailToggle:(e,a)=>(console.log("before toggling row detail",a.item),!0)},rowSelectionOptions:{selectActiveRow:!0}},this.getData()}getData(){const e=[];for(let a=0;a<1e3;a++){const u=2e3+Math.floor(10*Math.random()),i=Math.floor(11*Math.random()),r=Math.floor(29*Math.random()),o=Math.round(100*Math.random());e[a]={rowId:a,title:"Task "+a,duration:a%33==0?null:100*Math.random()+"",percentComplete:o,percentComplete2:o,percentCompleteNumber:o,start:new Date(u,i,r),finish:new Date(u,i+1,r),effortDriven:a%5==0}}this.dataset=e}changeDetailViewRowCount(){if(this.angularGrid?.extensionService){const e=this.rowDetailInstance.getOptions();e?.panelRows&&(e.panelRows=this.detailViewRowCount,this.rowDetailInstance.setOptions(e))}}changeEditableGrid(){return this.rowDetailInstance.collapseAll(),this.rowDetailInstance.addonOptions.useRowClick=!1,this.gridOptions.autoCommitEdit=!this.gridOptions.autoCommitEdit,this.angularGrid?.slickGrid.setOptions({editable:!0,autoEdit:!0,enableCellNavigation:!0}),!0}closeAllRowDetail(){this.angularGrid&&this.angularGrid.extensionService&&this.rowDetailInstance.collapseAll()}showFlashMessage(e,a="info"){this.message=e,this.flashAlertType=a}simulateServerAsyncCall(e){const a=["John Doe","Jane Doe","Chuck Norris","Bumblebee","Jackie Chan","Elvis Presley","Bob Marley","Mohammed Ali","Bruce Lee","Rocky Balboa"];return new Promise(u=>{setTimeout(()=>{const i=e;i.assignee=a[this.randomNumber(0,10)],i.reporter=a[this.randomNumber(0,10)],u(i)},1e3)})}toggleDarkMode(){this._darkMode=!this._darkMode,this.toggleBodyBackground(),this.angularGrid.slickGrid?.setOptions({darkMode:this._darkMode}),this.closeAllRowDetail()}toggleBodyBackground(){this._darkMode?(document.querySelector(".panel-wm-content").classList.add("dark-mode"),document.querySelector("#demo-container").dataset.bsTheme="dark"):(document.querySelector(".panel-wm-content").classList.remove("dark-mode"),document.querySelector("#demo-container").dataset.bsTheme="light")}randomNumber(e,a){return Math.floor(Math.random()*(a-e+1)+e)}};U9=Ze([ca({template:'
\n

\n {{title}}\n \n \n \n code\n \n \n

\n
\n\n
\n
\n \n \n   \n\n \n \n \n \n \n
\n
\n {{message}}\n
\n
\n\n
\n\n \n \n
'})],U9);let J9=class{constructor(){this.title="Example 17: Row Move & Checkbox Selector",this.subTitle='This example demonstrates using the Slick.Plugins.RowMoveManager plugin to easily move a row in the grid.
\n
    \n
  • Click to select, Ctrl+Click to toggle selection, Shift+Click to select a range.
  • \n
  • Drag one or more rows by the handle (icon) to reorder
  • \n
  • If you plan to use Row Selection + Row Move, then use "singleRowMove: true" and "disableRowSelection: true"
  • \n
  • You can change "columnIndexPosition" to move the icon position of any extension (RowMove, RowDetail or RowSelector icon)
  • \n
      \n
    • You will also want to enable the DataView "syncGridSelection: true" to keep row selection even after a row move
    • \n
    \n
  • If you plan to use only Row Move, then you could keep default values (or omit them completely) of "singleRowMove: false" and "disableRowSelection: false"
  • \n
      \n
    • SingleRowMove has the name suggest will only move 1 row at a time, by default it will move any row(s) that are selected unless you disable the flag
    • \n
    \n
\n '}angularGridReady(e){this.angularGrid=e}get rowMoveInstance(){return this.angularGrid?.extensionService?.getExtensionInstanceByName(Ea.rowMoveManager)??{}}ngOnInit(){this.columnDefinitions=[{id:"title",name:"Title",field:"title",filterable:!0},{id:"duration",name:"Duration",field:"duration",filterable:!0,sortable:!0},{id:"%",name:"% Complete",field:"percentComplete",filterable:!0,sortable:!0},{id:"start",name:"Start",field:"start",filterable:!0,sortable:!0,filter:{model:ie.compoundDate}},{id:"finish",name:"Finish",field:"finish",filterable:!0,sortable:!0,filter:{model:ie.compoundDate}},{id:"effort-driven",name:"Completed",field:"effortDriven",formatter:j.checkmarkMaterial,filterable:!0,sortable:!0,filter:{collection:[{value:"",label:""},{value:!0,label:"True"},{value:!1,label:"False"}],model:ie.singleSelect}}],this.gridOptions={enableAutoResize:!0,autoResize:{container:"#demo-container",rightPadding:10},enableCellNavigation:!0,enableFiltering:!0,enableCheckboxSelector:!0,checkboxSelector:{columnIndexPosition:1,hideInFilterHeaderRow:!1,hideInColumnTitleRow:!0},enableRowSelection:!0,rowSelectionOptions:{selectActiveRow:!1},dataView:{syncGridSelection:!0},enableRowMoveManager:!0,rowMoveManager:{singleRowMove:!0,disableRowSelection:!0,cancelEditOnDrag:!0,hideRowMoveShadow:!1,width:30,onBeforeMoveRows:this.onBeforeMoveRow.bind(this),onMoveRows:this.onMoveRows.bind(this),columnIndexPosition:0},showCustomFooter:!0,presets:{rowSelection:{dataContextIds:[1,2,6,7]}}},this.getData()}getData(){const e=[];for(let a=0;a<500;a++)e[a]={id:a,title:"Task "+a,duration:Math.round(25*Math.random())+" days",percentComplete:Math.round(100*Math.random()),start:"01/01/2009",finish:"01/05/2009",effortDriven:a%5==0};this.dataset=e}onBeforeMoveRow(e,a){for(const u of a.rows)if(u===a.insertBefore||u===a.insertBefore-1&&a.insertBefore-1!==this.angularGrid.dataView.getItemCount())return e.stopPropagation(),!1;return!0}onMoveRows(e,a){const u=a.rows,i=a.insertBefore,r=[];this.angularGrid.dataView.sort(void 0,!0);const o=this.angularGrid.dataView.getItems(),d=this.angularGrid.dataView.getFilteredItems(),h=this.angularGrid.dataView.getItem(i),m=h?this.angularGrid.dataView.getIdxById(h.id):this.angularGrid.dataView.getItemCount(),g=[];u.forEach(C=>g.push(d[C]));const v=g.map(C=>this.angularGrid.dataView.getIdxById(C.id)),k=o.slice(0,m),x=o.slice(m,o.length);u.sort((C,F)=>C-F);for(const C of v)void 0!==C&&r.push(o[C]);v.reverse();for(const C of v)void 0!==C&&void 0!==m&&(C{alert(`Technically we should Edit "Task ${u.dataContext.id}"`)}},{id:"delete-symbol",field:"id",excludeFromColumnPicker:!0,excludeFromGridMenu:!0,excludeFromHeaderMenu:!0,formatter:j.icon,params:{iconCssClass:"mdi mdi-trash-can pointer"},minWidth:30,maxWidth:30,onCellClick:(a,u)=>{confirm("Are you sure?")&&this.angularGrid.gridService.deleteItemById(u.dataContext.id)}}];this.columnDefinitions.splice(0,0,e[0],e[1]),this.columnDefinitions=this.columnDefinitions.slice()}}toggleFilter(){this.angularGrid.filterService.toggleFilterFunctionality()}toggleSorting(){this.angularGrid.sortService.toggleSortFunctionality()}};J9=Ze([ca({template:'
\n

\n {{title}}\n \n \n code\n \n \n

\n
\n\n
\n
\n \n \n \n \n \n \n
\n
\n
\n
\n \n \n
\n
\n
'})],J9);var zge=O(18),Mge=O.n(zge),Lge=O(322),Tge=O.n(Lge);let Z9=class{constructor(e){this.cd=e,this.title="Example 10: Multiple Grids with Row Selection",this.subTitle='\n Row selection, single or multi-select (Wiki docs).\n
    \n
  • Single Select, you can click on any cell to make the row active
  • \n
  • Multiple Selections, you need to specifically click on the checkbox to make 1 or more selections
  • \n
  • You can use "selectableOverride()" callback to override logic to display checkbox on every row (for example only show it every 2nd row)
  • \n
  • NOTE: Any Row Selection(s) will be reset when using Pagination and changing Page (you will need to set it back manually if you want it back)
  • \n
\n ',this.isGrid2WithPagination=!0,this.selectedTitles="",this.selectedTitle=""}ngOnInit(){this.prepareGrid()}angularGridReady1(e){this.angularGrid1=e,this.gridObj1=e&&e.slickGrid||{}}angularGridReady2(e){this.angularGrid2=e,this.gridObj2=e&&e.slickGrid||{}}prepareGrid(){this.columnDefinitions1=[{id:"title",name:"Title",field:"title",sortable:!0,type:w.string,filterable:!0},{id:"duration",name:"Duration (days)",field:"duration",sortable:!0,type:w.number,filterable:!0},{id:"complete",name:"% Complete",field:"percentComplete",formatter:j.percentCompleteBar,type:w.number,filterable:!0,sortable:!0},{id:"start",name:"Start",field:"start",formatter:j.dateIso,exportWithFormatter:!0,type:w.date,filterable:!0,sortable:!0,filter:{model:ie.compoundDate}},{id:"finish",name:"Finish",field:"finish",formatter:j.dateIso,exportWithFormatter:!0,type:w.date,filterable:!0,sortable:!0,filter:{model:ie.compoundDate}},{id:"effort-driven",name:"Effort Driven",field:"effortDriven",formatter:j.checkmarkMaterial,type:w.boolean,sortable:!0,filterable:!0,filter:{collection:[{value:"",label:""},{value:!0,label:"true"},{value:!1,label:"false"}],model:ie.singleSelect}}],this.columnDefinitions2=[{id:"title",name:"Title",field:"title",sortable:!0,type:w.string,filterable:!0},{id:"duration",name:"Duration (days)",field:"duration",sortable:!0,type:w.number,filterable:!0},{id:"complete",name:"% Complete",field:"percentComplete",formatter:j.percentCompleteBar,type:w.number,filterable:!0,sortable:!0},{id:"start",name:"Start",field:"start",formatter:j.dateIso,exportWithFormatter:!0,type:w.date,filterable:!0,sortable:!0,filter:{model:ie.compoundDate}},{id:"finish",name:"Finish",field:"finish",formatter:j.dateIso,exportWithFormatter:!0,type:w.date,filterable:!0,sortable:!0,filter:{model:ie.compoundDate}},{id:"effort-driven",name:"Effort Driven",field:"effortDriven",formatter:j.checkmarkMaterial,type:w.boolean,sortable:!0,filterable:!0,filter:{collection:[{value:"",label:""},{value:!0,label:"true"},{value:!1,label:"false"}],model:ie.singleSelect}}],this.gridOptions1={gridHeight:225,gridWidth:800,enableAutoResize:!1,enableCellNavigation:!0,enableRowSelection:!0,enableCheckboxSelector:!0,enableFiltering:!0,checkboxSelector:{hideSelectAllCheckbox:!0},multiSelect:!1,rowSelectionOptions:{selectActiveRow:!0},columnPicker:{hideForceFitButton:!0},gridMenu:{hideForceFitButton:!0},enablePagination:!0,pagination:{pageSizes:[5,10,15,20,25,50,75,100],pageSize:5},presets:{pagination:{pageNumber:2,pageSize:5}}},this.gridOptions2={gridHeight:255,gridWidth:800,enableAutoResize:!1,enableCellNavigation:!0,enableFiltering:!0,checkboxSelector:{hideInFilterHeaderRow:!1,hideInColumnTitleRow:!0,applySelectOnAllPages:!0},rowSelectionOptions:{selectActiveRow:!1},enableCheckboxSelector:!0,enableRowSelection:!0,enablePagination:!0,pagination:{pageSizes:[5,10,15,20,25,50,75,100],pageSize:5},presets:{rowSelection:{dataContextIds:[3,12,13,522]}}},this.dataset1=this.prepareData(495),this.dataset2=this.prepareData(525)}prepareData(e){const a=[];for(let u=0;ua-u),this.selectedTitles=this.selectedGrid2IDs.map(a=>`Task ${a}`).join(","),this.selectedTitles.length>293&&(this.selectedTitles=this.selectedTitles.substring(0,293)+"..."),this.cd.detectChanges())}togglePaginationGrid2(){this.isGrid2WithPagination=!this.isGrid2WithPagination,this.angularGrid2.paginationService.togglePaginationVisibility(this.isGrid2WithPagination)}handleSelectedRowsChanged1(e,a){Array.isArray(a.rows)&&this.gridObj1&&(this.selectedTitle=a.rows.map(u=>this.gridObj1.getDataItem(u).title||""))}static#e=this.ctorParameters=()=>[{type:Xu}]};Z9=Ze([ca({template:'
\n

\n {{title}}\n \n \n code\n \n \n

\n
\n\n
\n
\n Pagination\n
\n \n \n
\n
\n
\n
\n (single select) Selected Row:\n \n
\n
\n
\n\n
\n \n \n
\n\n
\n\n
\n
\n Pagination: \n \n
\n \n \n
\n
\n
\n
\n
\n (multi-select) Selected Row(s):\n \n
\n
\n
\n\n
\n \n \n
\n
',styles:[Mge(),Tge()]}),Ct("design:paramtypes",[Xu])],Z9);function Rp(t,e){return Math.floor(Math.random()*(e-t+1)+t)}const $9="gridState";let q9=class{constructor(e){this.translate=e,this.title="Example 16: Grid State & Presets using Local Storage",this.subTitle='\n Grid State & Preset (Wiki docs)\n
\n
    \n
  • Uses Local Storage to persist the Grid State and uses Grid Options "presets" to put the grid back to it\'s previous state
  • \n
      \n
    • to demo this, simply change any columns (position reorder, visibility, size, filter, sort), then refresh your browser with (F5)
    • \n
    \n
  • Local Storage is just one option, you can use whichever is more convenient for you (Local Storage, Session Storage, DB, ...)
  • \n
\n ',this.subscriptions=[],this.selectedLanguage=this.translate.getDefaultLang()}angularGridReady(e){this.angularGrid=e}ngOnDestroy(){rd(this.subscriptions)}ngOnInit(){const e=JSON.parse(localStorage[$9]||null);this.defineGrid(e);this.translate.use("en"),this.selectedLanguage="en"}clearGridStateFromLocalStorage(){this.angularGrid.gridService.resetGrid(this.columnDefinitions),this.angularGrid.paginationService.changeItemPerPage(25),setTimeout(()=>localStorage[$9]=null)}defineGrid(e){const a=[];for(let u=0;u<500;u++)a.push({value:u,label:u});this.columnDefinitions=[{id:"title",name:"Title",field:"title",nameKey:"TITLE",filterable:!0,sortable:!0,type:w.string,minWidth:45,width:100,filter:{model:ie.compoundInput}},{id:"description",name:"Description",field:"description",filterable:!0,sortable:!0,minWidth:80,width:100,type:w.string,filter:{model:ie.input,filterShortcuts:[{titleKey:"BLANK_VALUES",searchTerms:["< A"],iconCssClass:"mdi mdi-filter-minus-outline"},{titleKey:"NON_BLANK_VALUES",searchTerms:["> A"],iconCssClass:"mdi mdi-filter-plus-outline"}]}},{id:"duration",name:"Duration (days)",field:"duration",sortable:!0,type:w.number,exportCsvForceToKeepAsString:!0,minWidth:55,width:100,nameKey:"DURATION",filterable:!0,filter:{collection:a,model:ie.multipleSelect,filterOptions:{maxHeight:250,width:175}}},{id:"complete",name:"% Complete",field:"percentComplete",nameKey:"PERCENT_COMPLETE",minWidth:70,type:w.number,sortable:!0,width:100,formatter:j.percentCompleteBar,filterable:!0,filter:{model:ie.slider,operator:">"}},{id:"start",name:"Start",field:"start",nameKey:"START",formatter:j.dateIso,sortable:!0,minWidth:75,exportWithFormatter:!0,width:100,type:w.date,filterable:!0,filter:{model:ie.compoundDate,filterShortcuts:[{titleKey:"PAST",searchTerms:[Pi(new Date,"YYYY-MM-DD")],operator:"<",iconCssClass:"mdi mdi-calendar"},{titleKey:"FUTURE",searchTerms:[Pi(new Date,"YYYY-MM-DD")],operator:">",iconCssClass:"mdi mdi-calendar-clock"}]}},{id:"completed",field:"completed",nameKey:"COMPLETED",minWidth:85,maxWidth:85,formatter:j.checkmarkMaterial,width:100,type:w.boolean,sortable:!0,filterable:!0,filter:{collection:[{value:"",label:""},{value:!0,label:"True"},{value:!1,label:"False"}],model:ie.singleSelect,filterOptions:{autoAdjustDropHeight:!0}}}],this.gridOptions={autoResize:{container:"#demo-container",rightPadding:10},enableCheckboxSelector:!0,enableFiltering:!0,enableTranslate:!0,i18n:this.translate,columnPicker:{hideForceFitButton:!0},gridMenu:{hideForceFitButton:!0,hideClearFrozenColumnsCommand:!1},headerMenu:{hideFreezeColumnsCommand:!1},enablePagination:!0,pagination:{pageSizes:[5,10,15,20,25,30,40,50,75,100],pageSize:25}},e&&(this.gridOptions.presets=e),this.dataset=this.getData(500)}getData(e){const a=(new Date).getFullYear(),u=[];for(let i=0;i
',styles:[Hpe()]})],a9);var Ope=O(257),jpe=O.n(Ope);function tJ(t,e,a){let u;a={modalType:"edit",validationFailedMsg:"Some of the fields have failed validation",validationMsgPrefix:null,show:null,hide:null,position:null,destroy:null,formValues:{},editors:{},...a};const r=()=>{},o=h=>{const m=e[h],g=Nu(m),v=m?.clientWidth??0,k=m?.clientHeight??0;return{top:g.top,left:g.left,bottom:g.top+k,right:g.left+v,width:v,height:k,visible:!0}};function d(h){const m=this;let g=[];m.getEditors=()=>g,m.destroy=()=>{let k=g.pop();for(;k;)k?.destroy(),k=g.pop();let x=e.pop();for(;x;)_t(x),x?.remove(),x=e.pop();a?.destroy?.(),g=[],e=null},m.focus=()=>{(u||g[0]).focus()},m.isValueChanged=()=>{let k=0;for(;k{const k=[];let x=0;for(;x{let D=0;for(;D{let x=0;for(;x{let x;u=null;const D=[];let C=0;for(;C{let k=0;for(;k{let k=0;for(;k{a?.position?.(k)},function v(){let k={},x=0;for(;x{Array.isArray(g)&&g.length>0&&"function"==typeof g[0].focus&&g[0].focus()},0)}()}return d.prototype=this,d}const uJ=t=>console.log(t.message);class Gpe{get eventHandler(){return this._eventHandler}get dataView(){return this.grid?.getData()}get dataViewLength(){return this.dataView.getLength()}get formValues(){return this._formValues}get editors(){return this._editors}set editors(e){this._editors=e}get gridOptions(){return this.grid?.getOptions()}constructor(){this._columnDefinitions=[],this._lastActiveRowNumber=-1,this._formValues=null,this.gridService=null,this._eventHandler=new Ut,this._bindEventService=new Ri}init(e,a){if(this.grid=e,this.gridService=a.get("GridService"),this.translaterService=a.get("TranslaterService"),!this.gridService)throw new Error("[Slickgrid-Universal] it seems that the GridService is not being loaded properly, make sure the Container Service is properly implemented.");if(this.gridOptions.enableTranslate&&(!this.translaterService||!this.translaterService.translate))throw new Error('[Slickgrid-Universal] requires a Translate Service to be installed and configured when the grid option "enableTranslate" is enabled.');this._locales=this.gridOptions?.locales??ue.locales}dispose(){this._eventHandler.unsubscribeAll(),this._bindEventService.unbindAll(),this._formValues=null,this.disposeComponent()}disposeComponent(){this._modalBodyTopValidationElm?.remove(),this._modalSaveButtonElm?.remove(),"function"==typeof this._modalElm?.remove&&(this._modalElm.remove(),document.body.classList.remove("slick-modal-open")),this._editorContainers=[]}changeFormInputValue(e,a,u=!1,i=!0){const r=this.getColumnByObjectOrId(e),o="string"==typeof e?e:r?.id??"",d=this._editors?.[o];let h=a;if(!d&&!u)throw new Error(`Composite Editor with column id "${o}" not found.`);if("function"==typeof d?.setValue&&Array.isArray(this._editorContainers)){d.setValue(a,!0,i);const g=this._editorContainers.find(k=>k.dataset.editorid===o),v=this.gridOptions?.compositeEditorOptions?.excludeDisabledFieldFormValues??!1;!d.disabled||d.disabled&&!v?g?.classList?.add("modified"):(h="",g?.classList?.remove("modified")),d.disabled&&(""!==h||null!==h||void 0!==h||0!==h)&&(h="")}const m=r?.field??"";if(r&&m?.includes(".")){const g=r.editor?.complexObjectPath??m??"";br(this._formValues??{},g,a)}else this._formValues={...this._formValues,[o]:h}}changeFormValue(e,a){const u=this.getColumnByObjectOrId(e),i="string"==typeof e?e:u?.id??"",r=u?.field??e;if(r?.includes(".")){const o=u?.editor?.complexObjectPath??r??"";br(this._formValues,o,a)}else this._formValues={...this._formValues,[i]:a};this._formValues=Ap({},this._itemDataContext,this._formValues)}changeFormEditorOption(e,a,u){const i=this._editors?.[e];if(!i?.changeEditorOption)throw new Error(`Editor with column id "${e}" not found OR the Editor does not support "changeEditorOption" (current only available with AutoComplete, Date, MultipleSelect & SingleSelect Editors).`);i.changeEditorOption(a,u)}disableFormInput(e,a=!0){const u=this._editors?.[e];u?.disable&&Array.isArray(this._editorContainers)&&u.disable(a)}openDetails(e){const a=e.onError??uJ,u={backdrop:"static",showCloseButtonOutside:!0,shouldClearRowSelectionAfterMassAction:!0,viewColumnLayout:"auto",modalType:"edit"};try{if(!this.grid||this.grid.getEditorLock().isActive()&&!this.grid.getEditorLock().commitCurrentEdit())return null;this._formValues=null,this._options={...u,...this.gridOptions.compositeEditorOptions,...e,labels:{...this.gridOptions.compositeEditorOptions?.labels,...e?.labels}},this._options.backdrop=void 0!==e.backdrop?e.backdrop:"static";const i=this._options.viewColumnLayout||1,r=this.grid.getActiveCell(),o=r?.cell??0,d=r?.row??0,h=this.grid.getUID()||"";let m=e.headerTitle||"";"function"==typeof this._options.onBeforeOpen&&this._options.onBeforeOpen(),this.hasRowSelectionEnabled()&&"auto-mass"===this._options.modalType&&this.grid.getSelectedRows&&((this.grid.getSelectedRows()||[]).length>0?(this._options.modalType="mass-selection",e?.headerTitleMassSelection&&(m=e?.headerTitleMassSelection)):(this._options.modalType="mass-update",e?.headerTitleMassUpdate&&(m=e?.headerTitleMassUpdate)));const g=this._options.modalType||"edit";if(!this.gridOptions.editable)return a({type:"error",code:"EDITABLE_GRID_REQUIRED",message:"Your grid must be editable in order to use the Composite Editor Modal."}),null;if(!this.gridOptions.enableCellNavigation)return a({type:"error",code:"ENABLE_CELL_NAVIGATION_REQUIRED",message:'Composite Editor requires the flag "enableCellNavigation" to be set to True in your Grid Options.'}),null;if(!this.gridOptions.enableAddRow&&("clone"===g||"create"===g))return a({type:"error",code:"ENABLE_ADD_ROW_REQUIRED",message:'Composite Editor requires the flag "enableAddRow" to be set to True in your Grid Options when cloning/creating a new item.'}),null;if(!r&&("clone"===g||"edit"===g))return a({type:"warning",code:"NO_RECORD_FOUND",message:"No records selected for edit or clone operation."}),null;{const v="mass-update"===g||"mass-selection"===g,k=v?{}:this.grid.getDataItem(d);this._originalDataContext=mu(!0,{},k),this._columnDefinitions=this.grid.getColumns();const x=this.hasRowSelectionEnabled()?this.grid.getSelectedRows():[],D=this.dataView?.getItemCount()??0;this._lastActiveRowNumber=d;const C=this.dataView.getAllSelectedIds(),F="create"===g?this.dataViewLength:d;if(!this.focusOnFirstColumnCellWithEditor(this._columnDefinitions,k,o,F,v))return null;if("edit"===g&&!k)return a({type:"warning",code:"ROW_NOT_EDITABLE",message:"Current row is not editable."}),null;if("mass-selection"===g&&x.length<1)return a({type:"warning",code:"ROW_SELECTION_REQUIRED",message:"You must select some rows before trying to apply new value(s)."}),null;let z=[];z=v?this._columnDefinitions.filter(Pe=>Pe.editorClass&&!0===Pe.editor?.massUpdate):this._columnDefinitions.filter(Pe=>Pe.editorClass),z.some(Pe=>void 0!==Pe.editor?.compositeEditorFormOrder)&&z.sort((Pe,Wa)=>iK(Pe?.editor?.compositeEditorFormOrder??1/0,Wa?.editor?.compositeEditorFormOrder??1/0,Gt.asc));const M=m.replace(/\{\{(.*?)\}\}/g,(Pe,Wa)=>ui(k,Wa)),L="auto"===i?this.autoCalculateLayoutColumnCount(z.length):i;this._modalElm=T("div",{className:`slick-editor-modal ${h}`});const I=T("div",{className:"slick-editor-modal-content"});if(this.gridOptions?.darkMode&&I.classList.add("slick-dark-mode"),!isNaN(i)&&+i>1||"auto"===i&&L>1){const Pe=2===L?"split-view":"triple-split-view";I.classList.add(Pe)}const W=T("div",{className:"slick-editor-modal-title"});this.grid.applyHtmlCode(W,M);const X=T("button",{type:"button",ariaLabel:"Close",textContent:"\xd7",className:"close",dataset:{action:"close"}});this._options.showCloseButtonOutside&&(W?.classList?.add("outside"),X?.classList?.add("outside"));const q=T("div",{ariaLabel:"Close",className:"slick-editor-modal-header"});q.appendChild(W),q.appendChild(X);const re=T("div",{className:"slick-editor-modal-body"});this._modalBodyTopValidationElm=T("div",{className:"validation-summary",style:{display:"none"}},re);const He=T("div",{className:"slick-editor-modal-footer"}),Ve=T("button",{type:"button",ariaLabel:this.getLabelText("cancelButton","TEXT_CANCEL","Cancel"),className:"btn btn-cancel btn-default btn-sm",textContent:this.getLabelText("cancelButton","TEXT_CANCEL","Cancel"),dataset:{action:"cancel"}});let we="",xa="";switch(g){case"clone":xa=this.getLabelText("cloneButton","TEXT_CLONE","Clone");break;case"mass-update":const Pe=this.getLabelText("massUpdateStatus","TEXT_ALL_X_RECORDS_SELECTED","All {{x}} records selected");we=this.parseText(Pe,{x:D}),xa=this.getLabelText("massUpdateButton","TEXT_APPLY_MASS_UPDATE","Mass Update");break;case"mass-selection":const Wa=this.getLabelText("massSelectionStatus","TEXT_X_OF_Y_MASS_SELECTED","{{x}} of {{y}} selected");we=this.parseText(Wa,{x:C.length,y:D}),xa=this.getLabelText("massSelectionButton","TEXT_APPLY_TO_SELECTION","Update Selection");break;default:xa=this.getLabelText("saveButton","TEXT_SAVE","Save")}const At=T("div",{className:"footer-status-text",textContent:we});this._modalSaveButtonElm=T("button",{type:"button",className:"btn btn-save btn-primary btn-sm",ariaLabel:xa,textContent:xa,dataset:{action:"create"===g||"edit"===g?"save":g,ariaLabel:xa}});const gt=T("div",{className:"footer-buttons"});("mass-update"===g||"mass-selection"===g)&&He.appendChild(At),gt.appendChild(Ve),gt.appendChild(this._modalSaveButtonElm),He.appendChild(gt),I.appendChild(q),I.appendChild(re),I.appendChild(He),this._modalElm.appendChild(I);for(const Pe of z)if(Pe.editorClass){const Wa=T("div",{className:`item-details-container editor-${Pe.id}`});1===L?Wa.classList.add("slick-col-medium-12"):Wa.classList.add("slick-col-medium-6","slick-col-xlarge-"+12/L);const ou=T("div",{className:`item-details-label editor-${Pe.id}`});this.grid.applyHtmlCode(ou,this.getColumnLabel(Pe)||"n/a");const sl=T("div",{className:"item-details-editor-container slick-cell",dataset:{editorid:`${Pe.id}`}}),en=T("div",{className:`item-details-validation editor-${Pe.id}`});if(this._options?.showResetButtonOnEachEditor){const $n=this.createEditorResetButtonElement(`${Pe.id}`);this._bindEventService.bind($n,"click",this.handleResetInputValue.bind(this)),ou.appendChild($n)}Wa.appendChild(ou),Wa.appendChild(sl),Wa.appendChild(en),re.appendChild(Wa)}if(this._options?.showFormResetButton){const Pe=this.createFormResetButtonElement();this._bindEventService.bind(Pe,"click",this.handleResetFormClicked.bind(this)),re.appendChild(Pe)}document.body.appendChild(this._modalElm),document.body.classList.add("slick-modal-open"),this._bindEventService.bind(document.body,"click",this.handleBodyClicked.bind(this)),"function"==typeof this._options.onRendered&&this._options.onRendered(this._modalElm),this._editors={},this._editorContainers=z.map(Pe=>re.querySelector(`[data-editorid='${Pe.id}']`))||[],this._compositeOptions={destroy:this.disposeComponent.bind(this),modalType:g,validationMsgPrefix:"* ",formValues:{},editors:this._editors};const qa=new tJ(z,this._editorContainers,this._compositeOptions);this.grid.editActiveCell(qa),this._bindEventService.bind(X,"click",this.cancelEditing.bind(this)),this._bindEventService.bind(Ve,"click",this.cancelEditing.bind(this)),this._bindEventService.bind(this._modalSaveButtonElm,"click",this.handleSaveClicked.bind(this)),this._bindEventService.bind(this._modalElm,"keydown",this.handleKeyDown.bind(this)),this._bindEventService.bind(this._modalElm,"focusout",this.validateCurrentEditor.bind(this)),this._bindEventService.bind(this._modalElm,"blur",this.validateCurrentEditor.bind(this)),this._eventHandler.subscribe(this.grid.onCompositeEditorChange,this.handleOnCompositeEditorChange.bind(this)),this._eventHandler.subscribe(this.grid.onAddNewRow,(Pe,Wa)=>{this._originalDataContext=this.insertNewItemInDataView(Wa.item)})}return this}catch(i){this.dispose();const r="string"==typeof i?i:i?.message??i?.body?.message??"";return a({type:"error",code:"string"==typeof i?i:i?.status??i?.body?.status??r,message:r}),null}}cancelEditing(){var e=this;return Lu(function*(){let a=!0;e.formValues&&Object.keys(e.formValues).length>0&&"function"==typeof e._options.onClose&&(a=yield e._options.onClose()),a&&(e.grid.getEditController()?.cancelCurrentEdit(),("edit"===e._options?.modalType||"clone"===e._options?.modalType)&&e.resetCurrentRowDataContext(),e.grid.setActiveRow(e._lastActiveRowNumber),e.dispose())})()}showValidationSummaryText(e,a=""){e&&""!==a?(this._modalBodyTopValidationElm.textContent=a,this._modalBodyTopValidationElm.style.display="block",this._modalBodyTopValidationElm.scrollIntoView?.(),this._modalSaveButtonElm.disabled=!1,this._modalSaveButtonElm.classList.remove("saving")):(this._modalBodyTopValidationElm.style.display="none",this._modalBodyTopValidationElm.textContent=a)}applySaveMassUpdateChanges(e,a,u=!0){const i=u?this.dataView.getItems():mu(!0,[],this.dataView.getItems());return Object.keys(e).forEach(r=>{r in e&&i.forEach(o=>{r in e&&(void 0===this._options?.validateMassUpdateChange||!1!==this._options.validateMassUpdateChange(r,o,e))&&(o[r]=e[r])})}),u&&(this.dataView.setItems(i,this.gridOptions.datasetIdPropertyName),this.grid.invalidate()),i}applySaveMassSelectionChanges(e,a,u=!0){const r=(a?.dataContextIds??[]).map(d=>this.dataView.getItemById(d)),o=u?r:mu(!0,[],r);return Object.keys(e).forEach(d=>{d in e&&o.forEach(h=>{d in e&&(void 0===this._options?.validateMassUpdateChange||!1!==this._options.validateMassUpdateChange(d,h,e))&&(h[d]=e[d])})}),u&&this.gridService?.updateItems(o),o}autoCalculateLayoutColumnCount(e){return e>=15?3:e>=8?2:1}createEditorResetButtonElement(e){const a=T("button",{type:"button",name:e,ariaLabel:"Reset",title:this._options?.labels?.resetFormButton??"Reset Form Input",className:"btn btn-xs btn-editor-reset"});if(this._options?.resetEditorButtonCssClass){const u=Kt(this._options?.resetEditorButtonCssClass);for(const i of u)a.classList.add(i)}return a}createFormResetButtonElement(){const e=T("div",{className:"reset-container"}),a=T("button",{type:"button",className:"btn btn-sm reset-form"},e);return T("span",{className:this._options?.resetFormButtonIconCssClass??""},a),a.appendChild(document.createTextNode(" Reset Form")),e}executeOnError(e){(this._options?.onError??uJ)(e)}executeOnSave(e,a,u,i){var r=this;return Lu(function*(){try{if(r.showValidationSummaryText(!1,""),r.validateCompositeEditors().valid){if(r._modalSaveButtonElm.classList.add("saving"),r._modalSaveButtonElm.disabled=!0,"function"==typeof r._options?.onSave){const d="mass-update"===r._options.modalType||"mass-selection"===r._options.modalType;let h;d&&r._options?.shouldPreviewMassChangeDataset&&(h=e(r.formValues,r.getCurrentRowSelections(),!1));const m=d?h:i;(yield r._options?.onSave(r.formValues,r.getCurrentRowSelections(),m))&&(e(r.formValues,r.getCurrentRowSelections()),a())}else e(r.formValues,r.getCurrentRowSelections()),a();"function"==typeof u&&u(),r.dispose()}}catch(o){const d="string"==typeof o?o:o?.message??o?.body?.message??"";r.showValidationSummaryText(!0,d)}})()}focusOnFirstColumnCellWithEditor(e,a,u,i,r){const o=r&&!this.gridOptions.enableAddRow&&i>=this.dataViewLength?this.dataViewLength-1:i;let d=u;const h=e[u].editorClass;let m=this.grid.getCellNode(o,u);if(!h||!m||!this.getActiveCellEditor(o,u)){if(d=this.findNextAvailableEditorColumnIndex(e,a,i,r),-1===d)return this.executeOnError({type:"error",code:"NO_EDITOR_FOUND",message:"We could not find any Editor in your Column Definition"}),!1;this.grid.setActiveCell(o,d,!1),r&&this.grid.setActiveRow(this.dataViewLength,d,!0)}return m=this.grid.getCellNode(o,d),!!m}findNextAvailableEditorColumnIndex(e,a,u,i){let r=-1;for(let o=0;ou.id===e)),a}getActiveCellEditor(e,a){return this.grid.setActiveCell(e,a,!1),this.grid.getCellEditor()}getColumnLabel(e){const a=this.gridOptions.columnGroupSeparator||" - ";let u=e.nameCompositeEditor||e.name||"",i=e.columnGroup||"";if(this.gridOptions.enableTranslate&&this.translaterService){const o=e.nameCompositeEditorKey||e.nameKey;o&&(u=this.translaterService.translate(o)),e.columnGroupKey&&this.translaterService?.translate&&(i=this.translaterService.translate(e.columnGroupKey))}return ii(i?`${i}${a}${u}`:u,"innerHTML")}getLabelText(e,a,u){const i={...this.gridOptions.compositeEditorOptions?.labels,...this._options?.labels};if(this.gridOptions?.enableTranslate&&this.translaterService?.translate&&i.hasOwnProperty(`${e}Key`)){const r=i[`${e}Key`];return this.translaterService.translate(r||"")}return i?.[e]??this._locales?.[a]??u}getCurrentRowSelections(){const e=this.dataView.getAllSelectedIds();return{gridRowIndexes:this.dataView.mapIdsToRows(e),dataContextIds:e}}handleBodyClicked(e){e.target?.classList?.contains("slick-editor-modal")&&"static"!==this._options?.backdrop&&this.dispose()}handleKeyDown(e){"Escape"===e.code?(this.cancelEditing(),e.stopPropagation(),e.preventDefault()):"Tab"===e.code&&this.validateCurrentEditor()}handleResetInputValue(e){const a=e.target.name,u=this._editors?.[a];"function"==typeof u?.reset&&u.reset(),delete this._formValues?.[a]}handleMassSaving(e,a){var u=this;return Lu(function*(){if(u.formValues&&0!==Object.keys(u.formValues).length){const i="mass-update"===e?"applySaveMassUpdateChanges":"applySaveMassSelectionChanges";u.executeOnSave(u[i].bind(u),a.bind(u))}else u.executeOnError({type:"warning",code:"NO_CHANGES_DETECTED",message:"Sorry we could not detect any changes."})})()}handleOnCompositeEditorChange(e,a){const u=a.column?.id??"";this._formValues={...this._formValues,...a.formValues};const i=this._editors?.[u],r=i?.isValueTouched?.()??i?.isValueChanged?.()??!1;this._itemDataContext=i?.dataContext??{};const o=this._modalElm.querySelector(`[data-editorid=${u}]`);o?.classList&&(r?o.classList.add("modified"):o.classList.remove("modified")),this.validateCompositeEditors()}hasRowSelectionEnabled(){const e=this.grid.getSelectionModel();return!(!this.gridOptions.enableRowSelection&&!this.gridOptions.enableCheckboxSelector||!e)}handleResetFormClicked(){for(const e of Object.keys(this._editors)){const a=this._editors[e];a?.reset&&a.reset()}this._formValues=XG(this._formValues)}handleSaveClicked(){var e=this;return Lu(function*(){const a=e._options?.modalType;switch(a){case"mass-update":e.handleMassSaving(a,()=>{e.grid.getEditController()?.cancelCurrentEdit(),e.grid.setActiveCell(0,0,!1),e._options.shouldClearRowSelectionAfterMassAction&&e.grid.setSelectedRows([])});break;case"mass-selection":e.handleMassSaving(a,()=>{e.grid.getEditController()?.cancelCurrentEdit(),e.grid.setActiveRow(e._lastActiveRowNumber),e._options.shouldClearRowSelectionAfterMassAction&&e.grid.setSelectedRows([])});break;case"clone":const u={...e._originalDataContext,...e.formValues},i=()=>{e.grid.getEditController()?.cancelCurrentEdit(),e.grid.setActiveCell(0,0,!1)};e.executeOnSave(e.insertNewItemInDataView.bind(e,u),i,e.resetCurrentRowDataContext.bind(e),u);break;default:let r=e.grid.getEditController()?.commitCurrentEdit();if(r&&"function"==typeof e._options?.onSave){const o="create"===a?e._originalDataContext:e.grid.getDataItem(e._lastActiveRowNumber);r=yield e._options?.onSave(e.formValues,e.getCurrentRowSelections(),o)}r&&e.dispose()}})()}insertNewItemInDataView(e){const a=this.dataView?.getItemCount()||0,u=this._options.insertNewId??a+1;return e[this.gridOptions.datasetIdPropertyName||"id"]=u,this.dataView.getItemById(u)?this.executeOnError({type:"error",code:"ITEM_ALREADY_EXIST",message:`The item object which you are trying to add already exist with the same Id:: ${u}`}):this.gridService?.addItem(e,this._options.insertOptions),e}parseText(e,a){return e.replace(/\{\{(.*?)\}\}/g,(u,i)=>void 0!==a[i]?a[i]:u)}resetCurrentRowDataContext(){const e=this.gridOptions.datasetIdPropertyName||"id";this.grid.getData().updateItem(this._originalDataContext[e],this._originalDataContext)}validateCompositeEditors(e){let a={valid:!0,msg:""};const u=this.grid.getCellEditor();return u&&(a=u.validate(e)),a}validateCurrentEditor(){const e=this.grid.getCellEditor();e?.validate&&e.validate()}}const Jpe=(t,e,a,u,i,r)=>(a=a??"",(r&&r.getOptions&&r.getOptions()).editable&&u.editor?{text:a,addClasses:"editable-field"}:a),Zpe=(t,e)=>null!=t&&t.length||!(e.compositeEditorOptions&&"create"===e.compositeEditorOptions.modalType||"edit"===e.compositeEditorOptions.modalType)?/^(task\s\d+)*$/i.test(t)?{valid:!0,msg:""}:{valid:!1,msg:'Your title is invalid, it must start with "Task" followed by a number.'}:{valid:!1,msg:"This is a required field."};let t9=class{constructor(e){this.http=e,this._darkMode=!1,this.title="Example 30: Composite Editor Modal",this.subTitle='Composite Editor allows you to Create, Clone, Edit, Mass Update & Mass Selection Changes inside a nice Modal Window.\n
The modal is simply populated by looping through your column definition list and also uses a lot of the same logic as inline editing (see Composite Editor - Wiki.)',this.columnDefinitions=[],this.dataset=[],this.editQueue=[],this.editedItems={},this.isGridEditable=!0,this.isCompositeDisabled=!1,this.isMassSelectionDisabled=!0,this.cellCssStyleQueue=[],this.complexityLevelList=[{value:0,label:"Very Simple"},{value:1,label:"Simple"},{value:2,label:"Straightforward"},{value:3,label:"Complex"},{value:4,label:"Very Complex"}],this.compositeEditorInstance=new Gpe}angularGridReady(e){this.angularGrid=e}ngOnInit(){this.prepareGrid(),this.dataset=this.loadData(500)}ngOnDestroy(){document.querySelector(".panel-wm-content").classList.remove("dark-mode"),document.querySelector("#demo-container").dataset.bsTheme="light"}prepareGrid(){this.columnDefinitions=[{id:"title",name:' Title ',field:"title",sortable:!0,type:w.string,minWidth:75,cssClass:"text-uppercase fw-bold",columnGroup:"Common Factor",filterable:!0,filter:{model:ie.compoundInputText},editor:{model:Ye.longText,massUpdate:!1,required:!0,alwaysSaveOnEnterKey:!0,maxLength:12,editorOptions:{cols:45,rows:6,buttonTexts:{cancel:"Close",save:"Done"}},validator:Zpe}},{id:"duration",name:"Duration",field:"duration",sortable:!0,filterable:!0,minWidth:75,type:w.number,columnGroup:"Common Factor",formatter:(e,a,u)=>null==u||""===u?"":u>1?`${u} days`:`${u} day`,editor:{model:Ye.float,massUpdate:!0,decimal:2,valueStep:1,minValue:0,maxValue:1e4,alwaysSaveOnEnterKey:!0,required:!0}},{id:"cost",name:"Cost",field:"cost",width:90,minWidth:70,sortable:!0,filterable:!0,type:w.number,columnGroup:"Analysis",filter:{model:ie.compoundInputNumber},formatter:j.dollar},{id:"percentComplete",name:"% Complete",field:"percentComplete",minWidth:100,type:w.number,sortable:!0,filterable:!0,columnGroup:"Analysis",filter:{model:ie.compoundSlider,operator:">="},editor:{model:Ye.slider,massUpdate:!0,minValue:0,maxValue:100},customTooltip:{position:"center"}},{id:"complexity",name:"Complexity",field:"complexity",minWidth:100,type:w.number,sortable:!0,filterable:!0,columnGroup:"Analysis",formatter:(e,a,u)=>this.complexityLevelList[u]?.label,exportCustomFormatter:(e,a,u)=>this.complexityLevelList[u]?.label,filter:{model:ie.multipleSelect,collection:this.complexityLevelList},editor:{model:Ye.singleSelect,collection:this.complexityLevelList,massUpdate:!0}},{id:"start",name:"Start",field:"start",sortable:!0,minWidth:100,formatter:j.dateUs,columnGroup:"Period",exportCustomFormatter:j.dateUs,type:w.date,outputType:w.dateUs,saveOutputType:w.dateUtc,filterable:!0,filter:{model:ie.compoundDate},editor:{model:Ye.date,massUpdate:!0,editorOptions:{hideClearButton:!1}}},{id:"completed",name:"Completed",field:"completed",width:80,minWidth:75,maxWidth:100,cssClass:"text-center",columnGroup:"Period",formatter:j.checkmarkMaterial,exportWithFormatter:!1,filterable:!0,sortable:!0,filter:{collection:[{value:"",label:""},{value:!0,label:"True"},{value:!1,label:"False"}],model:ie.singleSelect},editor:{model:Ye.checkbox,massUpdate:!0}},{id:"finish",name:"Finish",field:"finish",sortable:!0,minWidth:100,formatter:j.dateUs,columnGroup:"Period",type:w.date,outputType:w.dateUs,saveOutputType:w.dateUtc,filterable:!0,filter:{model:ie.compoundDate},exportCustomFormatter:j.dateUs,editor:{model:Ye.date,editorOptions:{range:{min:"today"}},massUpdate:!0,validator:(e,a)=>{const u=a&&a.item;return u&&u.completed&&!e?{valid:!1,msg:'You must provide a "Finish" date when "Completed" is checked.'}:{valid:!0,msg:""}}}},{id:"product",name:"Product",field:"product",filterable:!0,columnGroup:"Item",minWidth:100,exportWithFormatter:!0,dataKey:"id",labelKey:"itemName",formatter:j.complexObject,exportCustomFormatter:j.complex,type:w.object,sortComparer:ul.objectString,editor:{model:Ye.autocompleter,alwaysSaveOnEnterKey:!0,massUpdate:!0,editorOptions:{minLength:1,fetch:(e,a)=>{a(this.mockProducts().filter(i=>i.itemName.toLowerCase().includes(e.toLowerCase())))},renderItem:{layout:"fourCorners",templateCallback:e=>this.renderItemCallbackWith4Corners(e)}}},filter:{model:ie.inputText,type:w.string,queryField:"product.itemName"}},{id:"origin",name:"Country of Origin",field:"origin",formatter:j.complexObject,columnGroup:"Item",exportCustomFormatter:j.complex,dataKey:"code",labelKey:"name",type:w.object,sortComparer:ul.objectString,filterable:!0,sortable:!0,minWidth:100,editor:{model:Ye.autocompleter,massUpdate:!0,customStructure:{label:"name",value:"code"},collectionAsync:this.http.get("assets/data/countries.json"),editorOptions:{minLength:0}},filter:{model:ie.inputText,type:"string",queryField:"origin.name"}},{id:"action",name:"Action",field:"action",width:70,minWidth:70,maxWidth:70,excludeFromExport:!0,formatter:()=>'
',cellMenu:{hideCloseButton:!1,commandTitle:"Commands",commandItems:[{command:"edit",title:"Edit Row",iconCssClass:"mdi mdi-pencil",positionOrder:66,action:()=>this.openCompositeModal("edit")},{command:"clone",title:"Clone Row",iconCssClass:"mdi mdi-content-copy",positionOrder:66,action:()=>this.openCompositeModal("clone")},"divider",{command:"delete-row",title:"Delete Row",positionOrder:64,iconCssClass:"mdi mdi-close color-danger",cssClass:"red",textCssClass:"text-italic color-danger-light",itemVisibilityOverride:e=>!e.dataContext?.completed,action:(e,a)=>{const u=a.dataContext;confirm(`Do you really want to delete row (${(a?.row??0)+1}) with "${u.title}"`)&&this.angularGrid.gridService.deleteItemById(u.id)}}]}}],this.gridOptions={enableAddRow:!0,enableCellNavigation:!0,asyncEditorLoading:!1,autoEdit:!0,autoCommitEdit:!0,editable:!0,autoAddCustomEditorFormatter:Jpe,autoResize:{container:"#demo-container",rightPadding:10},darkMode:this._darkMode,enableAutoSizeColumns:!0,enableAutoResize:!0,showCustomFooter:!0,enablePagination:!0,pagination:{pageSize:10,pageSizes:[10,200,250,500,5e3]},enableExcelExport:!0,excelExportOptions:{exportWithFormatter:!1},externalResources:[new Bo,new T7,this.compositeEditorInstance],enableFiltering:!0,rowSelectionOptions:{selectActiveRow:!1},createPreHeaderPanel:!0,showPreHeaderPanel:!0,preHeaderPanelHeight:28,enableCheckboxSelector:!0,enableRowSelection:!0,multiSelect:!1,checkboxSelector:{hideInFilterHeaderRow:!1,hideInColumnTitleRow:!0},enableCompositeEditor:!0,editCommandHandler:(e,a,u)=>{const i=Array.isArray(u.prevSerializedValue)?u.prevSerializedValue:[u.prevSerializedValue],r=Array.isArray(u.serializedValue)?u.serializedValue:[u.serializedValue],o=this.columnDefinitions.filter(h=>void 0!==h.editor),d=[];i.forEach((h,m)=>{const g=i[m],v=r[m];if(g!==v||""===v){const k=Array.isArray(u.prevSerializedValue)?o[m]:a;this.editedItems[this.gridOptions.datasetIdPropertyName||"id"]=e,this.angularGrid.slickGrid.invalidate(),u.execute(),this.renderUnsavedCellStyling(e,k,u),d.push(k)}}),this.editQueue.push({item:e,columns:d,editCommand:u})},enableCellMenu:!0,cellMenu:{activateCellOnMenuClick:!0},gridMenu:{hideToggleDarkModeCommand:!1,onCommand:(e,a)=>{"toggle-dark-mode"===a.command&&(this._darkMode=!this._darkMode,this.toggleBodyBackground())}}}}loadData(e){const a=[];for(let u=0;u100?u>5?100:88:v,x=100===k;a[u]={id:u,title:"Task "+u,duration:Math.floor(100*Math.random())+10,percentComplete:k,analysis:{percentComplete:k},complexity:u%3?0:2,start:new Date(r,d,h,h,m,m,m),finish:x||u%3==0&&g>new Date&&u>3?x?new Date:g:"",cost:u%33==0?null:Math.round(1e4*Math.random())/100,completed:x||u%3==0&&g>new Date&&u>3,product:{id:this.mockProducts()[i]?.id,itemName:this.mockProducts()[i]?.itemName},origin:u%2?{code:"CA",name:"Canada"}:{code:"US",name:"United States"}},u%8||(delete a[u].finish,delete a[u].percentComplete)}return a}handleValidationError(e,a){if(a.validationResults){let u=a.validationResults.msg||"";if(a.editor&&a.editor instanceof tJ){if(a.validationResults.errors){u+="\n";for(const i of a.validationResults.errors){u+=`${i.editor.args.column.name.toUpperCase()}: ${i.msg}`}}console.log(u)}}else alert(a.validationResults.msg);return!1}handleItemDeleted(e){console.log("item deleted with id:",e)}handleOnBeforeEditCell(e,a){const{column:u,item:i,grid:r}=a;return!(u&&i&&!function Upe(t,e,a){const u=a?.getOptions(),i=e.editor;let o=!(!u.editable||!i);t&&e&&u&&u.editable&&"finish"===e.id&&(o=!!t?.completed);return o}(i,u,r))||(e.preventDefault(),!1)}handleOnCellChange(e,a){const u=a?.item;u&&!u.completed&&(u.finish=null,this.angularGrid.gridService.updateItem(u))}handleOnCellClicked(e,a){console.log(e,a)}handleOnCompositeEditorChange(e,a){const u=a.column,i=a.formValues;"percentComplete"===u.id&&100===i.percentComplete&&(this.compositeEditorInstance.changeFormInputValue("completed",!0),this.compositeEditorInstance.changeFormInputValue("finish",new Date))}handleReRenderUnsavedStyling(){this.removeAllUnsavedStylingFromCell(),this.renderUnsavedStylingOnAllVisibleCells()}handleOnGridStateChanged(e){Array.isArray(e.gridState?.rowSelection?.dataContextIds)&&(this.isMassSelectionDisabled=0===e.gridState?.rowSelection?.dataContextIds.length)}openCompositeModal(e){let a="";switch(e){case"create":a="Inserting New Task";break;case"clone":a="Clone - {{title}}";break;case"edit":a='Editing - {{title}} (id: {{id}})';break;case"mass-update":a="Mass Update All Records";break;case"mass-selection":a="Update Selected Records"}this.compositeEditorInstance?.openDetails({headerTitle:a,modalType:e,insertOptions:{highlightRow:!1},showFormResetButton:!0,resetFormButtonIconCssClass:"mdi mdi-undo",onClose:()=>Promise.resolve(confirm("You have unsaved changes, are you sure you want to close this window?")),onError:u=>alert(u.message),onRendered:u=>{u.dataset.bsTheme=this._darkMode?"dark":"light"},onSave:(u,i,r)=>"mass-update"===e||"mass-selection"===e?new Promise((d,h)=>{setTimeout(()=>{u.percentComplete>=50?d(!0):h("Unfortunately we only accept a minimum of 50% Completion...")},50)}):(console.log(`${e} item data context`,r),new Promise(d=>setTimeout(()=>d(!0),50)))})}toggleGridEditReadonly(){this.undoAllEdits(),this.isGridEditable=!this.isGridEditable,this.isCompositeDisabled=!this.isGridEditable,this.isGridEditable||(this.isMassSelectionDisabled=!0),this.angularGrid.slickGrid.setOptions({editable:this.isGridEditable})}removeUnsavedStylingFromCell(e,a,u){const i=`unsaved_highlight_${[a.id]}${u}`;this.angularGrid.slickGrid.removeCellCssStyles(i);const r=this.cellCssStyleQueue.findIndex(o=>o===i);r>=0&&this.cellCssStyleQueue.splice(r,1)}removeAllUnsavedStylingFromCell(){for(const e of this.cellCssStyleQueue)this.angularGrid.slickGrid.removeCellCssStyles(e);this.cellCssStyleQueue=[]}renderUnsavedStylingOnAllVisibleCells(){for(const e of this.editQueue)if(e){const{item:a,columns:u,editCommand:i}=e;Array.isArray(u)&&u.forEach(r=>{this.renderUnsavedCellStyling(a,r,i)})}}renderUnsavedCellStyling(e,a,u){if(u&&e&&a){const i=this.angularGrid.dataView?.getRowByItem(e);if(void 0!==i&&i>=0){const r={[i]:{[a.id]:"unsaved-editable-field"}},o=`unsaved_highlight_${[a.id]}${i}`;this.angularGrid.slickGrid.setCellCssStyles(o,r),this.cellCssStyleQueue.push(o)}}}saveAll(){console.log(this.editQueue),console.log(this.editedItems),this.removeAllUnsavedStylingFromCell(),this.editQueue=[],this.editedItems={}}undoLastEdit(e=!1){const a=this.editQueue.pop(),u=a?.editCommand;if(a&&u&&td.cancelCurrentEdit()){u.undo();for(const i of a.columns)this.removeUnsavedStylingFromCell(a.item,i,u.row);this.angularGrid.slickGrid.invalidate(),e&&this.angularGrid.slickGrid.gotoCell(u.row,u.cell,!1)}}undoAllEdits(){for(const e of this.editQueue){const a=e?.editCommand;if(a&&td.cancelCurrentEdit()){a.undo();for(const u of e.columns)this.removeUnsavedStylingFromCell(e.item,u,a.row)}}this.angularGrid.slickGrid.invalidate(),this.editQueue=[]}toggleDarkMode(){this._darkMode=!this._darkMode,this.toggleBodyBackground(),this.angularGrid.slickGrid?.setOptions({darkMode:this._darkMode})}toggleBodyBackground(){this._darkMode?(document.querySelector(".panel-wm-content").classList.add("dark-mode"),document.querySelector("#demo-container").dataset.bsTheme="dark"):(document.querySelector(".panel-wm-content").classList.remove("dark-mode"),document.querySelector("#demo-container").dataset.bsTheme="light")}mockProducts(){return[{id:0,itemName:"Sleek Metal Computer",itemNameTranslated:"some fantastic sleek metal computer description",listPrice:2100.23,itemTypeName:"I",image:"http://i.stack.imgur.com/pC1Tv.jpg",icon:this.getRandomIcon(0)},{id:1,itemName:"Tasty Granite Table",itemNameTranslated:"an extremely huge and heavy table",listPrice:3200.12,itemTypeName:"I",image:"https://i.imgur.com/Fnm7j6h.jpg",icon:this.getRandomIcon(1)},{id:2,itemName:"Awesome Wooden Mouse",itemNameTranslated:"super old mouse",listPrice:15,itemTypeName:"I",image:"https://i.imgur.com/RaVJuLr.jpg",icon:this.getRandomIcon(2)},{id:3,itemName:"Gorgeous Fresh Shirt",itemNameTranslated:"what a gorgeous shirt seriously",listPrice:25.76,itemTypeName:"I",image:"http://i.stack.imgur.com/pC1Tv.jpg",icon:this.getRandomIcon(3)},{id:4,itemName:"Refined Cotton Table",itemNameTranslated:"super light table that will fall apart amazingly fast",listPrice:13.35,itemTypeName:"I",image:"https://i.imgur.com/Fnm7j6h.jpg",icon:this.getRandomIcon(4)},{id:5,itemName:"Intelligent Wooden Pizza",itemNameTranslated:"wood not included",listPrice:23.33,itemTypeName:"I",image:"https://i.imgur.com/RaVJuLr.jpg",icon:this.getRandomIcon(5)},{id:6,itemName:"Licensed Cotton Chips",itemNameTranslated:"not sure what that is",listPrice:71.21,itemTypeName:"I",image:"http://i.stack.imgur.com/pC1Tv.jpg",icon:this.getRandomIcon(6)},{id:7,itemName:"Ergonomic Rubber Soap",itemNameTranslated:"so good you'll want to use it every night",listPrice:2.43,itemTypeName:"I",image:"https://i.imgur.com/Fnm7j6h.jpg",icon:this.getRandomIcon(7)},{id:8,itemName:"Handcrafted Steel Car",itemNameTranslated:"aka tesla truck",listPrice:31288.39,itemTypeName:"I",image:"https://i.imgur.com/RaVJuLr.jpg",icon:this.getRandomIcon(8)}]}getRandomIcon(e){const a=["mdi-arrow-collapse","mdi-arrow-expand","mdi-cancel","mdi-check","mdi-checkbox-blank-outline","mdi-check-box-outline","mdi-checkbox-marked","mdi-close","mdi-close-circle","mdi-close-circle-outline","mdi-close-thick","mdi-content-copy","mdi-database-refresh","mdi-download","mdi-file-document-outline","mdi-file-excel-outline","mdi-file-music-outline","mdi-file-pdf-outline","mdi-filter-remove-outline","mdi-flip-vertical","mdi-folder","mdi-folder-open","mdi-help-circle","mdi-help-circle-outline","mdi-history","mdi-information","mdi-information-outline","mdi-link","mdi-link-variant","mdi-menu","mdi-microsoft-excel","mdi-minus","mdi-page-first","mdi-page-last","mdi-paperclip","mdi-pin-off-outline","mdi-pin-outline","mdi-playlist-plus","mdi-playlist-remove","mdi-plus","mdi-redo","mdi-refresh","mdi-shape-square-plus","mdi-sort-ascending","mdi-sort-descending","mdi-swap-horizontal","mdi-swap-vertical","mdi-sync","mdi-table-edit","mdi-table-refresh","mdi-undo"],u=Math.floor(Math.random()*a.length-1);return a[e??u]}renderItemCallbackWith2Rows(e){return`
\n
\n \x3c!----\x3e\n \n
\n
\n \n \n ${e.itemName}\n \n
\n
\n
\n
${e.itemNameTranslated}
\n
`}renderItemCallbackWith4Corners(e){return`
\n
\n \x3c!----\x3e\n \n
\n
\n \n \n ${e.itemName}\n \n ${Pu(e.listPrice,2,2,!1,"$")}\n
\n
\n
\n
${e.itemNameTranslated}
\n Type: ${"I"===e.itemTypeName?"Item":"C"===e.itemTypeName?"PdCat":"Cat"}\n
`}static#e=this.ctorParameters=()=>[{type:jt}]};t9=$e([ca({template:'
\n

\n {{title}}\n \n \n \n code\n \n \n

\n
\n\n
\n
\n \n \n \n \n \n
\n
\n\n
\n
\n \n \n \n \n \n
\n
\n\n \n \n
',encapsulation:ja.None,styles:[jpe()]}),Ct("design:paramtypes",[jt])],t9);var qpe=O(998),Ype=O.n(qpe);const Qpe=(t,e,a,u,i)=>3===i.priority?'
Action
':'
Action
',Xpe=(t,e,a)=>{if(!a)return"";let u="";const i=+(a>=3?3:a),o=``;for(let d=1;d<=i;d++)u+=o;return u},e3e=(t,e,a,u,i,r)=>{if(!a)return"";const d=r.getOptions().i18n,h=+(a>=3?3:a),m=3===h?"HIGH":2===h?"MEDIUM":"LOW";return d&&d.instant&&d.instant(m)},a3e=(t,e,a,u,i,r)=>{const d=r.getOptions().i18n;return d&&d.instant&&d.instant("TASK_X",{x:a})};let u9=class{constructor(e){this.translate=e,this.title="Example 26: Cell Menu & Context Menu Plugins",this.subTitle='Add Cell Menu and Context Menu\n
    \n
  • This example demonstrates 2 SlickGrid plugins\n
      \n
    1. Using the Slick.Plugins.CellMenu plugin, often used for an Action Menu(s), 1 or more per grid\n (Wiki docs).\n
    2. \n
    3. Using the Slick.Plugins.ContextMenu plugin, shown after a mouse right+click, only 1 per grid.\n (Wiki docs).\n
    4. \n
    \n
  • It will also "autoAdjustDrop" (bottom/top) and "autoAlignSide" (left/right) by default but could be turned off
  • \n
  • Both plugins have 2 sections, 1st section can have an array of Options (to change value of a field) and 2nd section an array of Commands (execute a command)
  • \n
  • There are 2 ways to execute a Command/Option
  • \n
      \n
    1. via onCommand/onOptionSelected (use a switch/case to parse command/option and do something with it)
    2. \n
    3. via action callback (that can be defined on each command/option)
    4. \n
    \n
  • Use override callback functions to change the properties of show/hide, enable/disable the menu or certain item(s) from the list
  • \n
      \n
    1. These callbacks are: "menuUsabilityOverride", "itemVisibilityOverride", "itemUsabilityOverride"
    2. \n
    3. ... e.g. in the demo, the "Action" Cell Menu is only available when Priority is set to "High" via "menuUsabilityOverride"
    4. \n
    5. ... e.g. in the demo, the Context Menu is only available on the first 20 Tasks via "menuUsabilityOverride"
    6. \n
    \n
',this._darkModeGrid=!1,this.subscriptions=[];this.translate.use("en"),this.selectedLanguage="en"}angularGridReady(e){this.angularGrid=e}get cellMenuInstance(){return this.angularGrid?.extensionService?.getExtensionInstanceByName(Ea.cellMenu)}get contextMenuInstance(){return this.angularGrid?.extensionService?.getExtensionInstanceByName(Ea.contextMenu)}ngOnInit(){this.prepareGrid(),this.dataset=this.getData(1e3)}ngOnDestroy(){rd(this.subscriptions),document.querySelector(".panel-wm-content").classList.remove("dark-mode"),document.querySelector("#demo-container").dataset.bsTheme="light"}prepareGrid(){this.columnDefinitions=[{id:"id",name:"#",field:"id",maxWidth:45,sortable:!0,filterable:!0},{id:"title",name:"Title",field:"id",nameKey:"TITLE",minWidth:100,formatter:a3e,sortable:!0,filterable:!0,params:{useFormatterOuputToFilter:!0}},{id:"percentComplete",nameKey:"PERCENT_COMPLETE",field:"percentComplete",minWidth:100,exportWithFormatter:!1,sortable:!0,filterable:!0,filter:{model:ie.slider,operator:">="},formatter:j.percentCompleteBar,type:w.number},{id:"start",name:"Start",field:"start",nameKey:"START",minWidth:100,formatter:j.dateIso,outputType:w.dateIso,type:w.date,filterable:!0,filter:{model:ie.compoundDate}},{id:"finish",name:"Finish",field:"finish",nameKey:"FINISH",formatter:j.dateIso,outputType:w.dateIso,type:w.date,minWidth:100,filterable:!0,filter:{model:ie.compoundDate}},{id:"priority",nameKey:"PRIORITY",field:"priority",exportCustomFormatter:e3e,formatter:Xpe,sortable:!0,filterable:!0,filter:{collection:[{value:"",label:""},{value:1,labelKey:"LOW"},{value:2,labelKey:"MEDIUM"},{value:3,labelKey:"HIGH"}],model:ie.singleSelect,enableTranslateLabel:!0}},{id:"completed",nameKey:"COMPLETED",field:"completed",exportCustomFormatter:j.translateBoolean,formatter:j.checkmarkMaterial,sortable:!0,filterable:!0,filter:{collection:[{value:"",label:""},{value:!0,labelKey:"TRUE"},{value:!1,labelKey:"FALSE"}],model:ie.singleSelect,enableTranslateLabel:!0}},{id:"action",name:"Action",field:"action",width:100,maxWidth:110,excludeFromExport:!0,formatter:Qpe,cellMenu:{hideCloseButton:!1,menuUsabilityOverride:e=>3===e.dataContext.priority,commandTitleKey:"COMMANDS",commandItems:[{command:"command2",title:"Command 2",positionOrder:62,action:(e,a)=>{console.log(a.dataContext,a.column)},itemUsabilityOverride:e=>!e.dataContext.completed},{command:"command1",title:"Command 1",cssClass:"orange",positionOrder:61},{command:"delete-row",titleKey:"DELETE_ROW",positionOrder:64,iconCssClass:"mdi mdi-close",cssClass:"red",textCssClass:"bold",itemVisibilityOverride:e=>!e.dataContext.completed},{divider:!0,command:"",positionOrder:63},{command:"help",titleKey:"HELP",iconCssClass:"mdi mdi-help-circle",positionOrder:66},{command:"something",titleKey:"DISABLED_COMMAND",disabled:!0,positionOrder:67},{command:"",divider:!0,positionOrder:98},{command:"export",title:"Exports",positionOrder:99,commandItems:[{command:"exports-txt",title:"Text (tab delimited)"},{command:"sub-menu",title:"Excel",cssClass:"green",subMenuTitle:"available formats",subMenuTitleCssClass:"text-italic orange",commandItems:[{command:"exports-csv",title:"Excel (csv)"},{command:"exports-xlsx",title:"Excel (xlsx)"}]}]},{command:"feedback",title:"Feedback",positionOrder:100,commandItems:[{command:"request-update",title:"Request update from supplier",iconCssClass:"mdi mdi-star",tooltip:"this will automatically send an alert to the shipping team to contact the user for an update"},"divider",{command:"sub-menu",title:"Contact Us",iconCssClass:"mdi mdi-account",subMenuTitle:"contact us...",subMenuTitleCssClass:"italic",commandItems:[{command:"contact-email",title:"Email us",iconCssClass:"mdi mdi-pencil-outline"},{command:"contact-chat",title:"Chat with us",iconCssClass:"mdi mdi-message-text-outline"},{command:"contact-meeting",title:"Book an appointment",iconCssClass:"mdi mdi-coffee"}]}]}],optionTitleKey:"CHANGE_COMPLETED_FLAG",optionItems:[{option:!0,titleKey:"TRUE",iconCssClass:"mdi mdi-check-box-outline"},{option:!1,titleKey:"FALSE",iconCssClass:"mdi mdi-checkbox-blank-outline"},{option:null,title:"null",cssClass:"italic",action:(e,a)=>{},itemUsabilityOverride:e=>3===e.dataContext.priority,itemVisibilityOverride:e=>!e.dataContext.completed}]}}],this.gridOptions={autoResize:{container:"#demo-container",rightPadding:10},darkMode:this._darkModeGrid,enableCellNavigation:!0,enableFiltering:!0,enableSorting:!0,enableTranslate:!0,enableExcelExport:!0,excelExportOptions:{exportWithFormatter:!0,customColumnWidth:15,columnHeaderStyle:{font:{bold:!0,italic:!0}}},i18n:this.translate,externalResources:[new Bo],enableContextMenu:!0,enableCellMenu:!0,cellMenu:{onCommand:(e,a)=>this.executeCommand(e,a),onOptionSelected:(e,a)=>{const u=a&&a.dataContext;u&&"completed"in u&&(u.completed=a.item.option,this.angularGrid.gridService.updateItem(u))},onBeforeMenuShow:(e,a)=>{console.log("Before the Cell Menu is shown",a)},onBeforeMenuClose:(e,a)=>console.log("Cell Menu is closing",a)},contextMenu:this.getContextMenuOptions()}}executeCommand(e,a){const u=a.command,i=a.dataContext;switch(u){case"contact-email":case"contact-chat":case"contact-meeting":alert("Command: "+a?.command);break;case"exports-csv":case"exports-txt":case"exports-xlsx":alert(`Exporting as ${a.item.title}`);break;case"command1":alert("Command 1");break;case"command2":alert("Command 2");break;case"help":alert("Please help!");break;case"delete-row":confirm(`Do you really want to delete row ${a.row+1} with ${this.translate.instant("TASK_X",{x:i.id})}`)&&this.angularGrid.dataView.deleteItem(i.id)}}getData(e){const a=[];for(let u=0;u(e&&e.dataContext).id<21,commandShownOverColumnIds:["id","title","percentComplete","start","finish","completed"],commandTitleKey:"COMMANDS",commandItems:[{divider:!0,command:"",positionOrder:61},{command:"delete-row",titleKey:"DELETE_ROW",iconCssClass:"mdi mdi-close",cssClass:"red",textCssClass:"bold",positionOrder:62},{divider:!0,command:"",positionOrder:63},{command:"help",titleKey:"HELP",iconCssClass:"mdi mdi-help-circle",positionOrder:64,action:(e,a)=>{},itemVisibilityOverride:e=>!(e&&e.dataContext).completed},{command:"something",titleKey:"DISABLED_COMMAND",disabled:!0,positionOrder:65},{command:"",divider:!0,positionOrder:98},{command:"export",title:"Exports",positionOrder:99,commandItems:[{command:"exports-txt",title:"Text (tab delimited)"},{command:"sub-menu",title:"Excel",cssClass:"green",subMenuTitle:"available formats",subMenuTitleCssClass:"text-italic orange",commandItems:[{command:"exports-csv",title:"Excel (csv)"},{command:"exports-xlsx",title:"Excel (xlsx)"}]}]},{command:"feedback",title:"Feedback",positionOrder:100,commandItems:[{command:"request-update",title:"Request update from supplier",iconCssClass:"mdi mdi-star",tooltip:"this will automatically send an alert to the shipping team to contact the user for an update"},"divider",{command:"sub-menu",title:"Contact Us",iconCssClass:"mdi mdi-account",subMenuTitle:"contact us...",subMenuTitleCssClass:"italic",commandItems:[{command:"contact-email",title:"Email us",iconCssClass:"mdi mdi-pencil-outline"},{command:"contact-chat",title:"Chat with us",iconCssClass:"mdi mdi-message-text-outline"},{command:"contact-meeting",title:"Book an appointment",iconCssClass:"mdi mdi-coffee"}]}]}],optionTitleKey:"CHANGE_PRIORITY",optionShownOverColumnIds:["priority"],optionItems:[{option:0,title:"n/a",textCssClass:"italic",itemUsabilityOverride:e=>!(e&&e.dataContext).completed,action:(e,a)=>{}},{option:1,iconCssClass:"mdi mdi-star-outline yellow",titleKey:"LOW"},{option:2,iconCssClass:"mdi mdi-star orange",titleKey:"MEDIUM"},{option:3,iconCssClass:"mdi mdi-star red",titleKey:"HIGH"},"divider",{option:4,title:"Extreme",iconCssClass:"mdi mdi-fire",disabled:!0,itemVisibilityOverride:e=>!(e&&e.dataContext).completed},{option:null,title:"Sub-Options (demo)",subMenuTitleKey:"CHANGE_PRIORITY",optionItems:[{option:1,iconCssClass:"mdi mdi-star-outline yellow",titleKey:"LOW"},{option:2,iconCssClass:"mdi mdi-star orange",titleKey:"MEDIUM"},{option:3,iconCssClass:"mdi mdi-star red",titleKey:"HIGH"}]}],onBeforeMenuShow:(e,a)=>{this.angularGrid.slickGrid.setActiveCell(a.row,a.cell,!1),console.log("Before the global Context Menu is shown",a)},onBeforeMenuClose:(e,a)=>console.log("Global Context Menu is closing",a),onCommand:(e,a)=>this.executeCommand(e,a),onOptionSelected:(e,a)=>{const u=a&&a.dataContext;u&&"priority"in u&&(u.priority=a.item.option,this.angularGrid.gridService.updateItem(u))}}}showContextCommandsAndOptions(e){const a=e?[]:["id","title","complete","start","finish","completed","action"];this.contextMenuInstance?.setOptions({commandShownOverColumnIds:a})}showCellMenuCommandsAndOptions(e){this.cellMenuInstance?.setOptions({hideOptionSection:!e})}switchLanguage(){const e="en"===this.selectedLanguage?"fr":"en";this.subscriptions.push(this.translate.use(e).subscribe(()=>{this.selectedLanguage=e}))}toggleDarkMode(){this._darkModeGrid=!this._darkModeGrid,this._darkModeGrid?(document.querySelector(".panel-wm-content").classList.add("dark-mode"),document.querySelector("#demo-container").dataset.bsTheme="dark"):(document.querySelector(".panel-wm-content").classList.remove("dark-mode"),document.querySelector("#demo-container").dataset.bsTheme="light"),this.angularGrid.slickGrid?.setOptions({darkMode:this._darkModeGrid})}static#e=this.ctorParameters=()=>[{type:et}]};u9=$e([ca({template:'
\n

\n {{title}}\n \n \n \n code\n \n \n

\n
\n\n
\n
\n \n Context Menu:\n \n \n \n\n \n Cell Menu:\n \n \n \n
\n
\n
\n
\n \n Locale:\n \n {{selectedLanguage + \'.json\'}}\n \n
\n
\n\n
\n \n \n
\n
',encapsulation:ja.None,styles:[Ype()]}),Ct("design:paramtypes",[et])],u9);var u3e=O(999),i3e=O.n(u3e);let i9=class{constructor(){this.title="Example 32: Regular & Custom Tooltips",this.subTitle='\n This demo shows how to create Regular & Custom Tooltips (Wiki docs)\n
\n
    \n
  • optionally parse regular [title] attributes and transform them into tooltips
  • \n
  • create your own Custom Tooltip via a Custom Formatter
  • \n
  • create an Async Custom Tooltip (Promise/Observable) to allowing fetching data from an API
  • \n
  • optionally add Custom Tooltip on Column Header & Column Header-Row (filters)
  • \n
\n ',this.editCommandQueue=[],this.serverApiDelay=500}ngOnInit(){this.initializeGrid(),this.dataset=this.loadData(500)}angularGridReady(e){this.angularGrid=e}initializeGrid(){this.columnDefinitions=[{id:"title",name:"Title",field:"title",sortable:!0,type:w.string,editor:{model:Ye.longText,required:!0,alwaysSaveOnEnterKey:!0,minLength:5,maxLength:255},filterable:!0,customTooltip:{position:"right-align",formatter:()=>'
loading...
',asyncProcess:()=>new Promise(e=>{setTimeout(()=>e({ratio:10*Math.random()/10,lifespan:100*Math.random()}),this.serverApiDelay)}),asyncPostFormatter:this.tooltipTaskAsyncFormatter}},{id:"duration",name:"Duration",field:"duration",sortable:!0,filterable:!0,editor:{model:Ye.float,decimal:2,valueStep:1,maxValue:1e4,alwaysSaveOnEnterKey:!0},formatter:(e,a,u)=>u>1?`${u} days`:`${u} day`,type:w.number},{id:"desc",name:"Description",field:"description",width:100,filterable:!0,editor:{model:Ye.longText,required:!0,alwaysSaveOnEnterKey:!0,minLength:5,maxLength:255},formatter:(e,a,u,i,r)=>`${u||""}`,customTooltip:{useRegularTooltip:!0,useRegularTooltipFromCellTextOnly:!0}},{id:"desc2",name:"Description 2",field:"description",width:100,filterable:!0,editor:{model:Ye.longText,required:!0,alwaysSaveOnEnterKey:!0,minLength:5,maxLength:255},formatter:(e,a,u,i,r)=>`${u||""}`,customTooltip:{useRegularTooltip:!0,useRegularTooltipFromFormatterOnly:!0}},{id:"cost",name:'Cost',field:"cost",width:90,sortable:!0,filterable:!0,formatter:j.multiple,params:{formatters:[j.dollar,(e,a,u)=>`${u||""}`]},customTooltip:{useRegularTooltip:!0,useRegularTooltipFromFormatterOnly:!0},type:w.number},{id:"percentComplete",name:"% Complete",field:"percentComplete",type:w.number,editor:{model:Ye.slider,minValue:0,maxValue:100},formatter:j.percentCompleteBar,sortable:!0,filterable:!0,filter:{model:ie.slider,operator:">="},customTooltip:{position:"center",formatter:(e,a,u)=>"string"==typeof u&&u.includes("%")?u:`${u}%`,headerFormatter:void 0,headerRowFormatter:void 0}},{id:"start",name:"Start",field:"start",sortable:!0,type:w.date,outputType:w.dateIso,filterable:!0,filter:{model:ie.compoundDate},formatter:j.dateIso,editor:{model:Ye.date},customTooltip:{formatter:()=>"",asyncProcess:()=>new Promise(e=>{setTimeout(()=>e({}),this.serverApiDelay)}),asyncPostFormatter:this.tooltipFormatter.bind(this)}},{id:"finish",name:"Finish",field:"finish",sortable:!0,editor:{model:Ye.date,editorOptions:{range:{min:"today"}}},type:w.date,outputType:w.dateIso,formatter:j.dateIso,filterable:!0,filter:{model:ie.dateRange},disableTooltip:!0},{id:"effortDriven",name:"Effort Driven",field:"effortDriven",width:80,minWidth:20,maxWidth:100,cssClass:"cell-effort-driven",sortable:!0,filterable:!0,filter:{collection:[{value:"",label:""},{value:!0,label:"True"},{value:!1,label:"False"}],model:ie.singleSelect},exportWithFormatter:!1,formatter:j.checkmarkMaterial},{id:"prerequisites",name:"Prerequisites",field:"prerequisites",filterable:!0,formatter:(e,a,u)=>{if(u&&Array.isArray(u)){const i=u.map(r=>`Task ${r}`).join(", ");return`${i}`}return""},customTooltip:{useRegularTooltip:!0,maxWidth:500},exportWithFormatter:!0,sanitizeDataExport:!0,minWidth:100,sortable:!0,type:w.string,editor:{collectionAsync:new Promise(e=>{setTimeout(()=>{e(Array.from(Array(this.dataset.length).keys()).map(a=>({value:a,label:a,prefix:"Task",suffix:"days"})))},500)}),customStructure:{label:"label",value:"value",labelPrefix:"prefix"},collectionOptions:{separatorBetweenTextLabels:" "},model:Ye.multipleSelect},filter:{collectionAsync:new Promise(e=>{setTimeout(()=>{e(Array.from(Array(this.dataset.length).keys()).map(a=>({value:a,label:`Task ${a}`})))})}),customStructure:{label:"label",value:"value",labelPrefix:"prefix"},collectionOptions:{separatorBetweenTextLabels:" "},model:ie.multipleSelect,operator:te.inContains}},{id:"action",name:"Action",field:"action",width:70,minWidth:70,maxWidth:70,formatter:()=>'
',excludeFromExport:!0,cellMenu:{hideCloseButton:!1,commandTitle:"Commands",commandItems:[{command:"command2",title:"Command 2",positionOrder:62,action:(e,a)=>{console.log(a.dataContext,a.column)},itemUsabilityOverride:e=>!e.dataContext.completed},{command:"command1",title:"Command 1",cssClass:"orange",positionOrder:61},{command:"delete-row",title:"Delete Row",positionOrder:64,iconCssClass:"mdi mdi-close",cssClass:"red",textCssClass:"bold",itemVisibilityOverride:e=>!e.dataContext.completed},{divider:!0,command:"",positionOrder:63},{command:"help",title:"Help",iconCssClass:"mdi mdi-help-circle-outline",positionOrder:66},{command:"something",title:"Disabled Command",disabled:!0,positionOrder:67}]}}],this.gridOptions={autoEdit:!0,autoCommitEdit:!0,editable:!0,autoResize:{container:"#demo-container"},enableAutoSizeColumns:!0,enableAutoResize:!0,enableCellNavigation:!0,enableExcelExport:!0,excelExportOptions:{exportWithFormatter:!0},externalResources:[new T7,new Bo],customTooltip:{formatter:this.tooltipFormatter.bind(this),headerFormatter:this.headerFormatter,headerRowFormatter:this.headerRowFormatter,usabilityOverride:e=>0!==e.cell&&"action"!==e?.column?.id},presets:{filters:[{columnId:"prerequisites",searchTerms:[1,3,5,7,9,12,15,18,21,25,28,29,30,32,34]}]},rowHeight:33,enableFiltering:!0,rowSelectionOptions:{selectActiveRow:!1},showCustomFooter:!0,enableCheckboxSelector:!0,enableRowSelection:!0,checkboxSelector:{hideInFilterHeaderRow:!1,hideInColumnTitleRow:!0},editCommandHandler:(e,a,u)=>{this.editCommandQueue.push(u),u.execute()},enableCellMenu:!0,cellMenu:{onCommand:(e,a)=>this.executeCommand(e,a),onOptionSelected:(e,a)=>{const u=a&&a.dataContext;u&&"completed"in u&&(u.completed=a.item.option,this.angularGrid.gridService.updateItem(u))}}}}loadData(e){const a=[];for(let u=0;uCustom Tooltip - Header
\n
Column:
${i.name}
`}headerRowFormatter(e,a,u,i){return`
Custom Tooltip - Header Row (filter)
\n
Column:
${i.field}
`}tooltipFormatter(e,a,u,i,r,o){const h=j.checkmarkMaterial(e,a,r.effortDriven,i,r,o);return`
Custom Tooltip
\n
Id:
${r.id}
\n
Title:
${r.title}
\n
Effort Driven:
${h.outerHTML||""}
\n
Completion:
${this.loadCompletionIcons(r.percentComplete)}
\n `}tooltipTaskAsyncFormatter(e,a,u,i,r,o){return`
${`Task ${r.id} - (async tooltip)`}
\n
Completion:
${j.percentCompleteBarWithText(e,a,r.percentComplete,i,r,o).outerHTML||""}
\n
Lifespan:
${r.__params.lifespan.toFixed(2)}
\n
Ratio:
${r.__params.ratio.toFixed(2)}
\n `}loadCompletionIcons(e){let a="",u=0;e>5&&e<25?u=1:e>=25&&e<50?u=2:e>=50&&e<75?u=3:e>=75&&e<100?u=4:100===e&&(u=5);for(let i=0;i=3?"text-warning":"text-secondary"}">`}return a}};i9=$e([ca({template:'
\n

\n {{title}}\n \n \n code\n \n \n

\n
\n\n
\n \n \n
\n\n \n \n
',encapsulation:ja.None,styles:[i3e()]})],i9);function Pc(t,e,a){return e<=t&&t<=a}function n9(t){if(void 0===t)return{};if(t===Object(t))return t;throw TypeError("Could not convert argument to dictionary")}function UT(t){this.tokens=[].slice.call(t)}UT.prototype={endOfStream:function(){return!this.tokens.length},read:function(){return this.tokens.length?this.tokens.shift():-1},prepend:function(t){if(Array.isArray(t))for(var e=t;e.length;)this.tokens.unshift(e.pop());else this.tokens.unshift(t)},push:function(t){if(Array.isArray(t))for(var e=t;e.length;)this.tokens.push(e.shift());else this.tokens.push(t)}};function JT(t,e){if(t)throw TypeError("Decoder error");return e||65533}(function s3e(){}).prototype={handler:function(t,e){}},function d3e(){}.prototype={handler:function(t,e){}};var o9="utf-8";function l9(t,e){if(!(this instanceof l9))return new l9(t,e);if((t=void 0!==t?String(t).toLowerCase():o9)!==o9)throw new Error("Encoding not supported. Only utf-8 is supported");e=n9(e),this._streaming=!1,this._encoder=null,this._options={fatal:!!e.fatal},Object.defineProperty(this,"encoding",{value:"utf-8"})}function c3e(t){var e=t.fatal,a=0,u=0,i=0,r=128,o=191;this.handler=function(d,h){if(-1===h&&0!==i)return i=0,JT(e);if(-1===h)return-1;if(0===i){if(Pc(h,0,127))return h;if(Pc(h,194,223))i=1,a=h-192;else if(Pc(h,224,239))224===h&&(r=160),237===h&&(o=159),i=2,a=h-224;else{if(!Pc(h,240,244))return JT(e);240===h&&(r=144),244===h&&(o=143),i=3,a=h-240}return a<<=6*i,null}if(!Pc(h,r,o))return a=i=u=0,r=128,o=191,d.prepend(h),JT(e);if(r=128,o=191,a+=h-128<<6*(i-(u+=1)),u!==i)return null;var m=a;return a=i=u=0,m}}function h3e(t){t.fatal;this.handler=function(a,u){if(-1===u)return-1;if(Pc(u,0,127))return u;var i,r;Pc(u,128,2047)?(i=1,r=192):Pc(u,2048,65535)?(i=2,r=224):Pc(u,65536,1114111)&&(i=3,r=240);for(var o=[(u>>6*i)+r];i>0;){var d=u>>6*(i-1);o.push(128|63&d),i-=1}return o}}(function ZT(t,e){if(!(this instanceof ZT))return new ZT(t,e);if((t=void 0!==t?String(t).toLowerCase():o9)!==o9)throw new Error("Encoding not supported. Only utf-8 is supported");e=n9(e),this._streaming=!1,this._BOMseen=!1,this._decoder=null,this._fatal=!!e.fatal,this._ignoreBOM=!!e.ignoreBOM,Object.defineProperty(this,"encoding",{value:"utf-8"}),Object.defineProperty(this,"fatal",{value:this._fatal}),Object.defineProperty(this,"ignoreBOM",{value:this._ignoreBOM})}).prototype={decode:function(e,a){var u;u="object"==typeof e&&e instanceof ArrayBuffer?new Uint8Array(e):"object"==typeof e&&"buffer"in e&&e.buffer instanceof ArrayBuffer?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):new Uint8Array(0),a=n9(a),this._streaming||(this._decoder=new c3e({fatal:this._fatal}),this._BOMseen=!1),this._streaming=!!a.stream;for(var o,i=new UT(u),r=[];!i.endOfStream()&&-1!==(o=this._decoder.handler(i,i.read()));)null!==o&&(Array.isArray(o)?r.push.apply(r,o):r.push(o));if(!this._streaming){do{if(-1===(o=this._decoder.handler(i,i.read())))break;null!==o&&(Array.isArray(o)?r.push.apply(r,o):r.push(o))}while(!i.endOfStream());this._decoder=null}return r.length&&-1!==["utf-8"].indexOf(this.encoding)&&!this._ignoreBOM&&!this._BOMseen&&(65279===r[0]?(this._BOMseen=!0,r.shift()):this._BOMseen=!0),function l3e(t){for(var e="",a=0;a>10),56320+(1023&u)))}return e}(r)}},l9.prototype={encode:function(e,a){e=e?String(e):"",a=n9(a),this._streaming||(this._encoder=new h3e(this._options)),this._streaming=!!a.stream;for(var r,u=[],i=new UT(function o3e(t){for(var e=String(t),a=e.length,u=0,i=[];u57343)i.push(r);else if(56320<=r&&r<=57343)i.push(65533);else if(55296<=r&&r<=56319)if(u===a-1)i.push(65533);else{var o=t.charCodeAt(u+1);if(56320<=o&&o<=57343){var d=1023&r,h=1023&o;i.push(65536+(d<<10)+h),u+=1}else i.push(65533)}u+=1}return i}(e));!i.endOfStream()&&-1!==(r=this._encoder.handler(i,i.read()));)Array.isArray(r)?u.push.apply(u,r):u.push(r);if(!this._streaming){for(;-1!==(r=this._encoder.handler(i,i.read()));)Array.isArray(r)?u.push.apply(u,r):u.push(r);this._encoder=null}return new Uint8Array(u)}};const m3e={delimiter:Qr.comma,filename:"export",format:yt.csv,useUtf8WithBom:!0};class $T{constructor(){this._delimiter=",",this._exportQuoteWrapper="",this._fileFormat=yt.csv,this._lineCarriageReturn="\n",this._columnHeaders=[],this._hasGroupedItems=!1,this.className="TextExportService"}get _datasetIdPropName(){return this._gridOptions&&this._gridOptions.datasetIdPropertyName||"id"}get _dataView(){return this._grid?.getData()}get _gridOptions(){return this._grid?.getOptions()??{}}dispose(){this._pubSubService?.unsubscribeAll()}init(e,a){if(this._grid=e,this._pubSubService=a.get("PubSubService"),this._locales=this._gridOptions&&this._gridOptions.locales||ue.locales,this._translaterService=this._gridOptions?.translater,this._gridOptions.enableTranslate&&(!this._translaterService||!this._translaterService.translate))throw new Error('[Slickgrid-Universal] requires a Translate Service to be passed in the "translater" Grid Options when "enableTranslate" is enabled. (example: this.gridOptions = { enableTranslate: true, translater: this.translaterService })')}exportToFile(e){if(!this._grid||!this._dataView||!this._pubSubService)throw new Error('[Slickgrid-Universal] it seems that the SlickGrid & DataView objects and/or PubSubService are not initialized did you forget to enable the grid option flag "enableTextExport"?');return new Promise(a=>{this._pubSubService?.publish("onBeforeExportToTextFile",!0),this._exportOptions=mu(!0,{},{...m3e,...this._gridOptions.textExportOptions,...e}),this._delimiter=this._exportOptions.delimiterOverride||this._exportOptions.delimiter||"",this._fileFormat=this._exportOptions.format||yt.csv;const u=this.getDataOutput();setTimeout(()=>{const i={filename:`${this._exportOptions.filename}.${this._fileFormat}`,format:this._fileFormat||yt.csv,mimeType:this._exportOptions.mimeType||"text/plain",useUtf8WithBom:!this._exportOptions||!this._exportOptions.hasOwnProperty("useUtf8WithBom")||this._exportOptions.useUtf8WithBom};this.startDownloadFile({...i,content:u}),this._pubSubService?.publish("onAfterExportToTextFile",i),a(!0)},0)})}startDownloadFile(e){const a=OG(e.content);let u;u=e.format===yt.csv?new l9("utf-8").encode(a):a;const i=new Blob([e.useUtf8WithBom?"\ufeff":"",u],{type:e.mimeType});if("function"==typeof navigator.msSaveOrOpenBlob)navigator.msSaveOrOpenBlob(i,e.filename);else{const r=document.createElement("a"),o=URL.createObjectURL(i);r.textContent="download",r.href=o,r.setAttribute("download",e.filename),r.style.visibility="hidden",document.body.appendChild(r),r.click(),document.body.removeChild(r)}}getDataOutput(){const e=this._grid.getColumns()||[];let a=this._exportOptions.groupingColumnHeaderTitle;!a&&this._gridOptions.enableTranslate&&this._translaterService?.translate&&this._translaterService?.getCurrentLanguage?.()?a=this._translaterService.translate(`${Wl(this._gridOptions)}GROUP_BY`):a||(a=this._locales&&this._locales.TEXT_GROUP_BY),this._exportQuoteWrapper=this._fileFormat===yt.csv?'"':"";let u="";const i=this._dataView.getGrouping();if(i&&Array.isArray(i)&&i.length>0?(this._hasGroupedItems=!0,u+=this._fileFormat===yt.csv?`"${a}"${this._delimiter}`:`${a}${this._delimiter}`):this._hasGroupedItems=!1,this._gridOptions.createPreHeaderPanel&&this._gridOptions.showPreHeaderPanel&&!this._gridOptions.enableDraggableGrouping&&(this._groupedColumnHeaders=this.getColumnGroupedHeaderTitles(e)||[],this._groupedColumnHeaders&&Array.isArray(this._groupedColumnHeaders)&&this._groupedColumnHeaders.length>0)){u+=this._groupedColumnHeaders.map(o=>`${this._exportQuoteWrapper}${o.title}${this._exportQuoteWrapper}`).join(this._delimiter)+this._lineCarriageReturn}if(this._columnHeaders=this.getColumnHeaders(e)||[],this._columnHeaders&&Array.isArray(this._columnHeaders)&&this._columnHeaders.length>0){u+=this._columnHeaders.map(o=>Iu(`${this._exportQuoteWrapper}${o.title}${this._exportQuoteWrapper}`)).join(this._delimiter)+this._lineCarriageReturn}return u+=this.getAllGridRowData(e,this._lineCarriageReturn),u}getAllGridRowData(e,a){const u=[],i=this._dataView.getLength();for(let r=0;r{let i="";i=u.columnGroupKey&&this._gridOptions.enableTranslate&&this._translaterService?.translate&&this._translaterService?.getCurrentLanguage?.()?this._translaterService.translate(u.columnGroupKey):u.columnGroup||"";const r=u.excludeFromExport||!1;(void 0===u.width||u.width>0)&&!r&&a.push({key:u.field||u.id,title:i||""})}),a}getColumnHeaders(e){const a=[];return e&&Array.isArray(e)&&e.forEach(u=>{let i="";i=(u.nameKey||u.nameKey)&&this._gridOptions.enableTranslate&&this._translaterService?.translate&&this._translaterService?.getCurrentLanguage?.()?this._translaterService.translate(u.nameKey||u.nameKey):ii(u.name||"","innerHTML")||Fo(u.field);const r=u.excludeFromExport||!1;(void 0===u.width||u.width>0)&&!r&&a.push({key:u.field||u.id,title:i||""})}),a}readRegularRowData(e,a,u){let i=0;const r=[],o=this._exportQuoteWrapper;let d=1;const h=this._dataView.getItemMetadata(a);for(let m=0,g=e.length;m1||"*"===d&&m>0||(d=D?.colspan??1),"*"!==d&&v.id in x&&(k=v.id)}if("*"===d&&m>0||!isNaN(d)&&+d>1&&v.id!==k)r.push(""),!isNaN(d)&&+d>1&&d--;else{let x=oT(a,m,v,u,this._grid,this._exportOptions);(v.sanitizeDataExport||this._exportOptions.sanitizeDataExport)&&(x=Iu(x)),this._fileFormat===yt.csv&&x&&(x=x.toString().replace(/"/gi,'""'));const D=v?.exportCsvForceToKeepAsString?"=":"";r.push(D+o+x+o)}i++}return r.join(this._delimiter)}readGroupedTitleRow(e){let a=Iu(e.title);const u=this._exportQuoteWrapper;return a=Dv(5*e.level)+a,this._fileFormat===yt.csv&&(a=a.toString().replace(/"/gi,'""')),u+a+u}readGroupedTotalRow(e,a){const u=this._exportOptions.delimiter,i=this._exportOptions.format,r=this._exportOptions.groupingAggregatorRowText||"",o=this._exportQuoteWrapper,d=[`${o}${r}${o}`];return e.forEach(h=>{let m="";const g=h.excludeFromExport||!1;if(h.groupTotalsFormatter){const v=h.groupTotalsFormatter(a,h,this._grid);m=v instanceof HTMLElement?v.textContent||"":v}(h.sanitizeDataExport||this._exportOptions.sanitizeDataExport)&&(m=Iu(m)),i===yt.csv&&(m=m.toString().replace(/"/gi,'""')),(void 0===h.width||h.width>0)&&!g&&d.push(o+m+o)}),d.join(u)}}let s9=class{constructor(){this._darkMode=!1,this.title="Example 19: Draggable Grouping & Aggregators",this.subTitle='\n
    \n
  • Wiki docs
  • \n
  • This example shows 3 ways of grouping
  • \n
      \n
    1. Drag any Column Header on the top placeholder to group by that column (support moti-columns grouping by adding more columns to the drop area).
    2. \n
    3. Use buttons and defined functions to group by wichever field you want
    4. \n
    5. Use the Select dropdown to group, the position of the Selects represent the grouping level
    6. \n
    \n
  • Fully dynamic and interactive multi-level grouping with filtering and aggregates ovor 50\'000 items
  • \n
  • Each grouping level can have its own aggregates (over child rows, child groups, or all descendant rows)..
  • \n
  • Use "Aggregators" and "GroupTotalFormatters" directly from Angular-Slickgrid
  • \n
\n ',this.durationOrderByCount=!1,this.processing=!1,this.selectedGroupingFields=["","",""],this.excelExportService=new Bo,this.textExportService=new $T,this.loadData(500),this.defineGrid()}ngOnInit(){this.defineGrid()}ngOnDestroy(){document.querySelector(".panel-wm-content").classList.remove("dark-mode"),document.querySelector("#demo-container").dataset.bsTheme="light"}angularGridReady(e){this.angularGrid=e,this.gridObj=e.slickGrid,this.dataviewObj=e.dataView}defineGrid(){this.columnDefinitions=[{id:"title",name:"Title",field:"title",columnGroup:"Common Factor",width:70,minWidth:50,cssClass:"cell-title",filterable:!0,sortable:!0,grouping:{getter:"title",formatter:e=>`Title: ${e.value} (${e.count} items)`,aggregators:[new Nt_Sum("cost")],aggregateCollapsed:!1,collapsed:!1}},{id:"duration",name:"Duration",field:"duration",columnGroup:"Common Factor",width:70,sortable:!0,filterable:!0,editor:{model:Ye.float,decimal:2,valueStep:1,maxValue:1e4,alwaysSaveOnEnterKey:!0},filter:{model:ie.slider,operator:">="},type:w.number,groupTotalsFormatter:Ka.sumTotals,grouping:{getter:"duration",formatter:e=>`Duration: ${e.value} (${e.count} items)`,comparer:(e,a)=>this.durationOrderByCount?e.count-a.count:ul.numeric(e.value,a.value,Gt.asc),aggregators:[new Nt_Sum("duration"),new Nt_Sum("cost")],aggregateCollapsed:!1,collapsed:!1}},{id:"start",name:"Start",field:"start",columnGroup:"Period",minWidth:60,sortable:!0,filterable:!0,filter:{model:ie.compoundDate},formatter:j.dateIso,type:w.dateUtc,outputType:w.dateIso,exportWithFormatter:!0,grouping:{getter:"start",formatter:e=>`Start: ${e.value} (${e.count} items)`,aggregators:[new Nt_Sum("cost")],aggregateCollapsed:!1,collapsed:!1}},{id:"finish",name:"Finish",field:"finish",columnGroup:"Period",minWidth:60,sortable:!0,filterable:!0,filter:{model:ie.compoundDate},formatter:j.dateIso,type:w.dateUtc,outputType:w.dateIso,exportWithFormatter:!0,grouping:{getter:"finish",formatter:e=>`Finish: ${e.value} (${e.count} items)`,aggregators:[new Nt_Sum("cost")],aggregateCollapsed:!1,collapsed:!1}},{id:"cost",name:"Cost",field:"cost",columnGroup:"Analysis",width:90,sortable:!0,filterable:!0,filter:{model:ie.compoundInput},formatter:j.dollar,groupTotalsFormatter:Ka.sumTotalsDollar,type:w.number,grouping:{getter:"cost",formatter:e=>`Cost: ${e.value} (${e.count} items)`,aggregators:[new Nt_Sum("cost")],aggregateCollapsed:!0,collapsed:!0}},{id:"percentComplete",name:"% Complete",field:"percentComplete",columnGroup:"Analysis",minWidth:70,width:90,formatter:j.percentCompleteBar,type:w.number,filterable:!0,filter:{model:ie.compoundSlider},sortable:!0,groupTotalsFormatter:Ka.avgTotalsPercentage,grouping:{getter:"percentComplete",formatter:e=>`% Complete: ${e.value} (${e.count} items)`,aggregators:[new Nt_Sum("cost")],aggregateCollapsed:!1,collapsed:!1},params:{groupFormatterPrefix:"Avg: "}},{id:"effortDriven",name:"Effort-Driven",field:"effortDriven",columnGroup:"Analysis",width:80,minWidth:20,maxWidth:100,cssClass:"cell-effort-driven",sortable:!0,filterable:!0,filter:{collection:[{value:"",label:""},{value:!0,label:"True"},{value:!1,label:"False"}],model:ie.singleSelect},formatter:j.checkmarkMaterial,grouping:{getter:"effortDriven",formatter:e=>`Effort-Driven: ${e.value?"True":"False"} (${e.count} items)`,aggregators:[new Nt_Sum("duration"),new Nt_Sum("cost")],collapsed:!1}}],this.gridOptions={autoResize:{container:"#demo-container",rightPadding:10},enableDraggableGrouping:!0,autoEdit:!0,autoCommitEdit:!0,editable:!0,enableCellNavigation:!0,createPreHeaderPanel:!0,showPreHeaderPanel:!0,preHeaderPanelHeight:30,createTopHeaderPanel:!0,showTopHeaderPanel:!0,topHeaderPanelHeight:35,showCustomFooter:!0,enableFiltering:!0,enableSorting:!0,textExportOptions:{sanitizeDataExport:!0},gridMenu:{onCommand:(e,a)=>{"toggle-preheader"===a.command&&this.clearGrouping()}},draggableGrouping:{dropPlaceHolderText:"Drop a column header here to group by the column",deleteIconCssClass:"mdi mdi-close text-color-danger",sortAscIconCssClass:"mdi mdi-arrow-up",sortDescIconCssClass:"mdi mdi-arrow-down",onGroupChanged:(e,a)=>this.onGroupChanged(a),onExtensionRegistered:e=>this.draggableGroupingPlugin=e},darkMode:this._darkMode,enableTextExport:!0,enableExcelExport:!0,excelExportOptions:{sanitizeDataExport:!0},externalResources:[this.excelExportService,this.textExportService]},this.loadData(500)}loadData(e){const a=[];for(let u=0;uthis.selectedGroupingFields[a]="")}collapseAllGroups(){this.dataviewObj.collapseAllGroups()}expandAllGroups(){this.dataviewObj.expandAllGroups()}exportToExcel(){this.excelExportService.exportToExcel({filename:"Export",format:yt.xlsx})}exportToCsv(e="csv"){this.textExportService.exportToFile({delimiter:"csv"===e?Qr.comma:Qr.tab,filename:"myExport",format:"csv"===e?yt.csv:yt.txt})}groupByDuration(){this.clearGrouping(),this.draggableGroupingPlugin&&this.draggableGroupingPlugin.setDroppedGroups&&(this.showPreHeader(),this.draggableGroupingPlugin.setDroppedGroups("duration"),this.gridObj.invalidate())}groupByDurationOrderByCount(e=!1){this.durationOrderByCount=e,this.clearGrouping(),this.groupByDuration();const a=e?[]:[{columnId:"duration",sortAsc:!0}];this.angularGrid.filterService.setSortColumnIcons(a)}groupByDurationEffortDriven(){this.clearGrouping(),this.draggableGroupingPlugin&&this.draggableGroupingPlugin.setDroppedGroups&&(this.showPreHeader(),this.draggableGroupingPlugin.setDroppedGroups(["duration","effortDriven"]),this.gridObj.invalidate())}groupByFieldName(e,a){if(this.clearGrouping(),this.draggableGroupingPlugin&&this.draggableGroupingPlugin.setDroppedGroups){const u=this.selectedGroupingFields.filter(i=>""!==i);this.showPreHeader(),this.draggableGroupingPlugin.setDroppedGroups(u),this.gridObj.invalidate()}}onGroupChanged(e){const a=e&&e.caller||[],u=e&&e.groupColumns||[];Array.isArray(this.selectedGroupingFields)&&Array.isArray(u)&&u.length>0?this.selectedGroupingFields.forEach((i,r)=>this.selectedGroupingFields[r]=u[r]&&u[r].getter||""):0===u.length&&"remove-group"===a&&this.clearGroupingSelects()}onCellChanged(){this.angularGrid.dataView?.refresh()}showPreHeader(){this.gridObj.setPreHeaderPanelVisibility(!0)}selectTrackByFn(e,a){return e}setFiltersDynamically(){this.angularGrid.filterService.updateFilters([{columnId:"percentComplete",operator:">=",searchTerms:["55"]},{columnId:"cost",operator:"<",searchTerms:["80"]}])}setSortingDynamically(){this.angularGrid.sortService.updateSorting([{columnId:"percentComplete",direction:"ASC"}])}toggleDraggableGroupingRow(){this.clearGrouping(),this.gridObj.setPreHeaderPanelVisibility(!this.gridObj.getOptions().showPreHeaderPanel)}toggleDarkMode(){this._darkMode=!this._darkMode,this.toggleBodyBackground(),this.angularGrid.slickGrid?.setOptions({darkMode:this._darkMode})}toggleBodyBackground(){this._darkMode?(document.querySelector(".panel-wm-content").classList.add("dark-mode"),document.querySelector("#demo-container").dataset.bsTheme="dark"):(document.querySelector(".panel-wm-content").classList.remove("dark-mode"),document.querySelector("#demo-container").dataset.bsTheme="light")}static#e=this.ctorParameters=()=>[]};s9=$e([ca({template:'
\n

\n {{title}}\n \n \n \n code\n \n \n

\n
\n\n
\n
\n
\n \n \n \n \n \n \n \n
\n
\n
\n
\n \n \n \n \n \n
\n
\n
\n
\n
\n
\n \n
\n \n
\n
\n
\n
\n
\n
\n
\n
\n
\n\n \n \n
'}),Ct("design:paramtypes",[])],s9);var g3e=O(195),iJ=O.n(g3e);class E3e{constructor(e){this.args=e,this.init()}get columnDef(){return this.args?.column??{}}get columnEditor(){return this.columnDef?.editor??{}}get hasAutoCommitEdit(){return this.args.grid.getOptions().autoCommitEdit??!1}get validator(){return this.columnEditor.validator||this.columnDef.validator}init(){const e=this.columnEditor?.placeholder||"",a=this.columnEditor?.title||"";this.inputElm=document.createElement("input"),this.inputElm.type="text",this.inputElm.className="editor-text",this.inputElm.placeholder=e,this.inputElm.title=a,this.args.container.appendChild(this.inputElm),this.inputElm.addEventListener("keydown",this.onKeydown.bind(this)),this.hasAutoCommitEdit&&this.inputElm.addEventListener("focusout",this.save.bind(this)),setTimeout(()=>{this.inputElm.focus(),this.inputElm.select()},50)}onKeydown(e){this._lastInputEvent=e,("ArrowLeft"===e.key||"ArrowRight"===e.key)&&e.stopImmediatePropagation()}destroy(){this.inputElm.removeEventListener("keydown",this.onKeydown.bind(this)),this.inputElm.removeEventListener("focusout",this.save.bind(this)),this.inputElm.remove()}focus(){this.inputElm.focus()}getValue(){return this.inputElm.value}setValue(e){this.inputElm.value=e}loadValue(e){this.defaultValue=e[this.args.column.field]||"",this.inputElm.value=this.defaultValue,this.inputElm.defaultValue=this.defaultValue,this.inputElm.select()}serializeValue(){return this.inputElm.value}applyValue(e,a){const u=this.validate(a);e[this.args.column.field]=u&&u.valid?a:""}isValueChanged(){const e=this._lastInputEvent?.key;return!(!this.columnEditor?.alwaysSaveOnEnterKey||"Enter"!==e)||!(""===this.inputElm.value&&null===this.defaultValue)&&this.inputElm.value!==this.defaultValue}save(){this.validate()?.valid&&(this.hasAutoCommitEdit?this.args.grid.getEditorLock().commitCurrentEdit():this.args.commitChanges())}validate(e){if(this.validator){const a=void 0!==e?e:this.inputElm?.value;return this.validator(a,this.args)}return{valid:!0,msg:null}}}const nJ="assets/data/collection_100_numbers.json",rJ="assets/data/countries.json",oJ="assets/data/country_names.json",qT=(t,e)=>null!=t&&t.length?/^Task\s\d+$/.test(t)?{valid:!0,msg:""}:{valid:!1,msg:'Your title is invalid, it must start with "Task" followed by a number'}:{valid:!1,msg:"This is a required field"},b3e=(t,e,a)=>{if(a&&Array.isArray(a)){const i=a.map(r=>`Task ${r}`).join(", ");return`${i}`}return""};let d9=class{constructor(e,a){this.http=e,this.translate=a,this.title="Example 3: Editors / Delete",this.subTitle='\n Grid with Inline Editors and onCellClick actions (Wiki docs).\n
    \n
  • Multiple Editors & Filters are available: AutoComplete, Checkbox, Date, Slider, SingleSelect, MultipleSelect, Float, Text, LongText... even Custom Editor
  • \n
  • When using "enableCellNavigation: true", clicking on a cell will automatically make it active & selected.
  • \n
    • If you don\'t want this behavior, then you should disable "enableCellNavigation"
    \n
  • Inline Editors requires "enableCellNavigation: true" (not sure why though)
  • \n
  • \n Support Excel Copy Buffer (SlickGrid Copy Manager Plugin), you can use it by simply enabling "enableExcelCopyBuffer" flag.\n Note that it will only evaluate Formatter when the "exportWithFormatter" flag is enabled (through "ExportOptions" or the column definition)\n
  • \n
  • MultipleSelect & SingeSelect Editors & Filters can use a regular "collection" or "collectionAsync" to load it asynchronously
  • \n
      \n
    • Click on "Add Item" and see the Editor/Filter or the "Prerequesites" column change
    • \n
    • Any Editor/Filter with a "collection" can be changed dynamically later in the future
    • \n
    \n
\n ',this._commandQueue=[],this.isAutoEdit=!0,this.selectedLanguage="en",this.duplicateTitleHeaderCount=1}ngOnInit(){this.prepareGrid()}angularGridReady(e){this.angularGrid=e,this.gridObj=e.slickGrid}prepareGrid(){this.columnDefinitions=[{id:"edit",field:"id",excludeFromColumnPicker:!0,excludeFromGridMenu:!0,excludeFromHeaderMenu:!0,formatter:j.icon,params:{iconCssClass:"mdi mdi-pencil pointer"},minWidth:30,maxWidth:30,onCellClick:(e,a)=>{console.log(a),this.alertWarning=`Editing: ${a.dataContext.title}`,this.angularGrid.gridService.highlightRow(a.row,1500),this.angularGrid.gridService.setSelectedRow(a.row)}},{id:"delete",field:"id",excludeFromColumnPicker:!0,excludeFromGridMenu:!0,excludeFromHeaderMenu:!0,formatter:j.icon,params:{iconCssClass:"mdi mdi-trash-can pointer"},minWidth:30,maxWidth:30},{id:"title",name:"Title",field:"title",minWidth:100,filterable:!0,sortable:!0,type:w.string,editor:{model:Ye.longText,required:!0,maxLength:12,editorOptions:{cols:42,rows:5,buttonTexts:{}},validator:qT},onCellChange:(e,a)=>{console.log(a),this.alertWarning=`Updated Title: ${a.dataContext.title}`}},{id:"title2",name:"Title, Custom Editor",field:"title",minWidth:70,filterable:!0,sortable:!0,type:w.string,editor:{model:E3e,placeholder:"custom",validator:qT},filter:{model:WT,placeholder:"\u{1f50e}\ufe0e custom"}},{id:"duration",name:"Duration (days)",field:"duration",minWidth:100,filterable:!0,sortable:!0,formatter:j.complexObject,type:w.number,exportWithFormatter:!0,filter:{model:ie.slider,filterOptions:{hideSliderNumber:!1}},editor:{model:Ye.slider,minValue:0,maxValue:100}},{id:"complete",name:"% Complete",field:"percentComplete",minWidth:100,filterable:!0,formatter:j.multiple,type:w.number,editor:{model:Ye.singleSelect,enableRenderHtml:!0,collection:Array.from(Array(101).keys()).map(e=>({value:e,label:e,symbol:''})),customStructure:{value:"value",label:"label",labelSuffix:"symbol"},collectionSortBy:{property:"label",sortDesc:!0},collectionFilterBy:{property:"value",value:0,operator:te.notEqual},editorOptions:{maxHeight:400}},params:{formatters:[j.collectionEditor,j.percentCompleteBar]}},{id:"start",name:"Start",field:"start",minWidth:100,filterable:!0,filter:{model:ie.compoundDate},formatter:j.multiple,params:{formatters:[j.complexObject,j.dateIso]},exportWithFormatter:!0,sortable:!0,type:w.date,editor:{model:Ye.date}},{id:"finish",name:"Finish",field:"finish",minWidth:100,filterable:!0,sortable:!0,filter:{model:ie.compoundDate},formatter:j.dateIso,exportWithFormatter:!0,type:w.date,saveOutputType:w.dateUtc,editor:{model:Ye.date,editorOptions:{range:{min:"today"}}}},{id:"cityOfOrigin",name:"City of Origin",field:"cityOfOrigin",filterable:!0,minWidth:100,editor:{model:Ye.autocompleter,placeholder:"\u{1f50e}\ufe0e search city",editorOptions:{forceUserInput:!0,minLength:3,fetch:(e,a)=>{iJ()(`http://gd.geobytes.com/AutoCompleteCity?q=${e}`).then(u=>u.json()).then(u=>a(u)).catch(u=>console.log("invalid JSONP response",u))}}},filter:{model:ie.autocompleter,filterOptions:{minLength:3,fetch:(e,a)=>{iJ()(`http://gd.geobytes.com/AutoCompleteCity?q=${e}`).then(u=>u.json()).then(u=>a(u)).catch(u=>console.log("invalid JSONP response",u))}}}},{id:"countryOfOrigin",name:"Country of Origin",field:"countryOfOrigin",formatter:j.complexObject,exportWithFormatter:!0,dataKey:"code",labelKey:"name",type:w.object,sortComparer:ul.objectString,filterable:!0,sortable:!0,minWidth:100,editor:{model:Ye.autocompleter,customStructure:{label:"name",value:"code"},collectionAsync:this.http.get(rJ)},filter:{model:ie.autocompleter,customStructure:{label:"name",value:"code"},collectionAsync:this.http.get(rJ)}},{id:"countryOfOriginName",name:"Country of Origin Name",field:"countryOfOriginName",filterable:!0,sortable:!0,minWidth:100,editor:{model:Ye.autocompleter,collectionAsync:this.http.get(oJ)},filter:{model:ie.autocompleter,collectionAsync:this.http.get(oJ)}},{id:"effort-driven",name:"Effort Driven",field:"effortDriven",minWidth:70,filterable:!0,type:w.boolean,filter:{model:ie.singleSelect,collection:[{value:"",label:""},{value:!0,label:"True"},{value:!1,label:"False"}]},formatter:j.checkmarkMaterial,editor:{model:Ye.checkbox}},{id:"prerequisites",name:"Prerequisites",field:"prerequisites",minWidth:100,filterable:!0,formatter:b3e,exportWithFormatter:!0,sanitizeDataExport:!0,sortable:!0,type:w.string,editor:{placeholder:"choose option",collectionAsync:this.http.get(nJ),collectionSortBy:{property:"label",sortDesc:!0},customStructure:{label:"label",value:"value",labelPrefix:"prefix"},collectionOptions:{separatorBetweenTextLabels:" "},model:Ye.multipleSelect,required:!0},filter:{collectionAsync:this.http.get(nJ),collectionSortBy:{property:"label",sortDesc:!0},customStructure:{label:"label",value:"value",labelPrefix:"prefix"},collectionOptions:{separatorBetweenTextLabels:" "},model:ie.multipleSelect,operator:te.inContains}}],this.gridOptions={asyncEditorLoading:!1,autoEdit:this.isAutoEdit,autoCommitEdit:!1,autoResize:{container:"#demo-container",rightPadding:10},editable:!0,enableCellNavigation:!0,enableColumnPicker:!0,enableExcelCopyBuffer:!0,enableFiltering:!0,editCommandHandler:(e,a,u)=>{this._commandQueue.push(u),u.execute()},i18n:this.translate},this.dataset=this.mockData(100)}addItem(){const e=this.dataset.length,a=this.mockData(1,e);setTimeout(()=>{const u=this.columnDefinitions.find(i=>"prerequisites"===i.id);if(u){const i=u.filter.collectionAsync,r=u.editor.collection;Array.isArray(r)&&(this.angularGrid.gridService.addItem(a[0]),r.push({value:e,label:e,prefix:"Task"}),i instanceof sa&&i.next(r))}},250)}deleteItem(){const e=this.columnDefinitions.find(a=>"prerequisites"===a.id);if(e){const a=e.filter.collectionAsync,u=e.filter.collection;if(Array.isArray(u)){const i=this.sortCollectionDescending(u).pop();this.angularGrid.gridService.deleteItemById(i.value),a instanceof sa&&a.next(u)}}}sortCollectionDescending(e){return e.sort((a,u)=>a.value-u.value)}mockData(e,a=0){const u=[];for(let i=a;i[{type:jt},{type:et}]};d9=$e([ca({template:'
\n

\n {{title}}\n \n \n code\n \n \n

\n
\n\n
\n
\n \n \n \n \n \n
\n \n \n \n \n
\n
\n
\n \n \n \n \n
\n
\n
\n
\n \n \n
\n
\n
\n\n
\n
\n Updated Item: {{updatedObject | json}}\n
\n
\n Updated Item: {{alertWarning}}\n
\n
\n
\n\n
\n \n \n
\n
'}),Ct("design:paramtypes",[jt,et])],d9);let c9=class{constructor(){this._darkMode=!1,this.title="Example 37: Footer Totals Row",this.subTitle="Display a totals row at the end of the grid.",this.columnDefinitions=[]}angularGridReady(e){this.angularGrid=e,this.updateAllTotals()}ngOnInit(){this.defineGrid(),this.dataset=this.loadData(100)}ngOnDestroy(){document.querySelector(".panel-wm-content").classList.remove("dark-mode"),document.querySelector("#demo-container").dataset.bsTheme="light"}defineGrid(){const e=[];for(let a=0;a<10;a++)e.push({id:a,name:String.fromCharCode(65+a),field:String(a),type:w.number,width:58,editor:{model:Ye.integer}});this.columnDefinitions=e,this.gridOptions={autoEdit:!0,autoCommitEdit:!0,editable:!0,darkMode:this._darkMode,gridHeight:450,gridWidth:800,enableCellNavigation:!0,rowHeight:30,createFooterRow:!0,showFooterRow:!0,footerRowHeight:28}}loadData(e){const a=[];for(let u=0;u\n

\n {{title}}\n \n \n \n code\n \n \n

\n
\n\n \n \n
'})],c9);var D3e=O(306),C3e=O.n(D3e);const _3e=(t,e,a,u,i,r)=>{const o=function y3e(t,e,a){const u=a.getOptions(),i=e.editor;return u.editable&&i}(0,u,r);a=a??"";const d=document.createElement("div");return d.className="editing-field",a instanceof HTMLElement?d.appendChild(a):d.textContent=a,o?d:a};class YT{constructor(e,a){this.field=e,this.taxRate=a,this._sum=0,this._type="sum"}get type(){return this._type}init(){this._sum=0}accumulate(e){if("taxes"===this.field&&e.taxable&&(this._sum+=e.price*e.qty*(this.taxRate/100)),"subTotal"===this.field&&(this._sum+=e.price*e.qty),"total"===this.field){let a=0;e.taxable&&(a=e.price*e.qty*(this.taxRate/100)),this._sum+=e.price*e.qty+a}}storeResult(e){(!e||void 0===e[this._type])&&(e[this._type]={}),e[this._type][this.field]=this._sum}}let h9=class{constructor(){this.columnDefinitions=[],this.dataset=[],this.isDataGrouped=!1,this.taxRate=7.5,this.excelExportService=new Bo}angularGridReady(e){this.angularGrid=e}ngOnInit(){this.prepareGrid(),this.dataset=this.getData()}prepareGrid(){this.columnDefinitions=[{id:"sel",name:"#",field:"id",headerCssClass:"header-centered",cssClass:"cell-unselectable",excludeFromExport:!0,maxWidth:30},{id:"name",name:"Name",field:"name",sortable:!0,width:140,filterable:!0,excelExportOptions:{width:18}},{id:"price",name:"Price",field:"price",type:w.number,editor:{model:Ye.float,decimal:2},sortable:!0,width:70,filterable:!0,formatter:j.dollar,groupTotalsFormatter:Ka.sumTotalsDollarBold,groupTotalsExcelExportOptions:{style:{font:{bold:!0,size:11.5},format:"$0.00",border:{top:{color:"FF747474",style:"thick"}}},valueParserCallback:this.excelGroupCellParser.bind(this)}},{id:"qty",name:"Quantity",field:"qty",type:w.number,groupTotalsFormatter:Ka.sumTotalsBold,groupTotalsExcelExportOptions:{style:{font:{bold:!0,size:11.5},border:{top:{color:"FF747474",style:"thick"}}},valueParserCallback:this.excelGroupCellParser.bind(this)},params:{minDecimal:0,maxDecimal:0},editor:{model:Ye.integer},sortable:!0,width:60,filterable:!0},{id:"subTotal",name:"Sub-Total",field:"subTotal",cssClass:"text-sub-total",type:w.number,sortable:!0,width:70,filterable:!0,exportWithFormatter:!1,formatter:j.multiple,groupTotalsFormatter:Ka.sumTotalsDollarBold,params:{formatters:[(e,a,u,i,r)=>r.price*r.qty,j.dollar]},excelExportOptions:{style:{font:{outline:!0,italic:!0,color:"FF215073"},format:"$0.00"},width:12,valueParserCallback:this.excelRegularCellParser.bind(this)},groupTotalsExcelExportOptions:{style:{font:{bold:!0,italic:!0,size:11.5},format:"$0.00",border:{top:{color:"FF747474",style:"thick"}}},valueParserCallback:this.excelGroupCellParser.bind(this)}},{id:"taxable",name:"Taxable",field:"taxable",cssClass:"text-center",sortable:!0,width:60,filterable:!0,formatter:j.checkmarkMaterial,exportCustomFormatter:(e,a,u)=>u?"\u2713":"",excelExportOptions:{style:{alignment:{horizontal:"center"}}}},{id:"taxes",name:"Taxes",field:"taxes",cssClass:"text-taxes",type:w.number,sortable:!0,width:70,filterable:!0,formatter:j.multiple,groupTotalsFormatter:Ka.sumTotalsDollarBold,params:{formatters:[(e,a,u,i,r)=>r.taxable?r.price*r.qty*(this.taxRate/100):null,j.dollar]},excelExportOptions:{style:{font:{outline:!0,italic:!0,color:"FFC65911"},format:"$0.00"},width:12,valueParserCallback:this.excelRegularCellParser.bind(this)},groupTotalsExcelExportOptions:{style:{font:{bold:!0,italic:!0,color:"FFC65911",size:11.5},format:"$0.00",border:{top:{color:"FF747474",style:"thick"}}},valueParserCallback:this.excelGroupCellParser.bind(this)}},{id:"total",name:"Total",field:"total",type:w.number,sortable:!0,width:70,filterable:!0,cssClass:"text-total",formatter:j.multiple,groupTotalsFormatter:Ka.sumTotalsDollarBold,params:{formatters:[(e,a,u,i,r)=>{let o=r.price*r.qty;return r.taxable&&(o+=o*(this.taxRate/100)),o},j.dollar]},excelExportOptions:{style:{font:{outline:!0,bold:!0,color:"FF005A9E"},format:"$0.00"},width:12,valueParserCallback:this.excelRegularCellParser.bind(this)},groupTotalsExcelExportOptions:{style:{font:{bold:!0,color:"FF005A9E",size:12},format:"$0.00",border:{top:{color:"FF747474",style:"thick"}}},valueParserCallback:this.excelGroupCellParser.bind(this)}}],this.gridOptions={autoAddCustomEditorFormatter:_3e,gridHeight:410,gridWidth:750,enableCellNavigation:!0,autoEdit:!0,autoCommitEdit:!0,editable:!0,rowHeight:33,formatterOptions:{maxDecimal:2,minDecimal:2},enableGrouping:!0,externalResources:[this.excelExportService],enableExcelExport:!0,excelExportOptions:{filename:"grocery-list",sanitizeDataExport:!0,sheetName:"Grocery List",columnHeaderStyle:{font:{color:"FFFFFFFF"},fill:{type:"pattern",patternType:"solid",fgColor:"FF4a6c91"}},customExcelHeader:(e,a)=>{const u=e.getStyleSheet().createFormat({font:{size:18,fontName:"Calibri",bold:!0,color:"FFFFFFFF"},alignment:{wrapText:!0,horizontal:"center"},fill:{type:"pattern",patternType:"solid",fgColor:"FF203764"}});a.setRowInstructions(0,{height:40});const r=this.isDataGrouped?"H1":"G1";a.mergeCells("A1",r),a.data.push([{value:"Grocery Shopping List",metadata:{style:u.id}}])}}}}invalidateAll(){this.angularGrid.dataView?.refresh(),this.angularGrid.slickGrid?.invalidate()}updateTaxRate(){this.isDataGrouped&&this.groupByTaxable(),this.invalidateAll()}exportToExcel(){this.excelExportService.exportToExcel()}excelGroupCellParser(e,{columnDef:a,excelFormatId:u,dataRowIdx:i}){const d=this.angularGrid.slickGrid?.getColumnIndex("price")||0,h=this.angularGrid.slickGrid?.getColumnIndex("qty")||0,m=this.angularGrid.slickGrid?.getColumnIndex("taxes")||0,g=this.angularGrid.slickGrid?.getColumnIndex("subTotal")||0,v=this.angularGrid.slickGrid?.getColumnIndex("total")||0,k=e?.group?.count||0,x=`${String.fromCharCode(65+d-0)}`,D=`${String.fromCharCode(65+h-0)}`,C=`${String.fromCharCode(65+g-0)}`,F=`${String.fromCharCode(65+m-0)}`,A=`${String.fromCharCode(65+v-0)}`;let z="";switch(a.id){case"price":z=x;break;case"qty":z=D;break;case"subTotal":z=C;break;case"taxes":z=F;break;case"total":z=A}return{value:`SUM(${z}${i+3-k}:${z}${i+3-1})`,metadata:{type:"formula",style:u}}}excelRegularCellParser(e,{columnDef:a,excelFormatId:u,dataRowIdx:i,dataContext:r}){const o=this.isDataGrouped?0:1,h=this.angularGrid.slickGrid?.getColumnIndex("price")||0,m=this.angularGrid.slickGrid?.getColumnIndex("qty")||0,g=this.angularGrid.slickGrid?.getColumnIndex("taxes")||0,v=`${String.fromCharCode(65+h-o)}${i+3}`,k=`${String.fromCharCode(65+m-o)}${i+3}`,x=`${String.fromCharCode(65+g-o)}${i+3}`;let D="";switch(a.id){case"subTotal":D=`${v}*${k}`;break;case"taxes":D=r.taxable?`${v}*${k}*${this.taxRate/100}`:"";break;case"total":D=`(${v}*${k})+${x}`}return{value:D,metadata:{type:"formula",style:u}}}getData(){let e=1;return[{id:e++,name:"Oranges",qty:4,taxable:!1,price:2.22},{id:e++,name:"Apples",qty:3,taxable:!1,price:1.55},{id:e++,name:"Honeycomb Cereals",qty:2,taxable:!0,price:4.55},{id:e++,name:"Raisins",qty:77,taxable:!1,price:.23},{id:e++,name:"Corn Flake Cereals",qty:1,taxable:!0,price:6.62},{id:e++,name:"Tomatoes",qty:3,taxable:!1,price:1.88},{id:e++,name:"Butter",qty:1,taxable:!1,price:3.33},{id:e++,name:"BBQ Chicken",qty:1,taxable:!1,price:12.33},{id:e++,name:"Chicken Wings",qty:12,taxable:!0,price:.53},{id:e++,name:"Drinkable Yogurt",qty:6,taxable:!0,price:1.22},{id:e++,name:"Milk",qty:3,taxable:!0,price:3.11}]}clearGrouping(){this.isDataGrouped=!1,this.angularGrid?.dataView?.setGrouping([])}groupByTaxable(){this.isDataGrouped=!0,this.angularGrid?.dataView?.setGrouping({getter:"taxable",formatter:u=>`Taxable: (${u.count} items)`,comparer:(u,i)=>i.value-u.value,aggregators:[new Nt_Sum("price"),new Nt_Sum("qty"),new YT("subTotal",this.taxRate),new YT("taxes",this.taxRate),new YT("total",this.taxRate)],aggregateCollapsed:!1,lazyTotalsCalculation:!1}),this.angularGrid?.dataView?.refresh()}static#e=this.ctorParameters=()=>[]};h9=$e([ca({template:'
\n

\n Example 36: Excel Export Formulas\n \n \n code\n \n \n

\n
\n Grid with Excel Formulas (Wiki docs).\n Calculate Totals via Formatters in the UI, but use Excel Formula when exporting via excelExportOptions.valueParserCallback\n When Grouped we will also calculate the Group Totals in the UI via Group Formatter and we again use Excel Formula to calculate the Group Totals (sum) dynamically.\n For Grouping we need to use groupTotalsExcelExportOptions.valueParserCallback instead.\n
\n\n
\n
\n \n \n \n \n \n \n Tax Rate (%):\n \n \n \n
\n
\n\n \n \n
',encapsulation:ja.None,styles:[C3e()]}),Ct("design:paramtypes",[])],h9);const A3e=(t,e,a)=>a?'':{text:'',addClasses:"lightblue",toolTip:"Freezing"},w3e=(t,e,a)=>`\n \n `;let m9=class{constructor(){this.title="Example 2: Grid with Formatters",this.subTitle='\n Grid with Custom and/or included Slickgrid Formatters (Wiki docs).\n
    \n
  • The 2 last columns are using Custom Formatters
  • \n
    • The "Completed" column uses a the "onCellClick" event and a formatter to simulate a toggle action
    \n
  • \n Support Excel Copy Buffer (SlickGrid Copy Manager Plugin), you can use it by simply enabling "enableExcelCopyBuffer" flag.\n Note that it will only evaluate Formatter when the "exportWithFormatter" flag is enabled (through "ExportOptions" or the column definition)\n
  • \n
  • This example also has auto-resize enabled, and we also demo how you can pause the resizer if you wish to
  • \n
\n ',this.columnDefinitions=[],this.resizerPaused=!1}angularGridReady(e){this.angularGrid=e}ngOnInit(){this.columnDefinitions=[{id:"title",name:"Title",field:"title",sortable:!0,type:w.string,width:70},{id:"phone",name:"Phone Number using mask",field:"phone",sortable:!0,type:w.number,minWidth:100,formatter:j.mask,params:{mask:"(000) 000-0000"}},{id:"duration",name:"Duration (days)",field:"duration",formatter:j.decimal,params:{minDecimal:1,maxDecimal:2},sortable:!0,type:w.number,minWidth:90,exportWithFormatter:!0},{id:"complete",name:"% Complete",field:"percentComplete",formatter:j.percentCompleteBar,type:w.number,sortable:!0,minWidth:100},{id:"percent2",name:"% Complete",field:"percentComplete2",formatter:j.progressBar,type:w.number,sortable:!0,minWidth:100},{id:"start",name:"Start",field:"start",formatter:j.dateIso,sortable:!0,type:w.date,minWidth:90,exportWithFormatter:!0},{id:"finish",name:"Finish",field:"finish",formatter:j.dateIso,sortable:!0,type:w.date,minWidth:90,exportWithFormatter:!0},{id:"effort-driven",name:"Effort Driven",field:"effortDriven",formatter:A3e,type:w.number,sortable:!0,minWidth:100},{id:"completed",name:"Completed",field:"completed",type:w.number,sortable:!0,minWidth:100,formatter:w3e,onCellClick:(a,u)=>{this.toggleCompletedProperty(u&&u.dataContext)}}],this.gridOptions={autoResize:{container:"#demo-container",rightPadding:10},enableAutoResize:!0,enableCellNavigation:!0,showCustomFooter:!0,customFooterOptions:{leftFooterText:"custom footer text",hideTotalItemCount:!0,hideLastUpdateTimestamp:!0},enableExcelCopyBuffer:!0};const e=[];for(let a=0;a<500;a++){const u=2e3+Math.floor(10*Math.random()),i=Math.floor(11*Math.random()),r=Math.floor(29*Math.random()),o=Math.round(100*Math.random());e[a]={id:a,title:"Task "+a,phone:this.generatePhoneNumber(),duration:a%33==0?null:100*Math.random()+"",percentComplete:o,percentComplete2:o,percentCompleteNumber:o,start:new Date(u,i,r),finish:new Date(u,i+1,r),effortDriven:a%5==0}}this.dataset=e}generatePhoneNumber(){let e="";for(let a=0;a<10;a++)e+=Math.round(9*Math.random())+"";return e}togglePauseResizer(){this.resizerPaused=!this.resizerPaused,this.angularGrid.resizerService.pauseResizer(this.resizerPaused)}toggleCompletedProperty(e){"object"==typeof e&&(e.completed=!e.completed,setTimeout(()=>{this.angularGrid.gridService.updateItemById(e.id,e,{highlightRow:!1})},250))}};m9=$e([ca({template:'
\n

\n {{title}}\n \n \n code\n \n \n

\n
\n\n \n\n \n \n
'})],m9);var S3e=O(942),z3e=O.n(S3e);let p9=class{constructor(){this.title="Example 20: Pinned (frozen) Columns/Rows",this.subTitle='\n This example demonstrates the use of Pinned (aka frozen) Columns and/or Rows (Wiki docs)\n
    \n
  • Option to pin any number of columns (left only) or rows
  • \n
  • Option to pin the rows at the bottom instead of the top (default)
  • \n
  • You can also dynamically any of these options, through SlickGrid "setOptions()"
  • \n
  • Possibility to change the styling of the line border between pinned columns/rows
  • \n
\n ',this.frozenColumnCount=2,this.frozenRowCount=3,this.isFrozenBottom=!1,this.slickEventHandler=new Ut}ngOnInit(){this.prepareDataGrid()}ngOnDestroy(){this.slickEventHandler.unsubscribeAll()}angularGridReady(e){this.angularGrid=e,this.gridObj=e.slickGrid,this.slickEventHandler.subscribe(this.gridObj.onMouseEnter,a=>this.colorizeHoveringRow(a,!0)),this.slickEventHandler.subscribe(this.gridObj.onMouseLeave,a=>this.colorizeHoveringRow(a,!1))}colorizeHoveringRow(e,a){const u=this.gridObj.getCellFromEvent(e),i=a?[u?.row??0]:[];this.gridObj.setSelectedRows(i),e.preventDefault()}prepareDataGrid(){this.columnDefinitions=[{id:"sel",name:"#",field:"id",minWidth:40,width:40,maxWidth:40,cannotTriggerInsert:!0,resizable:!1,unselectable:!0},{id:"title",name:"Title",field:"title",minWidth:100,width:120,filterable:!0,sortable:!0},{id:"percentComplete",name:"% Complete",field:"percentComplete",resizable:!1,minWidth:130,width:140,formatter:j.percentCompleteBar,type:w.number,filterable:!0,filter:{model:ie.slider,operator:">="},sortable:!0},{id:"start",name:"Start",field:"start",minWidth:100,width:120,filterable:!0,sortable:!0,formatter:j.dateIso},{id:"finish",name:"Finish",field:"finish",minWidth:100,width:120,filterable:!0,sortable:!0,formatter:j.dateIso},{id:"cost",name:"Cost | Duration",field:"cost",formatter:this.costDurationFormatter.bind(this),minWidth:150,width:170,sortable:!0,filter:{model:ie.compoundSlider},editor:{model:Ye.dualInput,params:{leftInput:{field:"cost",type:"float",decimal:2,minValue:0,maxValue:5e4,placeholder:"< 50K",errorMessage:"Cost must be positive and below $50K."},rightInput:{field:"duration",type:"float",minValue:0,maxValue:100,title:"make sure Duration is withing its range of 0 to 100",errorMessage:"Duration must be between 0 and 100."}}}},{id:"effortDriven",name:"Effort Driven",field:"effortDriven",minWidth:100,width:120,formatter:j.checkmarkMaterial,filterable:!0,filter:{collection:[{value:"",label:""},{value:!0,label:"True"},{value:!1,label:"False"}],model:ie.singleSelect},sortable:!0},{id:"title1",name:"Title 1",field:"title1",minWidth:100,width:120,filterable:!0,sortable:!0},{id:"title2",name:"Title 2",field:"title2",minWidth:100,width:120,filterable:!0,sortable:!0},{id:"title3",name:"Title 3",field:"title3",minWidth:100,width:120,filterable:!0,sortable:!0},{id:"title4",name:"Title 4",field:"title4",minWidth:100,width:120,filterable:!0,sortable:!0}],this.gridOptions={autoResize:{container:"#demo-container",rightPadding:10},enableExcelCopyBuffer:!0,enableCellNavigation:!0,editable:!0,autoEdit:!0,asyncEditorLoading:!0,frozenColumn:this.frozenColumnCount,frozenRow:this.frozenRowCount,gridMenu:{hideClearFrozenColumnsCommand:!1},headerMenu:{hideFreezeColumnsCommand:!1}},this.dataset=this.getData()}getData(){const e=[];for(let a=0;a<500;a++)e[a]={id:a,title:"Task "+a,cost:a%33==0?null:1e4*Math.random(),duration:a%8?Math.round(100*Math.random())+"":null,percentComplete:Math.round(100*Math.random()),start:new Date(2009,0,1),finish:new Date(2009,4,5),effortDriven:a%5==0,title1:`Some Text ${Math.round(25*Math.random())}`,title2:`Some Text ${Math.round(25*Math.random())}`,title3:`Some Text ${Math.round(25*Math.random())}`,title4:`Some Text ${Math.round(25*Math.random())}`};return e}changeFrozenColumnCount(){this.gridObj&&this.gridObj.setOptions&&this.gridObj.setOptions({frozenColumn:this.frozenColumnCount})}changeFrozenRowCount(){this.gridObj&&this.gridObj.setOptions&&this.gridObj.setOptions({frozenRow:this.frozenRowCount})}costDurationFormatter(e,a,u,i,r){const o=this.isNullUndefinedOrEmpty(r.cost)?"n/a":Pu(r.cost,0,2,!1,"$","",".",",");let d="n/a";return!this.isNullUndefinedOrEmpty(r.duration)&&r.duration>=0&&(d=`${r.duration} ${r.duration>1?"days":"day"}`),`${o} | ${d}`}isNullUndefinedOrEmpty(e){return""===e||null==e}onValidationError(e,a){alert(a.validationResults.msg)}setFrozenColumns(e){this.gridObj.setOptions({frozenColumn:e}),this.gridOptions=this.gridObj.getOptions()}toggleFrozenBottomRows(){this.gridObj&&this.gridObj.setOptions&&(this.gridObj.setOptions({frozenBottom:!this.isFrozenBottom}),this.isFrozenBottom=!this.isFrozenBottom)}static#e=this.ctorParameters=()=>[]};p9=$e([ca({template:'
\n

\n {{title}}\n \n \n code\n \n \n

\n
\n\n
\n
\n \n \n
\n
\n \n
\n
\n
\n \n \n
\n
\n \n
\n
\n\n
\n
\n \n \n\n \n \n : {{ isFrozenBottom ? \'Bottom\' : \'Top\' }}\n \n
\n
\n
\n
\n
\n \n \n
',encapsulation:ja.None,styles:[z3e()]}),Ct("design:paramtypes",[])],p9);class Zh{constructor(e,a){if(this.queryFnName=e,this.head=[],"string"==typeof a)this.alias=a;else if("object"==typeof a)this.filter(a);else{if(void 0===a&&2===arguments.length)throw new TypeError('You have passed undefined as Second argument to "Query"');if(void 0!==a)throw new TypeError(`Second argument to "Query" should be an alias name(String) or filter arguments(Object). What was passed is: ${a}`)}}filter(e){for(const a of Object.keys(e)){if("function"==typeof e[a])continue;const u=this.getGraphQLValue(e[a]);"{}"!==u&&this.head.push(`${a}:${u}`)}return this}find(...e){if(!e||!Array.isArray(e)||0===e.length)throw new TypeError("find value can not be >>falsy<<");const a=1===e.length&&Array.isArray(e[0])?e[0]:e;return this.body=this.parceFind(a),this}setAlias(e){this.alias=e}toString(){if(void 0===this.body)throw new ReferenceError("return properties are not defined. use the 'find' function to defined them");return`${this.alias?this.alias+":":""} ${this.queryFnName} ${this.head.length>0?"("+this.head.join(",")+")":""} { ${this.body} }`}parceFind(e){return e.map((u,i)=>{const r=e[i];if(r instanceof Zh)return r.toString();if(Array.isArray(r)||"object"!=typeof r){if("string"==typeof r)return r;throw new RangeError(`cannot handle Find value of ${r}`)}{const o=Object.keys(r);if(1!==o.length)throw new RangeError(`Alias objects should only have one value. was passed: ${JSON.stringify(r)}`);const d=o[0],h=r[d];return Array.isArray(h)?new Zh(d).find(h):`${d} : ${h} `}}).join(",")}getGraphQLValue(e){return"string"==typeof e?e=JSON.stringify(e):Array.isArray(e)?e=`[${e=e.map(a=>this.getGraphQLValue(a)).join()}]`:e instanceof Date?e=JSON.stringify(e):null!==e&&"object"==typeof e&&(e=this.objectToString(e)),e}objectToString(e){const a=[];for(const u of Object.keys(e))"function"!=typeof e[u]&&a.push(`${u}:${this.getGraphQLValue(e[u])}`);return`{${a.join()}}`}}class QT{constructor(){this._currentFilters=[],this._currentPagination=null,this._currentSorters=[],this._datasetIdPropName="id",this.defaultPaginationOptions={first:25,offset:0}}get columnDefinitions(){return this._columnDefinitions}get _gridOptions(){return this._grid?.getOptions()??{}}init(e,a,u,i){this._grid=u,this.options=e||{datasetName:""},this.pagination=a,this._datasetIdPropName=this._gridOptions.datasetIdPropertyName||"id","function"==typeof u?.getColumns&&(this._columnDefinitions=i?.allColumns??u.getColumns()??[])}buildQuery(){if(!this.options||!this.options.datasetName||!Array.isArray(this._columnDefinitions))throw new Error('GraphQL Service requires the "datasetName" property to properly build the GraphQL query');let e=this._columnDefinitions||[];e=e.filter(g=>!g.excludeFromQuery);const a=new Zh(`query ${this.options.operationName??""}`),u=new Zh(this.options.datasetName),i=new Zh("nodes"),r=[];if(Array.isArray(e))for(const g of e)g.excludeFieldFromQuery||r.push(g.field),g.fields&&r.push(...g.fields);-1===r.indexOf(this._datasetIdPropName)&&r.unshift(this._datasetIdPropName);const o=this.buildFilterQuery(r);let d=[];if(!1!==this._gridOptions.enablePagination||this.options.infiniteScroll){if(this.options.useCursor){const g=new Zh("edges"),v=new Zh("pageInfo");v.find("hasNextPage","hasPreviousPage","endCursor","startCursor"),i.find(o),g.find(["cursor"]),d=["totalCount",i,v,g]}else i.find(o),d=["totalCount",i];u.find(d)}else u.find(o);let h={};if(!1!==this._gridOptions.enablePagination||this.options.infiniteScroll)if(h={},this.options.useCursor&&this.options.paginationOptions)h={...this.options.paginationOptions};else{const g=this.options?.paginationOptions;h.first=this.options?.infiniteScroll?.fetchSize??this.options?.paginationOptions?.first??this.pagination?.pageSize??this.defaultPaginationOptions.first,h.offset=g?.hasOwnProperty("offset")?+g.offset:0}if(this.options.sortingOptions&&Array.isArray(this.options.sortingOptions)&&this.options.sortingOptions.length>0&&(h.orderBy=this.options.sortingOptions),this.options.filteringOptions&&Array.isArray(this.options.filteringOptions)&&this.options.filteringOptions.length>0&&(h.filterBy=this.options.filteringOptions),this.options.addLocaleIntoQuery&&(h.locale=this._gridOptions.translater?.getCurrentLanguage()||this._gridOptions.locale||"en"),this.options.extraQueryArguments)for(const g of this.options.extraQueryArguments)h[g.field]=g.value;u.filter(h),a.find(u);return this.trimDoubleQuotesOnEnumField(a.toString(),["direction:","field:","operator:"],this.options.keepArgumentFieldDoubleQuotes||!1)}postProcess(e){e.data&&this.pagination&&(this.pagination.totalItems=e.data[this.getDatasetName()]?.totalCount||0)}buildFilterQuery(e){const a=(i={},r)=>{const o=r.shift();return i[o]=r.length?a(i[o]??{},r):null,i},u=e.reduce((i,r)=>a(i,r.split(".")),{});return JSON.stringify(u).replace(/"|:|null/g,"").replace(/^\{/,"").replace(/\}$/,"")}clearFilters(){this._currentFilters=[],this.updateOptions({filteringOptions:[]})}clearSorters(){this._currentSorters=[],this.updateOptions({sortingOptions:[]})}getInitPaginationOptions(){const e=this.options?.infiniteScroll?.fetchSize??this.pagination?.pageSize??25;return this.options?.useCursor?{first:e}:{first:e,offset:0}}getDatasetName(){return this.options?.datasetName||""}getCurrentFilters(){return this._currentFilters}getCurrentPagination(){return this._currentPagination}getCurrentSorters(){return this._currentSorters}resetPaginationOptions(){let e;this.options?.useCursor?e=this.getInitPaginationOptions():(e=this.options&&this.options.paginationOptions||this.getInitPaginationOptions(),e.offset=0),this._currentPagination={pageNumber:1,pageSize:e.first||20},this._gridOptions&&(this._gridOptions.enablePagination||!this._gridOptions.hasOwnProperty("enablePagination")||this.options?.infiniteScroll)&&this.updateOptions({paginationOptions:e})}updateOptions(e){this.options={...this.options,...e}}processOnFilterChanged(e,a){if(void 0===this._gridOptions.backendServiceApi)throw new Error('Something went wrong in the GraphqlService, "backendServiceApi" is not initialized');if(this._currentFilters=this.castFilterToColumnFilters(a.columnFilters),!a||!a.grid)throw new Error('Something went wrong when trying create the GraphQL Backend Service, it seems that "args" is not populated correctly');return this.updateFilters(a.columnFilters,!1),this.resetPaginationOptions(),this.buildQuery()}processOnPaginationChanged(e,a){const u=+(this.options?.infiniteScroll?.fetchSize||a.pageSize||(this.pagination?this.pagination.pageSize:20));return"first"in a||"last"in a?this.updatePagination(a.newPage,u,a):this.updatePagination(a.newPage,u),this.buildQuery()}processOnSortChanged(e,a){const u=a.multiColumnSort?a.sortCols:new Array({columnId:a.sortCol?.id??"",sortCol:a.sortCol,sortAsc:a.sortAsc});return this.updateSorters(u),this.options?.infiniteScroll&&this.updateOptions({paginationOptions:{offset:0}}),this.buildQuery()}updateFilters(e,a){const u=[];let i;a&&(this._currentFilters=this.castFilterToColumnFilters(e));for(const r in e)if(e.hasOwnProperty(r)){const o=e[r];let d;if(d=a&&Array.isArray(this._columnDefinitions)?this._columnDefinitions.find(M=>M.id===o.columnId):o.columnDef,!d)throw new Error("[GraphQL Service]: Something went wrong in trying to get the column definition of the specified filter (or preset filters). Did you make a typo on the filter columnId?");let h=d.filter?.queryField||d.queryFieldFilter||d.queryField||d.field||d.name||"";h instanceof HTMLElement&&(h=Iu(h.innerHTML));const m=d.type||w.string;let g=o?.searchTerms??[],v=Array.isArray(g)&&1===g.length?g[0]:"";if(typeof v>"u"&&(v=""),!h)throw new Error('GraphQL filter could not find the field name to query the search, your column definition must include a valid "field" or "name" (optionally you can also use the "queryfield").');if(this.options?.useVerbatimSearchTerms||o.verbatimSearchTerms){u.push({field:ii(h),operator:o.operator,value:JSON.stringify(o.searchTerms)});continue}v=null==v?"":`${v}`;const x=!1!==(d.autoParseInputFilterOperator??this._gridOptions.autoParseInputFilterOperator)?v.match(/^((.*[^\\*\r\n])[*]{1}(.*[^*\r\n]))|^([<>!=*]{0,2})(.*[^<>!=*])([*]?)$/)||[]:[v,"","","","",v,""],D=x?.[2]||"",C=x?.[3]||"";let F=o.operator||x?.[4];i=x?.[1]||x?.[5]||"";const A=x?.[6]||"*z"===F||F===te.endsWith?"*":"";if(h&&""===i&&0===g.length)continue;let z;if("function"==typeof this.options?.filterQueryOverride&&(z=this.options?.filterQueryOverride({fieldName:ii(h),columnDef:d,operator:F,columnFilterOperator:o.operator,searchValues:g,grid:this._grid})),void 0!==z)u.push(z);else{if(D&&C?(g=[D,C],F=te.startsWithEndsWith):Array.isArray(g)&&1===g.length&&"string"==typeof g[0]&&g[0].indexOf("..")>=0&&(F!==te.rangeInclusive&&F!==te.rangeExclusive&&(F=this._gridOptions.defaultFilterRangeOperator??te.rangeInclusive),g=g[0].split("..",2),""===g[0]?(F=F===te.rangeInclusive?"<=":F===te.rangeExclusive?"<":F,g=g.slice(1),i=g[0]):""===g[1]&&(F=F===te.rangeInclusive?">=":F===te.rangeExclusive?">":F,g=g.slice(0,1),i=g[0])),"string"==typeof i&&("*"===F||"a*"===F||"*z"===F||"*"===A)&&(F="*"===F||"*z"===F?"EndsWith":"StartsWith"),!F&&d.filter&&d.filter.operator&&(F=d.filter.operator),!F&&Array.isArray(g)&&2===g.length&&g[0]&&g[1]&&(F=this._gridOptions.defaultFilterRangeOperator),(F===te.rangeInclusive||F===te.rangeExclusive)&&Array.isArray(g)&&1===g.length&&m===w.date&&(F=te.equal),i=this.normalizeSearchValue(m,i),Array.isArray(g)&&g.forEach((M,L)=>{g[L]=this.normalizeSearchValue(m,g[L])}),F===te.startsWithEndsWith&&Array.isArray(g)&&2===g.length){u.push({field:ii(h),operator:te.startsWith,value:D}),u.push({field:ii(h),operator:te.endsWith,value:C});continue}if(g?.length>1&&("IN"===F||"NIN"===F||"NOT_IN"===F))i=g.join(",");else if(2===g?.length&&(F===te.rangeExclusive||F===te.rangeInclusive)){u.push({field:ii(h),operator:F===te.rangeInclusive?"GE":"GT",value:g[0]}),u.push({field:ii(h),operator:F===te.rangeInclusive?"LE":"LT",value:g[1]});continue}F||(F=P2(m)),u.push({field:ii(h),operator:NG(F),value:i})}}this.updateOptions({filteringOptions:u})}updatePagination(e,a,u){this._currentPagination={pageNumber:e,pageSize:a};let i={};if(this.options?.useCursor)if(u&&u instanceof Object){const{pageSize:r,newPage:o,...d}=u;i=d}else i={first:a};else i={first:a,offset:e>1?(e-1)*a:0};this.updateOptions({paginationOptions:i})}updateSorters(e,a){let u=[];const i=[];if(!e&&a){u=a,u.forEach(o=>o.direction=o.direction.toUpperCase());const r=u.map(o=>{const d=this._columnDefinitions?.find(h=>h.id===o.columnId);return i.push({field:d?(d.queryFieldSorter||d.queryField||d.field)+"":o.columnId+"",direction:o.direction}),d?{columnId:o.columnId,sortAsc:o.direction.toUpperCase()===Di.ASC}:null});Array.isArray(r)&&this._grid&&this._grid.setSortColumns(r.filter(o=>o)||[])}else if(e&&!a&&Array.isArray(e)&&e.length>0)for(const r of e)if(r&&r.sortCol){u.push({columnId:r.sortCol.id+"",direction:r.sortAsc?Di.ASC:Di.DESC});const o=(r.sortCol.queryFieldSorter||r.sortCol.queryField||r.sortCol.field||"")+"";o&&i.push({field:o,direction:r.sortAsc?Di.ASC:Di.DESC})}this._currentSorters=u,this.updateOptions({sortingOptions:i})}trimDoubleQuotesOnEnumField(e,a,u){const i='s?((field:s*)?".*?")';let r=a.join(i+"|");r+=i;const o=new RegExp(r,"g");return e.replace(o,d=>{let h=!0;return d.startsWith("field:")&&u&&(h=!1),h?d.replace(/"/g,""):d})}castFilterToColumnFilters(e){const a="object"==typeof e?Object.keys(e).map(u=>e[u]):e;return Array.isArray(a)?a.map(u=>{const i={columnId:u.columnId||""};return u.operator&&(i.operator=u.operator),u.targetSelector&&(i.targetSelector=u.targetSelector),Array.isArray(u.searchTerms)&&(i.searchTerms=u.searchTerms),i}):[]}normalizeSearchValue(e,a){switch(e){case w.date:case w.string:case w.text:case w.readonly:"string"==typeof a&&(a=a.replace(/'/g,"''"));break;case w.integer:case w.number:case w.float:"string"==typeof a&&((""===(a=(a=(a=(a=(a=a.replace(/\.\./g,".")).replace(/\.+$/g,"")).replace(/^\.+/g,"0.")).replace(/^-+\.+/g,"-0.")).replace(/(?!^-)[^\d.]/g,""))||"-"===a)&&(a="0"))}return a}}const XT="users",dJ="gridStateGraphql";let g9=class{constructor(e,a){this.cd=e,this.translate=a,this.title="Example 6: Grid connected to Backend Server with GraphQL",this.subTitle='\n Sorting/Paging connected to a Backend GraphQL Service (Wiki docs).\n
\n
    \n
  • (*) NO DATA SHOWING - just change Filters & Pages and look at the "GraphQL Query" changing :)
  • \n
  • This example also demos the Grid State feature, open the console log to see the changes
  • \n
  • String column also support operator (>, >=, <, <=, <>, !=, =, ==, *)\n
      \n
    • The (*) can be used as startsWith (ex.: "abc*" => startsWith "abc") / endsWith (ex.: "*xyz" => endsWith "xyz")
    • \n
    • The other operators can be used on column type number for example: ">=100" (bigger or equal than 100)
    • \n
    \n
  • You can also preload a grid with certain "presets" like Filters / Sorters / Pagination Wiki - Grid Preset
  • \n
  • Also note that the column Name has a filter with a custom %% operator that behaves like an SQL LIKE operator supporting % wildcards.
  • \n
  • Depending on your configuration, your GraphQL Server might already support regex querying (e.g. Hasura _regex)\n or you could add your own implementation (e.g. see this SO Question).
  • \n
\n ',this.subscriptions=[],this.dataset=[],this.isWithCursor=!1,this.graphqlQuery="",this.processing=!0,this.status={text:"processing...",class:"alert alert-danger"},this.serverWaitDelay=250;this.translate.use("en"),this.selectedLanguage="en"}ngOnDestroy(){rd(this.subscriptions)}ngOnInit(){this.columnDefinitions=[{id:"name",field:"name",nameKey:"NAME",width:60,columnGroupKey:"CUSTOMER_INFORMATION",type:w.string,sortable:!0,filterable:!0,filter:{model:ie.compoundInput,compoundOperatorList:[{operator:"",desc:"Contains"},{operator:"<>",desc:"Not Contains"},{operator:"=",desc:"Equals"},{operator:"!=",desc:"Not equal to"},{operator:"a*",desc:"Starts With"},{operator:"Custom",desc:"SQL Like"}]}},{id:"gender",field:"gender",nameKey:"GENDER",filterable:!0,sortable:!0,width:60,columnGroupKey:"CUSTOMER_INFORMATION",filter:{model:ie.singleSelect,collection:[{value:"",label:""},{value:"male",label:"male",labelKey:"MALE"},{value:"female",label:"female",labelKey:"FEMALE"}]}},{id:"company",field:"company",nameKey:"COMPANY",width:60,columnGroupKey:"CUSTOMER_INFORMATION",sortable:!0,filterable:!0,filter:{model:ie.multipleSelect,collection:[{value:"acme",label:"Acme"},{value:"abc",label:"Company ABC"},{value:"xyz",label:"Company XYZ"}],filterOptions:{filter:!0}}},{id:"billingAddressStreet",field:"billing.address.street",nameKey:"BILLING.ADDRESS.STREET",width:60,filterable:!0,sortable:!0,columnGroupKey:"BILLING.INFORMATION"},{id:"billingAddressZip",field:"billing.address.zip",nameKey:"BILLING.ADDRESS.ZIP",width:60,type:w.number,columnGroupKey:"BILLING.INFORMATION",filterable:!0,sortable:!0,filter:{model:ie.compoundInput},formatter:j.multiple,params:{formatters:[j.complexObject,j.translate]}},{id:"finish",field:"finish",name:"Date",formatter:j.dateIso,sortable:!0,minWidth:90,width:120,exportWithFormatter:!0,type:w.date,columnGroupKey:"BILLING.INFORMATION",filterable:!0,filter:{model:ie.dateRange,filterShortcuts:[{titleKey:"NEXT_20_DAYS",iconCssClass:"mdi mdi-calendar",searchTerms:[Ii(new Date,"YYYY-MM-DD"),Ii(O2(new Date,20),"YYYY-MM-DD")]}]}}];const e=(new Date).getFullYear(),a=`${e}-01-01`,u=`${e}-02-15`;this.gridOptions={gridHeight:200,gridWidth:900,compoundOperatorAltTexts:{text:{Custom:{operatorAlt:"%%",descAlt:"SQL Like"}}},enableFiltering:!0,enableCellNavigation:!0,enableTranslate:!0,createPreHeaderPanel:!0,showPreHeaderPanel:!0,preHeaderPanelHeight:28,i18n:this.translate,gridMenu:{resizeOnShowHeaderRow:!0,commandItems:[{iconCssClass:"mdi mdi-close text-danger",title:"Reset Grid",disabled:!1,command:"reset-grid",positionOrder:60}],onCommand:(i,r)=>{"reset-grid"===r.command&&(this.angularGrid.gridService.resetGrid(this.columnDefinitions),localStorage[dJ]=null)}},enablePagination:!0,pagination:{pageSizes:[10,15,20,25,30,40,50,75,100],pageSize:20,totalItems:0},presets:{columns:[{columnId:"name",width:100},{columnId:"gender",width:55},{columnId:"company"},{columnId:"billingAddressZip"},{columnId:"billingAddressStreet",width:120},{columnId:"finish",width:130}],filters:[{columnId:"gender",searchTerms:["male"],operator:te.equal},{columnId:"name",searchTerms:["Joh*oe"],operator:te.startsWithEndsWith},{columnId:"company",searchTerms:["xyz"],operator:"IN"},{columnId:"finish",searchTerms:[a,u],operator:te.rangeInclusive}],sorters:[{columnId:"name",direction:"asc"},{columnId:"company",direction:Di.DESC}],pagination:{pageNumber:this.isWithCursor?1:2,pageSize:20}},backendServiceApi:{service:new QT,options:{datasetName:XT,addLocaleIntoQuery:!0,extraQueryArguments:[{field:"userId",value:123}],filterQueryOverride:({fieldName:i,columnDef:r,columnFilterOperator:o,searchValues:d})=>{if(o===te.custom&&"name"===r?.id)return{field:i,operator:"Like",value:d[0]}},useCursor:this.isWithCursor,keepArgumentFieldDoubleQuotes:!0},preProcess:()=>this.displaySpinner(!0),process:i=>this.getCustomerApiCall(i),postProcess:i=>{this.metrics=i.metrics,this.displaySpinner(!1),this.cd.detectChanges()}}}}angularGridReady(e){this.angularGrid=e}displaySpinner(e){this.processing=e,this.status=e?{text:"processing...",class:"alert alert-danger"}:{text:"finished",class:"alert alert-success"}}getCustomerApiCall(e){let a;if(this.angularGrid?.paginationService){const{paginationService:i}=this.angularGrid,r=i._initialized?i.getCurrentPageNumber():1,o=String.fromCharCode(65+r-1),d=String.fromCharCode(o.charCodeAt(0)+1);a={hasPreviousPage:0===i.dataFrom,hasNextPage:100===i.dataTo,startCursor:o,endCursor:d}}else a={hasPreviousPage:!1,hasNextPage:!0,startCursor:"A",endCursor:"B"};const u={data:{[XT]:{nodes:[],totalCount:100,pageInfo:a}}};return new Promise(i=>{setTimeout(()=>{this.graphqlQuery=this.angularGrid.backendService.buildQuery(),this.isWithCursor&&this.angularGrid?.paginationService?.setCursorPageInfo(u.data[XT].pageInfo),i(u)},this.serverWaitDelay)})}goToFirstPage(){this.angularGrid.paginationService.goToFirstPage()}goToLastPage(){this.angularGrid.paginationService.goToLastPage()}gridStateChanged(e){console.log("GraphQL Example, Grid State changed:: ",e),localStorage[dJ]=JSON.stringify(e.gridState)}clearAllFiltersAndSorts(){this.angularGrid?.gridService&&this.angularGrid.gridService.clearAllFiltersAndSorts()}saveCurrentGridState(){console.log("GraphQL current grid state",this.angularGrid.gridStateService.getCurrentGridState())}setFiltersDynamically(){const e=(new Date).getFullYear(),a=`${e}-01-01`,u=`${e}-02-15`;this.angularGrid.filterService.updateFilters([{columnId:"gender",searchTerms:["female"],operator:te.equal},{columnId:"name",searchTerms:["Jane"],operator:te.startsWith},{columnId:"company",searchTerms:["acme"],operator:"IN"},{columnId:"billingAddressZip",searchTerms:["11"],operator:te.greaterThanOrEqual},{columnId:"finish",searchTerms:[a,u],operator:te.rangeInclusive}])}setSortingDynamically(){this.angularGrid.sortService.updateSorting([{columnId:"billingAddressZip",direction:"DESC"},{columnId:"company",direction:"ASC"}])}resetToOriginalPresets(){const e=(new Date).getFullYear(),a=`${e}-01-01`,u=`${e}-02-15`;this.angularGrid.filterService.updateFilters([{columnId:"gender",searchTerms:["male"],operator:te.equal},{columnId:"name",searchTerms:["Joh*oe"],operator:te.startsWithEndsWith},{columnId:"company",searchTerms:["xyz"],operator:"IN"},{columnId:"finish",searchTerms:[a,u],operator:te.rangeInclusive}]),this.angularGrid.sortService.updateSorting([{columnId:"name",direction:"asc"},{columnId:"company",direction:Di.DESC}]),setTimeout(()=>{this.angularGrid.paginationService?.changeItemPerPage(20),this.angularGrid.paginationService?.goToPageNumber(2)})}setIsWithCursor(e){return this.isWithCursor=e,this.resetOptions({useCursor:this.isWithCursor}),!0}resetOptions(e){this.displaySpinner(!0);const a=this.gridOptions.backendServiceApi.service;this.angularGrid.paginationService.setCursorBased(e.useCursor),a.updateOptions(e),this.gridOptions={...this.gridOptions},this.angularGrid.paginationService?.goToFirstPage()}switchLanguage(){const e="en"===this.selectedLanguage?"fr":"en";this.subscriptions.push(this.translate.use(e).subscribe(()=>{this.selectedLanguage=e}))}static#e=this.ctorParameters=()=>[{type:ei},{type:et}]};g9=$e([ca({template:'
\n

\n {{title}}\n \n \n code\n \n \n

\n
\n\n
\n
\n
\n Status: {{status.text}}\n \n \n \n
\n\n
\n
\n \n \n \n \n \n \n
\n
\n
\n
\n \n Locale:\n \n {{selectedLanguage + \'.json\'}}\n \n
\n\n \n \n \n \n
\n
\n
\n Metrics: {{metrics.endTime | date: \'yyyy-MM-dd hh:mm aaaaa\\\'m\\\'\'}} | {{metrics.executionTime}}ms\n | {{metrics.totalItemCount}} items\n
\n
\n
\n \n
\n \n \n
\n
\n
\n
\n\n
\n
\n GraphQL Query:\n
\n
\n
\n
\n\n
\n \n \n
'}),Ct("design:paramtypes",[ei,et])],g9);var N3e=O(220),I3e=O.n(N3e);const eP="https://countries.trevorblades.com/";let E9=class{constructor(e){this.http=e,this.title="Example 27: GraphQL Basic API without Pagination",this.subTitle='\n Use basic GraphQL query with any external public APIs (Wiki docs).\n
    \n
  • This Examples uses a Public GraphQL API that you can find at this link https://countries.trevorblades.com/
  • \n
  • Compare to the regular and default GraphQL implementation, you will find the following differences
  • \n
      \n
    • There are no Pagination and we only use GraphQL once to load the data, then we use the grid as a regular local in-memory grid
    • \n
    • We enabled the following 2 flags "useLocalFiltering" and "useLocalSorting" to use regular (in memory) DataView filtering/sorting
    • \n
    \n
  • NOTE - This Example calls multiple GraphQL queries, this is ONLY for demo purposes, you would typically only call 1 query (which is what GraphQL is good at)
  • \n
  • This example is mainly to demo the use of GraphqlService to build the query and retrieve the data but also to demo how to mix that with local (in-memory) Filtering/Sorting strategies
  • \n
\n ',this.dataset=[],this.graphqlQuery="",this.processing=!0,this.status={text:"processing...",class:"alert alert-danger"},this.isDataLoaded=!1}ngOnInit(){this.columnDefinitions=[{id:"countryCode",field:"code",name:"Code",maxWidth:90,sortable:!0,filterable:!0,columnGroup:"Country"},{id:"countryName",field:"name",name:"Name",width:60,sortable:!0,filterable:!0,columnGroup:"Country"},{id:"countryNative",field:"native",name:"Native",width:60,sortable:!0,filterable:!0,columnGroup:"Country"},{id:"countryPhone",field:"phone",name:"Phone Area Code",maxWidth:110,sortable:!0,filterable:!0,columnGroup:"Country"},{id:"countryCurrency",field:"currency",name:"Currency",maxWidth:90,sortable:!0,filterable:!0,columnGroup:"Country"},{id:"countryEmoji",field:"emoji",name:"Emoji",maxWidth:90,sortable:!0,columnGroup:"Country"},{id:"languageName",field:"languages.name",name:"Names",width:60,formatter:j.arrayObjectToCsv,columnGroup:"Language",params:{propertyNames:["name"],useFormatterOuputToFilter:!0},filterable:!0,filter:{model:ie.multipleSelect,collectionAsync:this.getLanguages(),operator:te.inContains,collectionOptions:{addBlankEntry:!0,collectionInsideObjectProperty:"data.languages"},collectionFilterBy:[{property:"name",value:"",operator:"NE"},{property:"name",value:null,operator:"NE"}],collectionSortBy:{property:"name"},customStructure:{value:"name",label:"name"},filterOptions:{filter:!0}}},{id:"languageNative",field:"languages.native",name:"Native",width:60,formatter:j.arrayObjectToCsv,params:{propertyNames:["native"],useFormatterOuputToFilter:!0},columnGroup:"Language",filterable:!0,filter:{model:ie.multipleSelect,collectionAsync:this.getLanguages(),operator:te.inContains,collectionOptions:{addBlankEntry:!0,collectionInsideObjectProperty:"data.languages"},collectionFilterBy:[{property:"native",value:"",operator:"NE"},{property:"native",value:null,operator:"NE"}],collectionSortBy:{property:"native"},customStructure:{value:"native",label:"native"},filterOptions:{filter:!0}}},{id:"languageCode",field:"languages.code",name:"Codes",maxWidth:100,formatter:j.arrayObjectToCsv,params:{propertyNames:["code"],useFormatterOuputToFilter:!0},columnGroup:"Language",filterable:!0},{id:"continentName",field:"continent.name",name:"Name",width:60,sortable:!0,filterable:!0,formatter:j.complexObject,columnGroup:"Continent"},{id:"continentCode",field:"continent.code",name:"Code",maxWidth:90,sortable:!0,filterable:!0,filter:{model:ie.singleSelect,collectionAsync:this.getContinents(),collectionOptions:{collectionInsideObjectProperty:"data.continents",addBlankEntry:!0,separatorBetweenTextLabels:": "},customStructure:{value:"code",label:"code",labelSuffix:"name"}},formatter:j.complexObject,columnGroup:"Continent"}],this.gridOptions={autoResize:{container:"#demo-container",rightPadding:10},enableFiltering:!0,enableCellNavigation:!0,enablePagination:!1,createPreHeaderPanel:!0,showPreHeaderPanel:!0,preHeaderPanelHeight:28,datasetIdPropertyName:"code",showCustomFooter:!0,backendServiceApi:{service:new QT,useLocalFiltering:!0,useLocalSorting:!0,options:{datasetName:"countries"},preProcess:()=>this.isDataLoaded?"":this.displaySpinner(!0),process:e=>this.getCountries(e),postProcess:e=>{this.metrics=e.metrics,this.displaySpinner(!1),this.isDataLoaded=!0}}}}displaySpinner(e){this.processing=e,this.status=e?{text:"processing...",class:"alert alert-danger"}:{text:"finished",class:"alert alert-success"}}getCountries(e){return this.http.post(eP,{query:e})}getContinents(){return this.http.post(eP,{query:"query { continents { code, name }}"})}getLanguages(){return this.http.post(eP,{query:"query { languages { code, name, native }}"})}static#e=this.ctorParameters=()=>[{type:jt}]};E9=$e([ca({template:'
\n

\n {{title}}\n \n \n code\n \n \n

\n
\n
\n
\n
\n\n
\n
\n
\n Status: {{status.text}}\n \n \n \n
\n
\n
\n\n \n \n
',encapsulation:ja.None,styles:[I3e()]}),Ct("design:paramtypes",[jt])],E9);let v9=class{constructor(){this.title="Example 14: Grouping & Aggregators",this.subTitle='\n (Wiki docs)\n
    \n
  • \n Fully dynamic and interactive multi-level grouping with filtering and aggregates over 50\'000 items\n
  • \n
  • Each grouping level can have its own aggregates (over child rows, child groups, or all descendant rows)..
  • \n
\n ',this.processing=!1,this.excelExportService=new Bo,this.textExportService=new $T}ngOnInit(){this.initializeGrid()}initializeGrid(){const e=document.createElement("div"),a=document.createElement("button"),u=document.createElement("span");u.className="mdi mdi-help-circle no-padding",a.dataset.test="col1-hello-btn",a.className="btn btn-outline-secondary btn-xs btn-icon ms-1",a.textContent="Click me",a.title="simple column header test with a button click listener",a.addEventListener("click",()=>alert("Hello World")),a.appendChild(u),e.appendChild(document.createTextNode("Id ")),e.appendChild(a),this.columnDefinitions=[{id:"sel",name:e,field:"num",type:w.number,columnPickerLabel:"Custom Label",width:140,maxWidth:150,excludeFromExport:!0,resizable:!0,filterable:!0,selectable:!1,focusable:!1},{id:"title",name:"Title",field:"title",width:50,minWidth:50,cssClass:"cell-title",filterable:!0,sortable:!0},{id:"duration",name:"Duration",field:"duration",minWidth:50,width:60,filterable:!0,filter:{model:ie.slider,operator:">="},sortable:!0,type:w.number,groupTotalsFormatter:Ka.sumTotals,params:{groupFormatterPrefix:"Total: "}},{id:"%",name:"% Complete",field:"percentComplete",minWidth:70,width:90,formatter:j.percentCompleteBar,filterable:!0,filter:{model:ie.compoundSlider},sortable:!0,type:w.number,groupTotalsFormatter:Ka.avgTotalsPercentage,params:{groupFormatterPrefix:"Avg: "}},{id:"start",name:"Start",field:"start",minWidth:60,filterable:!0,filter:{model:ie.compoundDate},sortable:!0,type:w.dateIso,formatter:j.dateIso,exportWithFormatter:!0},{id:"finish",name:"Finish",field:"finish",minWidth:60,filterable:!0,filter:{model:ie.compoundDate},sortable:!0,type:w.dateIso,formatter:j.dateIso,exportWithFormatter:!0},{id:"cost",name:"Cost",field:"cost",minWidth:70,width:80,sortable:!0,filterable:!0,filter:{model:ie.compoundInputNumber},type:w.number,formatter:j.currency,groupTotalsFormatter:Ka.sumTotalsCurrency,params:{displayNegativeNumberWithParentheses:!0,currencyPrefix:"\u20ac",groupFormatterCurrencyPrefix:"\u20ac",minDecimal:2,maxDecimal:4,groupFormatterPrefix:"Total: "},excelExportOptions:{style:{font:{outline:!0,italic:!0},format:"\u20ac0.00##;[Red](\u20ac0.00##)"},width:18},groupTotalsExcelExportOptions:{style:{alignment:{horizontal:"center"},font:{bold:!0,color:"FF005289",underline:"single",fontName:"Consolas",size:10},fill:{type:"pattern",patternType:"solid",fgColor:"FFE6F2F6"},border:{top:{color:"FFa500ff",style:"thick"},left:{color:"FFa500ff",style:"medium"},right:{color:"FFa500ff",style:"dotted"},bottom:{color:"FFa500ff",style:"double"}},format:'"Total: "\u20ac0.00##;[Red]"Total: "(\u20ac0.00##)'}}},{id:"effort-driven",name:"Effort Driven",minWidth:20,width:80,maxWidth:80,cssClass:"cell-effort-driven",field:"effortDriven",formatter:j.checkmarkMaterial,sortable:!0,filterable:!0,filter:{collection:[{value:"",label:""},{value:!0,label:"True"},{value:!1,label:"False"}],model:ie.singleSelect}}],this.gridOptions={autoResize:{container:"#demo-container",rightPadding:10},enableExcelExport:!0,enableFiltering:!0,enableGrouping:!0,enableTextExport:!0,gridMenu:{hideExportTextDelimitedCommand:!1},excelExportOptions:{sanitizeDataExport:!0},textExportOptions:{sanitizeDataExport:!0},externalResources:[this.excelExportService,this.textExportService],showCustomFooter:!0,customFooterOptions:{hideMetrics:!1,hideTotalItemCount:!1,hideLastUpdateTimestamp:!1}},this.loadData(500)}angularGridReady(e){this.angularGrid=e,this.gridObj=e.slickGrid,this.dataviewObj=e.dataView}loadData(e){const a=[];for(let u=0;u`Duration: ${e.value} (${e.count} items)`,aggregators:[new Nt_Avg("percentComplete"),new Nt_Sum("cost")],comparer:(e,a)=>ul.numeric(e.value,a.value,Gt.asc),aggregateCollapsed:!1,lazyTotalsCalculation:!0}),this.angularGrid.filterService.setSortColumnIcons([{columnId:"duration",sortAsc:!0}]),this.gridObj.invalidate()}groupByDurationOrderByCount(e){this.angularGrid.filterService.setSortColumnIcons([]),this.dataviewObj.setGrouping({getter:"duration",formatter:a=>`Duration: ${a.value} (${a.count} items)`,comparer:(a,u)=>a.count-u.count,aggregators:[new Nt_Avg("percentComplete"),new Nt_Sum("cost")],aggregateCollapsed:e,lazyTotalsCalculation:!0}),this.gridObj.invalidate()}groupByDurationEffortDriven(){this.angularGrid.filterService.setSortColumnIcons([]),this.dataviewObj.setGrouping([{getter:"duration",formatter:e=>`Duration: ${e.value} (${e.count} items)`,aggregators:[new Nt_Sum("duration"),new Nt_Sum("cost")],aggregateCollapsed:!0,lazyTotalsCalculation:!0},{getter:"effortDriven",formatter:e=>`Effort-Driven: ${e.value?"True":"False"} (${e.count} items)`,aggregators:[new Nt_Avg("percentComplete"),new Nt_Sum("cost")],collapsed:!0,lazyTotalsCalculation:!0}]),this.gridObj.invalidate()}groupByDurationEffortDrivenPercent(){this.angularGrid.filterService.setSortColumnIcons([]),this.dataviewObj.setGrouping([{getter:"duration",formatter:e=>`Duration: ${e.value} (${e.count} items)`,aggregators:[new Nt_Sum("duration"),new Nt_Sum("cost")],aggregateCollapsed:!0,lazyTotalsCalculation:!0},{getter:"effortDriven",formatter:e=>`Effort-Driven: ${e.value?"True":"False"} (${e.count} items)`,aggregators:[new Nt_Sum("duration"),new Nt_Sum("cost")],lazyTotalsCalculation:!0},{getter:"percentComplete",formatter:e=>`% Complete: ${e.value} (${e.count} items)`,aggregators:[new Nt_Avg("percentComplete")],aggregateCollapsed:!0,collapsed:!0,lazyTotalsCalculation:!0}]),this.gridObj.invalidate()}};v9=$e([ca({template:'
\n

\n {{title}}\n \n \n code\n \n \n

\n
\n\n
\n
\n \n \n \n \n \n \n
\n
\n
\n
\n
\n \n \n
\n
\n
\n
\n \n \n \n \n \n \n
\n
\n\n \n \n
'})],v9);var H3e=O(356),V3e=O.n(H3e);const cJ="assets/data",b9="users";function aP(t){return t.replace(/^"/,"").replace(/"$/,"").toLowerCase()}let k9=class{constructor(e,a,u){this.cd=e,this.http=a,this.translate=u,this._darkMode=!1,this.subscriptions=[],this.dataset=[],this.tagDataClass="",this.graphqlQuery="...",this.processing=!1,this.status={text:"processing...",class:"alert alert-danger"},this.serverWaitDelay=250,this.backendService=new QT;this.translate.use("en"),this.selectedLanguage="en"}ngOnDestroy(){rd(this.subscriptions)}ngOnInit(){this.initializeGrid()}angularGridReady(e){this.angularGrid=e}initializeGrid(){this.columnDefinitions=[{id:"name",field:"name",nameKey:"NAME",width:60,type:w.string,sortable:!0,filterable:!0,filter:{model:ie.compoundInput}},{id:"gender",field:"gender",nameKey:"GENDER",filterable:!0,sortable:!0,width:60,filter:{model:ie.singleSelect,collection:[{value:"",label:""},{value:"male",labelKey:"MALE"},{value:"female",labelKey:"FEMALE"}]}},{id:"company",field:"company",nameKey:"COMPANY",width:60,sortable:!0,filterable:!0,filter:{model:ie.multipleSelect,customStructure:{label:"company",value:"company"},collectionSortBy:{property:"company",sortDesc:!1},collectionAsync:this.http.get(`${cJ}/customers_100.json`),filterOptions:{filter:!0}}}],this.gridOptions={enableAutoResize:!0,autoResize:{container:"#demo-container",rightPadding:10},enableAutoTooltip:!0,autoTooltipOptions:{enableForHeaderCells:!0},enableTranslate:!0,i18n:this.translate,enableFiltering:!0,enableCellNavigation:!0,multiColumnSort:!1,gridMenu:{resizeOnShowHeaderRow:!0},backendServiceApi:{disableInternalPostProcess:!0,service:this.backendService,options:{datasetName:b9,addLocaleIntoQuery:!0,extraQueryArguments:[{field:"userId",value:123}],infiniteScroll:{fetchSize:30}},preProcess:()=>this.displaySpinner(!0),process:e=>this.getCustomerApiCall(e),postProcess:e=>{this.metrics={endTime:new Date,totalItemCount:e.data[b9].totalCount||0},this.displaySpinner(!1),this.getCustomerCallback(e),this.cd.detectChanges()}}}}clearAllFiltersAndSorts(){this.angularGrid?.gridService&&this.angularGrid.gridService.clearAllFiltersAndSorts()}displaySpinner(e){this.processing=e,this.status=e?{text:"processing...",class:"alert alert-danger"}:{text:"finished",class:"alert alert-success"}}getCustomerCallback(e){const{nodes:a,totalCount:u}=e.data[b9];this.angularGrid&&(this.metrics.totalItemCount=u,e.infiniteScrollBottomHit?this.angularGrid.dataView?.addItems(a):(this.angularGrid.slickGrid?.scrollTo(0),this.dataset=a,this.metrics.itemCount=a.length))}getCustomerApiCall(e){return this.getCustomerDataApiMock(e)}getCustomerDataApiMock(e){return new Promise(a=>{let u=0,i=0,r="",o="";this.http.get(`${cJ}/customers_100.json`).subscribe(d=>{let h=d;if(e.includes("first:")&&(u=+(e.match(/first:([0-9]+),/)||[])[1]),e.includes("offset:")&&(i=+(e.match(/offset:([0-9]+),/)||[])[1]),e.includes("orderBy:")){const[x,D,C]=/orderBy:\[{field:([a-zA-Z/]+),direction:(ASC|DESC)}\]/gi.exec(e)||[];r=D||"",o=C||""}if(e.includes("orderBy:")){const[x,D,C]=/orderBy:\[{field:([a-zA-Z/]+),direction:(ASC|DESC)}\]/gi.exec(e)||[];r=D||"",o=C||""}if(e.includes("filterBy:")){const x=/{field:(\w+),operator:(\w+),value:([0-9a-z',"\s]*)}/gi;let D;for(;null!==(D=x.exec(e));){const C=D[1]||"",F=D[2]||"",A=D[3]||"";let[z,M]=A.split(",");C&&F&&""!==A&&(h=h.filter(L=>{const I=L[C];switch(z=aP(z),M=aP(M||""),F){case"EQ":return I.toLowerCase()===z;case"NE":return I.toLowerCase()!==z;case"LE":return I.toLowerCase()<=z;case"LT":return I.toLowerCase()z;case"GE":return I.toLowerCase()>=z;case"EndsWith":return I.toLowerCase().endsWith(z);case"StartsWith":return I.toLowerCase().startsWith(z);case"Starts+Ends":return I.toLowerCase().startsWith(z)&&I.toLowerCase().endsWith(M);case"Contains":return I.toLowerCase().includes(z);case"Not_Contains":return!I.toLowerCase().includes(z);case"IN":const W=A.toLocaleLowerCase().split(",");for(const X of W)if(I.toLocaleLowerCase()===aP(X))return!0}}))}}let m=i;m>h.length&&(e=e.replace(`offset:${m}`,""),m=0);const g=x=>r?x[r]:x;switch(o.toUpperCase()){case"ASC":h=h.sort((x,D)=>g(x).localeCompare(g(D)));break;case"DESC":h=h.sort((x,D)=>g(D).localeCompare(g(x)))}const v=h.slice(m,m+u),k={data:{[b9]:{nodes:v,totalCount:h.length}}};setTimeout(()=>{this.graphqlQuery=this.gridOptions.backendServiceApi.service.buildQuery(),a(k)},this.serverWaitDelay)})})}refreshMetrics(e){e?.current>=0&&(this.metrics.itemCount=this.angularGrid.dataView?.getFilteredItemCount()||0,this.tagDataClass=this.metrics.itemCount===this.metrics.totalItemCount?"fully-loaded":"partial-load")}switchLanguage(){const e="en"===this.selectedLanguage?"fr":"en";this.subscriptions.push(this.translate.use(e).subscribe(()=>{this.selectedLanguage=e})),this.getCustomerApiCall(this.backendService.buildQuery()||"")}toggleDarkMode(){this._darkMode=!this._darkMode,this.toggleBodyBackground(),this.angularGrid.slickGrid?.setOptions({darkMode:this._darkMode})}toggleBodyBackground(){this._darkMode?(document.querySelector(".panel-wm-content").classList.add("dark-mode"),document.querySelector("#demo-container").dataset.bsTheme="dark"):(document.querySelector(".panel-wm-content").classList.remove("dark-mode"),document.querySelector("#demo-container").dataset.bsTheme="light")}static#e=this.ctorParameters=()=>[{type:ei},{type:jt},{type:et}]};k9=$e([ca({encapsulation:ja.None,template:'
\n

\n Example 39: GraphQL Backend Service with Infinite Scroll\n \n \n code\n \n \n

\n\n
\n
    \n
  • \n Infinite scrolling allows the grid to lazy-load rows from the server when reaching the scroll bottom (end) position.\n In its simplest form, the more the user scrolls down, the more rows get loaded.\n If we reached the end of the dataset and there is no more data to load, then we\'ll assume to have the entire dataset loaded in memory.\n This contrast with the regular Pagination approach which will only hold a single page data at a time.\n
  • \n
  • NOTES
  • \n
      \n
    1. \n presets.pagination is not supported with Infinite Scroll and will revert to the first page,\n simply because since we keep appending data, we always have to start from index zero (no offset).\n
    2. \n
    3. \n Pagination is not shown BUT in fact, that is what is being used behind the scene whenever reaching the scroll end (fetching next batch).\n
    4. \n
    5. \n Also note that whenever the user changes the Sort(s)/Filter(s) it will always reset and go back to zero index (first page).\n
    6. \n
    \n
\n
\n\n
\n
\n
\n Status: {{status.text}}\n \n \n \n
\n\n
\n
\n \n \n \n
\n
\n
\n
\n \n Locale:\n \n {{selectedLanguage + \'.json\'}}\n \n
\n
\n
\n
\n Metrics:\n \n {{metrics.endTime | date: \'dd MMM, h:mm:ssa\'}} \u2014\n {{metrics.itemCount}}\n of\n {{metrics.totalItemCount}}\n items\n \n All Data Loaded!!!\n
\n
\n\n
\n
\n GraphQL Query:\n
\n
\n
\n
\n\n \n \n
\n',styles:[V3e()]}),Ct("design:paramtypes",[ei,jt,et])],k9);let x9=class{constructor(){this.dataset=[],this.shouldResetOnSort=!1}ngOnInit(){this.defineGrid(),this.dataset=this.loadData(0,50),this.metrics={itemCount:50,totalItemCount:50}}angularGridReady(e){this.angularGrid=e}defineGrid(){this.columnDefinitions=[{id:"title",name:"Title",field:"title",sortable:!0,minWidth:100,filterable:!0},{id:"duration",name:"Duration (days)",field:"duration",sortable:!0,minWidth:100,filterable:!0,type:w.number},{id:"percentComplete",name:"% Complete",field:"percentComplete",sortable:!0,minWidth:100,filterable:!0,type:w.number},{id:"start",name:"Start",field:"start",formatter:j.dateIso,exportWithFormatter:!0,filterable:!0},{id:"finish",name:"Finish",field:"finish",formatter:j.dateIso,exportWithFormatter:!0,filterable:!0},{id:"effort-driven",name:"Effort Driven",field:"effortDriven",sortable:!0,minWidth:100,filterable:!0,formatter:j.checkmarkMaterial}],this.gridOptions={autoResize:{container:"#demo-container",rightPadding:10},enableAutoResize:!0,enableFiltering:!0,enableGrouping:!0,editable:!1,rowHeight:33}}handleOnScroll(e){const a=e.grid.getViewportNode();if(["mousewheel","scroll"].includes(e.triggeredBy||"")&&a.scrollTop>0&&Math.ceil(a.offsetHeight+e.scrollTop)>=e.scrollHeight){console.log("onScroll end reached, add more items");const u=this.angularGrid.dataView?.getItemCount()||0,i=this.loadData(u,50);this.angularGrid.dataView?.addItems(i)}}handleOnSort(){if(this.shouldResetOnSort){const e=this.loadData(0,50);this.angularGrid.slickGrid?.scrollTo(0),this.angularGrid.dataView?.setItems(e),this.angularGrid.dataView?.reSort()}}groupByDuration(){this.angularGrid?.dataView?.setGrouping({getter:"duration",formatter:e=>`Duration: ${e.value} (${e.count} items)`,comparer:(e,a)=>ul.numeric(e.value,a.value,Gt.asc),aggregators:[new Nt_Avg("percentComplete"),new Nt_Sum("cost")],aggregateCollapsed:!1,lazyTotalsCalculation:!0}),this.angularGrid?.slickGrid?.setSortColumns([{columnId:"duration",sortAsc:!0}]),this.angularGrid?.slickGrid?.invalidate()}loadData(e,a){const u=[];for(let i=e;i="}])}refreshMetrics(e){this.angularGrid&&e?.current>=0&&(this.metrics.itemCount=this.angularGrid.dataView?.getFilteredItemCount()||0,this.metrics.totalItemCount=e.itemCount||0)}setSortingDynamically(){this.angularGrid?.sortService.updateSorting([{columnId:"title",direction:"DESC"}])}};x9=$e([ca({template:'
\n

\n Example 40: Infinite Scroll from JSON data\n \n \n code\n \n \n

\n\n
\n
    \n
  • \n Infinite scrolling allows the grid to lazy-load rows from the server when reaching the scroll bottom (end) position.\n In its simplest form, the more the user scrolls down, the more rows get loaded.\n
  • \n
  • NOTES: presets.pagination is not supported with Infinite Scroll and will revert to the first page,\n simply because since we keep appending data, we always have to start from index zero (no offset).\n
  • \n
\n
\n\n
\n
\n \n \n \n \n\n \n \n \n
\n
\n\n
\n Metrics:\n \n {{metrics.endTime | date: \'dd MMM, h:mm:ssa\'}} \u2014\n {{metrics.totalItemCount}}\n items\n \n
\n\n \n \n
'})],x9);var K3e=O(552),W3e=O.n(K3e);class J3e{set columnDefinitions(e){this._columnDefinitions=e}set datasetIdPropName(e){this._datasetIdPropName=e}constructor(){this._filterCount=0,this._columnDefinitions=[],this._datasetIdPropName="id",this._odataOptions={filterQueue:[],orderBy:""},this._defaultSortBy="",this._columnFilters={}}buildQuery(){if(!this._odataOptions)throw new Error('Odata Service requires certain options like "top" for it to work');this._odataOptions.filterQueue=[];const e=[];if(this._odataOptions&&!0===this._odataOptions.enableCount){const a=this._odataOptions.version&&this._odataOptions.version>=4?"$count=true":"$inlinecount=allpages";e.push(a)}if(this._odataOptions.top&&e.push(`$top=${this._odataOptions.top}`),this._odataOptions.skip&&e.push(`$skip=${this._odataOptions.skip}`),this._odataOptions.orderBy){let a="";a=Array.isArray(this._odataOptions.orderBy)?this._odataOptions.orderBy.join(","):this._odataOptions.orderBy,e.push(`$orderby=${a}`)}if(this._odataOptions.filterBy||this._odataOptions.filter){const a=this._odataOptions.filter||this._odataOptions.filterBy;if(a){this._filterCount=1,this._odataOptions.filterQueue=[];let u=a;Array.isArray(a)&&(this._filterCount=a.length,u=a.join(` ${this._odataOptions.filterBySeparator||"and"} `)),"string"==typeof u&&("("===u[0]&&")"===u.slice(-1)?this.addToFilterQueueWhenNotExists(u):this.addToFilterQueueWhenNotExists(`(${u})`))}}if(this._odataOptions.filterQueue.length>0){const a=this._odataOptions.filterQueue.join(` ${this._odataOptions.filterBySeparator||"and"} `);this._odataOptions.filter=a,e.push(`$filter=${a}`)}if(this._odataOptions.enableSelect||this._odataOptions.enableExpand){const a=this._columnDefinitions.flatMap(i=>i.fields??[i.field]);a.unshift(this._datasetIdPropName);const u=this.buildSelectExpand([...new Set(a)]);if(this._odataOptions.enableSelect){const i=u.selectParts.join(",");e.push(`$select=${i}`)}if(this._odataOptions.enableExpand){const i=u.expandParts.join(",");e.push(`$expand=${i}`)}}return e.join("&")}getFilterCount(){return this._filterCount}get columnFilters(){return this._columnFilters}get options(){return this._odataOptions}set options(e){this._odataOptions=e}removeColumnFilter(e){this._columnFilters&&this._columnFilters.hasOwnProperty(e)&&delete this._columnFilters[e]}saveColumnFilter(e,a,u){this._columnFilters[e]={search:u,value:a}}updateOptions(e){for(const a of Object.keys(e))if(e.hasOwnProperty(a)&&(this._odataOptions[a]=e[a]),"orderBy"===a||"sortBy"===a){let u=e[a];this._odataOptions.caseType===Fp.pascalCase&&(Array.isArray(u)?u.forEach((i,r,o)=>{o[r]=Fo(i)}):u=Fo(e[a])),this._odataOptions.orderBy=u,this._defaultSortBy=u}}addToFilterQueueWhenNotExists(e){this._odataOptions.filterQueue&&-1===this._odataOptions.filterQueue.indexOf(e)&&this._odataOptions.filterQueue.push(e)}buildSelectExpand(e){const a={},u=new Set;for(const i of e){const r=i.split("/");if(1===r.length)u.add(i);else{const o=r[0],d=r.splice(1).join("/");a[o]||(a[o]=[]),a[o].push(d),this._odataOptions.enableExpand&&!(this._odataOptions.version&&this._odataOptions.version>=4)&&u.add(o)}}return{selectParts:[...u],expandParts:this._odataOptions.enableExpand?this.buildExpand(a):[]}}buildExpand(e){const a=[];for(const u of Object.keys(e))if(this._odataOptions.enableSelect&&this._odataOptions.version&&this._odataOptions.version>=4){const i=this.buildSelectExpand(e[u]);let r=i.selectParts.join(",");r.length>0&&(r="$select="+r),this._odataOptions.enableExpand&&i.expandParts.length>0&&(r+=(r.length>0?";":"")+"$expand="+i.expandParts.join(",")),r.length>0&&(r="("+r+")"),a.push(u+r)}else a.push(u);return a}}class mJ{get columnDefinitions(){return this._columnDefinitions}get odataService(){return this._odataService}get _gridOptions(){return this._grid?.getOptions()??{}}constructor(){this._currentFilters=[],this._currentPagination=null,this._currentSorters=[],this._columnDefinitions=[],this.defaultOptions={top:25,orderBy:"",caseType:Fp.pascalCase},this._odataService=new J3e}init(e,a,u,i){this._grid=u;const r={...this.defaultOptions,...e};if(this._gridOptions.enablePagination||r?.infiniteScroll){const o=r.infiniteScroll?.fetchSize??a?.pageSize??this.defaultOptions.top;this._odataService.options={...r,top:o},this._currentPagination={pageNumber:1,pageSize:this._odataService.options.top||this.defaultOptions.top||20}}else this._odataService.options={...r,top:void 0},this._currentPagination=null;if(this.options=this._odataService.options,this.pagination=a,u?.getColumns){const o=i?.allColumns??u.getColumns()??[];this._columnDefinitions=o.filter(d=>!d.excludeFromQuery)}this._odataService.columnDefinitions=this._columnDefinitions,this._odataService.datasetIdPropName=this._gridOptions.datasetIdPropertyName||"id"}buildQuery(){return this._odataService.buildQuery()}postProcess(e){const a=this._odataService.options.version??2;if(this.pagination&&this._odataService.options.enableCount){const i=(this._odataService.options.countExtractor??a>=4?r=>r?.["@odata.count"]:3===a?r=>r?.__count:r=>r?.d?.__count)(e);"number"==typeof i&&(this.pagination.totalItems=i)}if(this._odataService.options.enableExpand){const i=(this._odataService.options.datasetExtractor??a>=4?r=>r?.value:3===a?r=>r?.results:r=>r?.d?.results)(e);if(Array.isArray(i)){const r=new Set(this._columnDefinitions.flatMap(o=>o.fields??[o.field]).filter(o=>o.includes("/")));if(r.size>0){const o=new Set;for(const d of i){for(const h of r){const m=h.split("/"),g=m[0];o.add(g);let v=d[g];for(let k=1;k":a="gt";break;case">=":a="ge";break;case"<>":case"!=":a="ne";break;default:a="eq"}return a}resetPaginationOptions(){this._odataService.updateOptions({skip:0})}saveColumnFilter(e,a,u){this._odataService.saveColumnFilter(e,a,u)}processOnFilterChanged(e,a){if(void 0===this._gridOptions.backendServiceApi)throw new Error('Something went wrong in the GridOdataService, "backendServiceApi" is not initialized');if(this._currentFilters=this.castFilterToColumnFilters(a.columnFilters),!a||!a.grid)throw new Error('Something went wrong when trying create the GridOdataService, it seems that "args" is not populated correctly');return this.updateFilters(a.columnFilters),this.resetPaginationOptions(),this._odataService.buildQuery()}processOnPaginationChanged(e,a){const u=+(this.options?.infiniteScroll?.fetchSize||a.pageSize||(this.pagination?this.pagination.pageSize:20));return this.updatePagination(a.newPage,u),this._odataService.buildQuery()}processOnSortChanged(e,a){const u=a.multiColumnSort?a.sortCols:new Array({columnId:a.sortCol?.id??"",sortCol:a.sortCol,sortAsc:a.sortAsc});return this.updateSorters(u),this.options?.infiniteScroll&&this._odataService.updateOptions({skip:void 0}),this._odataService.buildQuery()}updateFilters(e,a){let u="";const i=[],r=this._odataService.options.version??2;a&&(this._currentFilters=this.castFilterToColumnFilters(e));for(const o in e)if(e.hasOwnProperty(o)){const d=e[o];let h;if(h=a&&Array.isArray(this._columnDefinitions)?this._columnDefinitions.find(I=>I.id===d.columnId):d.columnDef,!h)throw new Error("[GridOData Service]: Something went wrong in trying to get the column definition of the specified filter (or preset filters). Did you make a typo on the filter columnId?");let m=h.filter?.queryField||h.queryFieldFilter||h.queryField||h.field||h.name||"";m instanceof HTMLElement&&(m=Iu(m.innerHTML));const g=h.type||w.string;let v=(d?.searchTerms?[...d.searchTerms]:null)||[],k=Array.isArray(v)&&1===v.length?v[0]:"";if(typeof k>"u"&&(k=""),!m)throw new Error('GridOData filter could not find the field name to query the search, your column definition must include a valid "field" or "name" (optionally you can also use the "queryfield").');if(this._odataService.options.useVerbatimSearchTerms||d.verbatimSearchTerms){i.push(`${m} ${d.operator} ${JSON.stringify(d.searchTerms)}`.trim());continue}k=null==k?"":`${k}`;const D=!1!==(h.autoParseInputFilterOperator??this._gridOptions.autoParseInputFilterOperator)?k.match(/^((.*[^\\*\r\n])[*]{1}(.*[^*\r\n]))|^([<>!=*]{0,2})(.*[^<>!=*])([*]?)$/)||[]:[k,"","","","",k,""],C=D?.[2]||"",F=D?.[3]||"";let A=d.operator||D?.[4],z=D?.[1]||D?.[5]||"";const M=D?.[6]||"*z"===A||A===te.endsWith?"*":"",L=d.bypassBackendQuery||!1;if(m&&""===z&&v.length<=1){this.removeColumnFilter(ii(m));continue}if(C&&F?(v=[C,F],A=te.startsWithEndsWith):Array.isArray(v)&&1===v.length&&"string"==typeof v[0]&&v[0].indexOf("..")>=0&&(A!==te.rangeInclusive&&A!==te.rangeExclusive&&(A=this._gridOptions.defaultFilterRangeOperator??te.rangeInclusive),v=v[0].split("..",2),""===v[0]?(A=A===te.rangeInclusive?"<=":A===te.rangeExclusive?"<":A,v=v.slice(1),z=v[0]):""===v[1]&&(A=A===te.rangeInclusive?">=":A===te.rangeExclusive?">":A,v=v.slice(0,1),z=v[0])),!A&&h.filter&&(A=h.filter.operator),!A&&Array.isArray(v)&&2===v.length&&v[0]&&v[1]&&(A=this._gridOptions.defaultFilterRangeOperator),(A===te.rangeInclusive||A===te.rangeExclusive)&&Array.isArray(v)&&1===v.length&&g===w.date&&(A=te.equal),A||(A=P2(g)),L)m&&this.saveColumnFilter(ii(m),k,v);else{let I;if(z=this.normalizeSearchValue(g,z,r),Array.isArray(v)&&v.forEach((W,X)=>{v[X]=this.normalizeSearchValue(g,v[X],r)}),u="",this._odataService.options.caseType===Fp.pascalCase&&(m=Fo(ii(m||""))),"function"==typeof this._odataService.options.filterQueryOverride&&(I=this._odataService.options.filterQueryOverride({fieldName:ii(m),columnDef:h,operator:A,columnFilterOperator:d.operator,searchValues:v,grid:this._grid})),void 0!==I)u=I;else if(A===te.startsWithEndsWith&&Array.isArray(v)&&2===v.length){const W=[],[X,q]=v;W.push(`startswith(${m}, ${X})`),W.push(`endswith(${m}, ${q})`),u=W.join(" and ")}else if(v?.length>1&&("IN"===A||"NIN"===A||"NOTIN"===A||"NOT IN"===A||"NOT_IN"===A)){const W=[];if("IN"===A){for(let X=0,q=v.length;X=4?`contains(${m}, ${z})`:`substringof(${z}, ${m})`,A===te.notContains&&(u=`not ${u}`));""!==u&&(i.push(u.trim()),this.saveColumnFilter(ii(m||""),k,z))}}this._odataService.updateOptions({filter:i.length>0?i.join(" and "):"",skip:void 0})}updatePagination(e,a){this._currentPagination={pageNumber:e,pageSize:a},this._gridOptions&&(this._gridOptions.enablePagination||!this._gridOptions.hasOwnProperty("enablePagination")||this.options?.infiniteScroll)&&this._odataService.updateOptions({top:a,skip:(e-1)*a})}updateSorters(e,a){let u=[];const i=[];if(!e&&a){u=a,u.forEach(d=>d.direction=d.direction.toLowerCase());const o=u.map(d=>{const h=this._columnDefinitions.find(m=>m.id===d.columnId);return i.push({field:h?(h.queryFieldSorter||h.queryField||h.field)+"":d.columnId+"",direction:d.direction}),h?{columnId:d.columnId,sortAsc:d.direction.toUpperCase()===Di.ASC}:null});Array.isArray(o)&&this._grid&&this._grid.setSortColumns(o)}else if(e&&!a&&0!==e?.length&&e)for(const o of e)if(o.sortCol){let d=(o.sortCol.queryFieldSorter||o.sortCol.queryField||o.sortCol.field)+"",h=(o.sortCol.field||o.sortCol.id)+"",m=(o.sortCol.queryFieldSorter||o.sortCol.queryField||o.sortCol.field||"")+"";this._odataService.options.caseType===Fp.pascalCase&&(d=Fo(d),h=Fo(h),m=Fo(m)),u.push({columnId:o.sortCol.id,direction:o.sortAsc?Di.asc:Di.desc}),""!==m&&i.push({field:m,direction:o.sortAsc?Di.ASC:Di.DESC})}u=u||[];const r=i.map(o=>{let d="";return o&&o.field&&(d=`${this._odataService.options.caseType===Fp.pascalCase?Fo(o.field):o.field} ${o&&o.direction&&o.direction.toLowerCase()||""}`),d}).join(",");return this._odataService.updateOptions({orderBy:r}),this._currentSorters=u,this._odataService.buildQuery()}castFilterToColumnFilters(e){const a="object"==typeof e?Object.keys(e).map(u=>e[u]):e;return Array.isArray(a)?a.map(u=>{const i={columnId:u.columnId||""};return u.operator&&(i.operator=u.operator),u.targetSelector&&(i.targetSelector=u.targetSelector),Array.isArray(u.searchTerms)&&(i.searchTerms=u.searchTerms),i}):[]}filterBySearchTermRange(e,a,u){let i="";return Array.isArray(u)&&2===u.length&&(a===te.rangeInclusive?(i=`(${e} ge ${u[0]}`,""!==u[1]&&(i+=` and ${e} le ${u[1]}`),i+=")"):a===te.rangeExclusive&&(i=`(${e} gt ${u[0]}`,""!==u[1]&&(i+=` and ${e} lt ${u[1]}`),i+=")")),i}normalizeSearchValue(e,a,u){switch(e){case w.date:a=dce(a),a=u>=4?a:`DateTime'${a}'`;break;case w.string:case w.text:case w.readonly:"string"==typeof a&&(a=a.replace(/'/g,"''"),a=`'${a=encodeURIComponent(a)}'`);break;case w.integer:case w.number:case w.float:"string"==typeof a&&((""===(a=(a=(a=(a=(a=a.replace(/\.\./g,".")).replace(/\.+$/g,"")).replace(/^\.+/g,"0.")).replace(/^-+\.+/g,"-0.")).replace(/(?!^-)[^\d.]/g,""))||"-"===a)&&(a="0"))}return a}}let f9=class{constructor(e,a){this.cd=e,this.http=a,this.dataset=[],this.isPageErrorTest=!1,this.tagDataClass="",this.odataQuery="",this.processing=!1,this.errorStatus="",this.errorStatusClass="hidden",this.status={text:"processing...",class:"alert alert-danger"},this.backendService=new mJ}ngOnInit(){this.initializeGrid()}angularGridReady(e){this.angularGrid=e}initializeGrid(){this.columnDefinitions=[{id:"name",name:"Name",field:"name",sortable:!0,type:w.string,filterable:!0,filter:{model:ie.compoundInput}},{id:"gender",name:"Gender",field:"gender",filterable:!0,sortable:!0,filter:{model:ie.singleSelect,collection:[{value:"",label:""},{value:"male",label:"male"},{value:"female",label:"female"}]}},{id:"company",name:"Company",field:"company",filterable:!0,sortable:!0},{id:"category_name",name:"Category",field:"category/name",filterable:!0,sortable:!0,formatter:(e,a,u,i,r)=>r.category?.name||""}],this.gridOptions={enableAutoResize:!0,autoResize:{container:"#demo-container",rightPadding:10},checkboxSelector:{hideInFilterHeaderRow:!1,hideInColumnTitleRow:!0},enableCellNavigation:!0,enableFiltering:!0,enableCheckboxSelector:!0,enableRowSelection:!0,enableGrouping:!0,headerMenu:{hideFreezeColumnsCommand:!1},presets:{},backendServiceApi:{service:this.backendService,options:{infiniteScroll:{fetchSize:30},enableCount:!0,version:4},onError:e=>{this.errorStatus=e.message,this.errorStatusClass="visible notification is-light is-danger is-small is-narrow",this.displaySpinner(!1,!0)},preProcess:()=>{this.errorStatus="",this.errorStatusClass="hidden",this.displaySpinner(!0)},process:e=>this.getCustomerApiCall(e),postProcess:e=>{this.metrics=e.metrics,this.displaySpinner(!1),this.getCustomerCallback(e),this.cd.detectChanges()}}}}displaySpinner(e,a){this.processing=e,this.status=a?{text:"ERROR!!!",class:"alert alert-danger"}:e?{text:"loading",class:"alert alert-warning"}:{text:"finished",class:"alert alert-success"},this.cd.detectChanges()}getCustomerCallback(e){const a=e["@odata.count"];this.metrics.totalItemCount=a,e.infiniteScrollBottomHit?this.angularGrid.dataView?.addItems(e.value):(this.angularGrid.slickGrid?.scrollTo(0),this.dataset=e.value,this.metrics.itemCount=e.value.length),this.odataQuery=e.query}getCustomerApiCall(e){return this.getCustomerDataApiMock(e)}getCustomerDataApiMock(e){return this.errorStatusClass="hidden",new Promise(a=>{const u=e.toLowerCase().split("&");let i=0,r=0,o="",d=100;const h={};if(this.isPageErrorTest)throw this.isPageErrorTest=!1,new Error("Server timed out trying to retrieve data for the last page");for(const m of u){if(m.includes("$top=")&&(i=+m.substring(5),5e4===i))throw new Error("Server timed out retrieving 50,000 rows");if(m.includes("$skip=")&&(r=+m.substring(6)),m.includes("$orderby=")&&(o=m.substring(9)),m.includes("$filter=")){const g=m.substring(8).replace("%20"," ");if(g.includes("matchespattern")){const v=new RegExp("matchespattern\\(([a-zA-Z]+),\\s'%5E(.*?)'\\)","i"),k=g.match(v)||[],x=k[1].trim();h[x]={type:"matchespattern",term:"^"+k[2].trim()}}if(g.includes("contains")){const v=g.match(/contains\(([a-zA-Z/]+),\s?'(.*?)'/)||[],k=v[1].trim();h[k]={type:"substring",term:v[2].trim()}}if(g.includes("substringof")){const v=g.match(/substringof\('(.*?)',\s([a-zA-Z/]+)/)||[],k=v[2].trim();h[k]={type:"substring",term:v[1].trim()}}for(const v of["eq","ne","le","lt","gt","ge"])if(g.includes(v)){const x=new RegExp(`([a-zA-Z ]*) ${v} '(.*?)'`).exec(g);if(Array.isArray(x)){const D=x[1].trim();h[D]={type:v,term:x[2].trim()}}}if(g.includes("startswith")&&g.includes("endswith")){const v=g.match(/startswith\(([a-zA-Z ]*),\s?'(.*?)'/)||[],k=g.match(/endswith\(([a-zA-Z ]*),\s?'(.*?)'/)||[],x=v[1].trim();h[x]={type:"starts+ends",term:[v[2].trim(),k[2].trim()]}}else if(g.includes("startswith")){const v=g.match(/startswith\(([a-zA-Z ]*),\s?'(.*?)'/)||[],k=v[1].trim();h[k]={type:"starts",term:v[2].trim()}}else if(g.includes("endswith")){const v=g.match(/endswith\(([a-zA-Z ]*),\s?'(.*?)'/)||[],k=v[1].trim();h[k]={type:"ends",term:v[2].trim()}}if(g.includes("company"))throw new Error('Server could not filter using the field "Company"')}}if(o.includes("company"))throw new Error('Server could not sort using the field "Company"');this.http.get("assets/data/customers_100.json").subscribe(m=>{let g=m;if(o?.length>0){const D=o.split(",");for(const C of D){const F=C.split(" "),A=F[0];let z=L=>L;for(const L of A.split("/")){const I=z;z=W=>I(W)[L]}switch((F[1]??"asc").toLocaleLowerCase()){case"asc":g=g.sort((L,I)=>z(L).localeCompare(z(I)));break;case"desc":g=g.sort((L,I)=>z(I).localeCompare(z(L)))}}}let v=r,k=g;if(h){for(const D in h)D in h&&(k=k.filter(C=>{const F=h[D].type,A=h[D].term;let z=D;if(-1!==D?.indexOf(" ")){const I=D.split(" ");z=I[I.length-1]}let M,L=C;for(const I of z.split("/"))M=L[I],L=M;if(M){const[I,W]=Array.isArray(A)?A:[A];switch(F){case"eq":return M.toLowerCase()===I;case"ne":return M.toLowerCase()!==I;case"le":return M.toLowerCase()<=I;case"lt":return M.toLowerCase()I;case"ge":return M.toLowerCase()>=I;case"ends":return M.toLowerCase().endsWith(I);case"starts":return M.toLowerCase().startsWith(I);case"starts+ends":return M.toLowerCase().startsWith(I)&&M.toLowerCase().endsWith(W);case"substring":return M.toLowerCase().includes(I);case"matchespattern":return new RegExp(I.replaceAll("%25",".*"),"i").test(M)}}}));d=k.length}v>k.length&&(e=e.replace(`$skip=${v}`,""),v=0);const x=k.slice(v,v+i);setTimeout(()=>{const D={query:e};D.value=x,D["@odata.count"]=d,a(D)},100)})})}groupByGender(){this.angularGrid?.dataView?.setGrouping({getter:"gender",formatter:e=>`Gender: ${e.value} (${e.count} items)`,comparer:(e,a)=>ul.string(e.value,a.value),aggregators:[new Nt_Sum("gemder")],aggregateCollapsed:!1,lazyTotalsCalculation:!0}),this.angularGrid?.slickGrid.setSortColumns([{columnId:"duration",sortAsc:!0}]),this.angularGrid?.slickGrid.invalidate()}clearAllFiltersAndSorts(){this.angularGrid?.gridService&&this.angularGrid.gridService.clearAllFiltersAndSorts()}setFiltersDynamically(){this.angularGrid?.filterService.updateFilters([{columnId:"gender",searchTerms:["female"]}])}refreshMetrics(e){e?.current>=0&&(this.metrics.itemCount=this.angularGrid.dataView?.getFilteredItemCount()||0,this.tagDataClass=this.metrics.itemCount===this.metrics.totalItemCount?"fully-loaded":"partial-load")}setSortingDynamically(){this.angularGrid?.sortService.updateSorting([{columnId:"name",direction:"DESC"}])}static#e=this.ctorParameters=()=>[{type:ei},{type:jt}]};f9=$e([ca({encapsulation:ja.None,template:'
\n

\n Example 38: OData (v4) Backend Service with Infinite Scroll\n \n \n code\n \n \n

\n\n
\n
    \n
  • \n Infinite scrolling allows the grid to lazy-load rows from the server when reaching the scroll bottom (end) position.\n In its simplest form, the more the user scrolls down, the more rows get loaded.\n If we reached the end of the dataset and there is no more data to load, then we\'ll assume to have the entire dataset loaded in memory.\n This contrast with the regular Pagination approach which will only hold a single page data at a time.\n
  • \n
  • NOTES
  • \n
      \n
    1. \n presets.pagination is not supported with Infinite Scroll and will revert to the first page,\n simply because since we keep appending data, we always have to start from index zero (no offset).\n
    2. \n
    3. \n Pagination is not shown BUT in fact, that is what is being used behind the scene whenever reaching the scroll end (fetching next batch).\n
    4. \n
    5. \n Also note that whenever the user changes the Sort(s)/Filter(s) it will always reset and go back to zero index (first page).\n
    6. \n
    \n
\n
\n\n
\n
\n
\n Backend Error: \n
\n
\n
\n\n
\n
\n
\n Status: {{status.text}}\n \n \n \n
\n
\n
\n
\n OData Query: {{odataQuery}}\n
\n
\n
\n\n
\n
\n \n \n \n \n\n
\n Metrics:\n \n {{metrics.endTime | date: \'dd MMM, h:mm:ssa\'}} \u2014\n {{metrics.itemCount}}\n of\n {{metrics.totalItemCount}}\n items\n \n All Data Loaded!!!\n
\n
\n
\n\n \n \n
\n',styles:[W3e()]}),Ct("design:paramtypes",[ei,jt])],f9);var Q3e=O(71),X3e=O.n(Q3e);let D9={},C9={},y9=class{constructor(){this.title="Example 7: Header Button Plugin",this.subTitle='\n This example demonstrates using the Slick.Plugins.HeaderButtons plugin to easily add buttons to colum headers.\n These buttons can be specified directly in the column definition, and are very easy to configure and use.\n (Wiki docs)\n
    \n
  • Resize the 1st column to see all icon/command
  • \n
  • Mouse hover the 2nd column to see it\'s icon/command
  • \n
  • For all the other columns, click on top-right red circle icon to enable highlight of negative numbers.
  • \n
  • Use override callback functions to change the properties of show/hide, enable/disable the menu or certain item(s) from the list
  • \n
      \n
    1. These callbacks are: "itemVisibilityOverride", "itemUsabilityOverride"
    2. \n
    3. for example the "Column E" does not show the header button via "itemVisibilityOverride"
    4. \n
    5. for example the "Column J" header button is displayed but it not usable via "itemUsabilityOverride"
    6. \n
    \n
\n ',this.columnDefinitions1=[],this.columnDefinitions2=[],this.dataset1=[],this.dataset2=[],D9={},C9={}}ngOnInit(){this.defineGrid(),this.dataset1=this.loadData(200,1),this.dataset2=this.loadData(200,2)}angularGrid1Ready(e){this.angularGrid1=e}angularGrid2Ready(e){this.angularGrid2=e}defineGrid(){this.gridOptions1={enableAutoResize:!0,enableHeaderButton:!0,enableHeaderMenu:!1,autoResize:{container:"#demo-container",rightPadding:10},enableFiltering:!1,enableExcelCopyBuffer:!0,excelCopyBufferOptions:{onCopyCells:(e,a)=>console.log("onCopyCells",e,a),onPasteCells:(e,a)=>console.log("onPasteCells",e,a),onCopyCancelled:(e,a)=>console.log("onCopyCancelled",e,a)},enableCellNavigation:!0,gridHeight:275,headerButton:{onCommand:(e,a)=>this.handleOnCommand(e,a,1)}},this.gridOptions2={...this.gridOptions1,enableHeaderMenu:!0,enableFiltering:!0,headerButton:{onCommand:(e,a)=>this.handleOnCommand(e,a,2)}}}handleOnCommand(e,a,u){const i=a.column,r=a.button;"toggle-highlight"===a.command&&("mdi mdi-lightbulb-on text-danger"===r.cssClass?(1===u?delete D9[i.id]:delete C9[i.id],r.cssClass="mdi mdi-lightbulb-outline text-warning faded",r.tooltip="Highlight negative numbers."):(1===u?D9[i.id]=!0:C9[i.id]=!0,r.cssClass="mdi mdi-lightbulb-on text-danger",r.tooltip="Remove highlight."),this[`angularGrid${u}`].slickGrid.invalidate())}loadData(e,a){for(let i=0;i<10;i++)this[`columnDefinitions${a}`].push({id:i,name:"Column "+String.fromCharCode(65+i),field:i+"",width:0===i?70:100,filterable:!0,sortable:!0,formatter:(r,o,d,h)=>1===a&&D9[h.id]&&d<0||2===a&&C9[h.id]&&d<0?`
${d}
`:d,header:{buttons:[{cssClass:"mdi mdi-lightbulb-outline text-warning faded",command:"toggle-highlight",tooltip:"Highlight negative numbers.",itemVisibilityOverride:r=>"Column E"!==r.column.name,itemUsabilityOverride:r=>"Column J"!==r.column.name,action:(r,o)=>{console.log(`execute a callback action to "${o.command}" on ${o.column.name}`)}}]}});this[`columnDefinitions${a}`][0].name="Resize me!",this[`columnDefinitions${a}`][0].header={buttons:[{cssClass:"mdi mdi-message-text",handler:()=>{alert("Tag")}},{cssClass:"mdi mdi-forum-outline",handler:()=>{alert("Comment")}},{cssClass:"mdi mdi-information",handler:()=>{alert("Info")}},{cssClass:"mdi mdi-help-circle",handler:()=>{alert("Help")}}]},2===a&&this.columnDefinitions2[0].header?.buttons?.reverse(),this[`columnDefinitions${a}`][1].name="Hover me!",this[`columnDefinitions${a}`][1].header={buttons:[{cssClass:"mdi mdi-help-circle",showOnHover:!0,tooltip:"This button only appears on hover.",handler:()=>{alert("Help")}}]};const u=[];for(let i=0;i[]};y9=$e([ca({encapsulation:ja.None,template:'
\n

\n {{title}}\n \n \n code\n \n \n

\n
\n\n
Grid 1
\n \n \n\n
\n
Grid 2 - with both Header Buttons & Menus
\n \n \n\n
',styles:[X3e()]}),Ct("design:paramtypes",[])],y9);let tP=class{constructor(){this.clickedTimes=0}clickMe(){this.clickedTimes++}};tP=$e([ca({template:'\n
You\'ve clicked me {{clickedTimes}} time(s)
',selector:"custom-footer"})],tP);let _9=class{constructor(){this.title="Example 34: Custom header & footer Templates",this.subTitle="\n Basic Grid with templates for custom headers and footers\n
    \n
  • Pass in custom templates to be rendered at predefined header and footer destinations
  • \n
\n ",this.columnDefinitions=[]}ngOnInit(){this.columnDefinitions=[{id:"title",name:"Title",field:"title",sortable:!0},{id:"duration",name:"Duration (days)",field:"duration",sortable:!0},{id:"%",name:"% Complete",field:"percentComplete",sortable:!0},{id:"start",name:"Start",field:"start",formatter:j.dateIso},{id:"finish",name:"Finish",field:"finish",formatter:j.dateIso},{id:"effort-driven",name:"Effort Driven",field:"effortDriven",sortable:!0}],this.gridOptions={enableAutoResize:!1,enableSorting:!0,gridHeight:225,gridWidth:800},this.dataset=this.mockData(995)}mockData(e){const a=[];for(let u=0;u\n

\n {{ title }}\n \n \n code\n \n \n

\n
\n\n \n \n

Grid with header and footer slot

\n
\n\n \n \n \n \n
\n'})],_9);var ige=O(482),nge=O.n(ige);let F9=class{constructor(e){this.translate=e,this.title="Example 8: Header Menu Plugin",this.subTitle='\n This example demonstrates using the Slick.Plugins.HeaderMenu plugin to easily add menus to colum headers.
\n These menus can be specified directly in the column definition, and are very easy to configure and use.\n (Wiki docs)\n
    \n
  • Now enabled by default in the Global Grid Options, it will add the default commands of (hide column, sort asc/desc)
  • \n
  • Hover over any column header to see an arrow showing up on the right
  • \n
  • Try Sorting (multi-sort) the 2 columns "Duration" and "% Complete" (the other ones are disabled)
  • \n
  • Try hiding any columns (you use the "Column Picker" plugin by doing a right+click on the header to show the column back)
  • \n
  • Note: The "Header Button" & "Header Menu" Plugins cannot be used at the same time
  • \n
  • You can change the menu icon via SASS variables as shown in this demo (check all SASS variables)
  • \n
  • Use override callback functions to change the properties of show/hide, enable/disable the menu or certain item(s) from the list
  • \n
      \n
    1. These callbacks are: "itemVisibilityOverride", "itemUsabilityOverride"
    2. \n
    3. for example if we want to disable the "Help" command over the "Title" and "Completed" column
    4. \n
    5. for example don\'t show Help on column "% Complete"
    6. \n
    \n
\n ',this.subscriptions=[];this.translate.use("en"),this.selectedLanguage="en"}ngOnDestroy(){rd(this.subscriptions)}ngOnInit(){this.columnDefinitions=[{id:"title",name:"Title",field:"title",nameKey:"TITLE"},{id:"duration",name:"Duration",field:"duration",nameKey:"DURATION",sortable:!0},{id:"percentComplete",name:"% Complete",field:"percentComplete",nameKey:"PERCENT_COMPLETE",sortable:!0},{id:"start",name:"Start",field:"start",nameKey:"START"},{id:"finish",name:"Finish",field:"finish",nameKey:"FINISH"},{id:"completed",name:"Completed",field:"completed",nameKey:"COMPLETED"}],this.columnDefinitions.forEach(e=>{e.header={menu:{commandItems:[{iconCssClass:"mdi mdi-help-circle",titleKey:"HELP",command:"help",tooltip:"Need assistance?",cssClass:"bold",textCssClass:"title"===e.id||"completed"===e.id?"":"blue",positionOrder:99,itemUsabilityOverride:a=>!("title"===a.column.id||"completed"===a.column.id),itemVisibilityOverride:a=>"percentComplete"!==a.column.id,action:(a,u)=>{console.log("execute an action on Help",u)}},{divider:!0,command:"",positionOrder:98},{command:"custom-actions",title:"Hello",positionOrder:99,commandItems:[{command:"hello-world",title:"Hello World"},{command:"hello-slickgrid",title:"Hello SlickGrid"},{command:"sub-menu",title:"Let's play",cssClass:"green",subMenuTitle:"choose your game",subMenuTitleCssClass:"text-italic salmon",commandItems:[{command:"sport-badminton",title:"Badminton"},{command:"sport-tennis",title:"Tennis"},{command:"sport-racquetball",title:"Racquetball"},{command:"sport-squash",title:"Squash"}]}]},{command:"feedback",title:"Feedback",positionOrder:100,commandItems:[{command:"request-update",title:"Request update from supplier",iconCssClass:"mdi mdi-star",tooltip:"this will automatically send an alert to the shipping team to contact the user for an update"},"divider",{command:"sub-menu",title:"Contact Us",iconCssClass:"mdi mdi-account",subMenuTitle:"contact us...",subMenuTitleCssClass:"italic",commandItems:[{command:"contact-email",title:"Email us",iconCssClass:"mdi mdi-pencil-outline"},{command:"contact-chat",title:"Chat with us",iconCssClass:"mdi mdi-message-text-outline"},{command:"contact-meeting",title:"Book an appointment",iconCssClass:"mdi mdi-coffee"}]}]}]}}}),this.gridOptions={enableAutoResize:!0,enableHeaderMenu:!0,autoResize:{container:"#demo-container",rightPadding:10},enableFiltering:!1,enableCellNavigation:!0,headerMenu:{hideSortCommands:!1,hideColumnHideCommand:!1,subItemChevronClass:"mdi mdi-chevron-down mdi-rotate-270",onCommand:(e,a)=>{const u=a.item?.command;u.includes("hello-")?alert(a?.item.title):u.includes("sport-")?alert("Just do it, play "+a?.item?.title):u.includes("contact-")?alert("Command: "+a?.item?.command):"help"===a.command&&alert("Please help!!!")}},enableTranslate:!0,i18n:this.translate},this.getData()}getData(){const e=[];for(let a=0;a<1e3;a++)e[a]={id:a,title:"Task "+a,duration:Math.round(25*Math.random())+" days",percentComplete:Math.round(100*Math.random()),start:"01/01/2009",finish:"01/05/2009",completed:a%5==0};this.dataset=e}angularGridReady(e){this.angularGrid=e}switchLanguage(){const e="en"===this.selectedLanguage?"fr":"en";this.subscriptions.push(this.translate.use(e).subscribe(()=>{this.selectedLanguage=e}))}static#e=this.ctorParameters=()=>[{type:et}]};F9=$e([ca({template:'
\n

\n {{title}}\n \n \n code\n \n \n

\n
\n\n \n Locale:\n \n {{selectedLanguage + \'.json\'}}\n \n\n
\n \n \n
\n
',encapsulation:ja.None,styles:[nge()]}),Ct("design:paramtypes",[et])],F9);const pJ=(t,e,a,u,i,r)=>r.getOptions().i18n.instant("TASK_X",{x:a});let A9=class{constructor(e){this.translate=e,this.title="Example 12: Localization (i18n)",this.subTitle='Support multiple locales with the ngx-translate plugin, following these steps (Wiki docs)\n
    \n
  1. You first need to "enableTranslate" in the Grid Options
  2. \n
  3. In the Column Definitions, you have following options
  4. \n
      \n
    • To translate a header title, use "nameKey" with a translate key (nameKey: \'TITLE\')
    • \n
    • For the cell values, you need to use a Formatter, there\'s 2 ways of doing it
    • \n
        \n
      • formatter: myCustomTranslateFormatter <= "Title" column uses it
      • \n
      • formatter: Formatters.translate, i18n: this.translateService <= "Completed" column uses it
      • \n
      \n
    \n
  5. For date localization, you need to create your own custom formatter.
  6. \n
      \n
    • You can easily implement logic to switch between Formatters "dateIso" or "dateUs", depending on current locale.
    • \n
    \n
  7. For the Select (dropdown) filter, you can fill in the "labelKey" property, if found it will use it, else it will use "label"
  8. \n
      \n
    • What if your select options have totally different value/label pair? In this case, you can use the customStructure: { label: \'customLabel\', value: \'customValue\'} to change the property name(s) to use.\'
    • \n
    • What if you want to use "customStructure" and translation? Simply pass this flag enableTranslateLabel: true
    • \n
    • More info on the Select Filter Wiki page\n
    \n
  9. For more info about "Download to File", read the Wiki page
  10. \n
\n ',this.subscriptions=[],this.duplicateTitleHeaderCount=1,this.excelExportService=new Bo,this.textExportService=new $T;this.translate.use("en"),this.selectedLanguage="en"}ngOnDestroy(){rd(this.subscriptions)}ngOnInit(){this.columnDefinitions=[{id:"title",name:"Title",field:"id",nameKey:"TITLE",minWidth:100,formatter:pJ,sortable:!0,filterable:!0,params:{useFormatterOuputToFilter:!0}},{id:"description",name:"Description",field:"description",filterable:!0,sortable:!0,minWidth:80},{id:"duration",name:"Duration (days)",field:"duration",nameKey:"DURATION",sortable:!0,formatter:j.percentCompleteBar,minWidth:100,exportWithFormatter:!1,filterable:!0,type:w.number,filter:{model:ie.slider,filterOptions:{hideSliderNumber:!0}}},{id:"start",name:"Start",field:"start",nameKey:"START",minWidth:100,formatter:j.dateIso,outputType:w.dateIso,type:w.date,exportWithFormatter:!0,filterable:!0,filter:{model:ie.compoundDate}},{id:"finish",name:"Finish",field:"finish",nameKey:"FINISH",formatter:j.dateIso,outputType:w.dateIso,type:w.date,minWidth:100,filterable:!0,filter:{model:ie.compoundDate}},{id:"completedBool",name:"Completed",field:"completedBool",nameKey:"COMPLETED",minWidth:100,sortable:!0,formatter:j.checkmarkMaterial,exportCustomFormatter:j.translateBoolean,filterable:!0,filter:{collection:[{value:"",label:""},{value:!0,labelKey:"TRUE"},{value:!1,labelKey:"FALSE"}],model:ie.singleSelect,enableTranslateLabel:!0}},{id:"completed",name:"Completed",field:"completed",nameKey:"COMPLETED",formatter:j.translate,sortable:!0,minWidth:100,exportWithFormatter:!0,filterable:!0,filter:{collection:[{value:"",label:""},{value:"TRUE",labelKey:"TRUE"},{value:"FALSE",labelKey:"FALSE"}],collectionSortBy:{property:"labelKey"},enableTranslateLabel:!0,model:ie.singleSelect}}],this.gridOptions={autoResize:{container:"#demo-container",rightPadding:10},enableAutoResize:!0,enableExcelCopyBuffer:!0,enableFiltering:!0,enableTranslate:!0,i18n:this.translate,checkboxSelector:{hideInFilterHeaderRow:!1,hideInColumnTitleRow:!0},enableCheckboxSelector:!0,enableRowSelection:!0,showCustomFooter:!0,customFooterOptions:{metricTexts:{itemsKey:"ITEMS",ofKey:"OF",lastUpdateKey:"LAST_UPDATE"},dateFormat:"YYYY-MM-DD, hh:mm a",hideTotalItemCount:!1,hideLastUpdateTimestamp:!1},excelExportOptions:{customExcelHeader:(e,a)=>{const u="fr"===this.translate.currentLang?"Titre qui est suffisament long pour \xeatre coup\xe9":"My header that is long enough to wrap",o=e.getStyleSheet().createFormat({font:{size:12,fontName:"Calibri",bold:!0,color:"FF0000FF"},alignment:{wrapText:!0}});a.setRowInstructions(0,{height:30}),a.mergeCells("B1","D1");const d=[];d.push({value:""}),d.push({value:u,metadata:{style:o.id}}),a.data.push(d)}},gridMenu:{hideExportCsvCommand:!1,hideExportTextDelimitedCommand:!1},enableExcelExport:!0,enableTextExport:!0,textExportOptions:{exportWithFormatter:!0,sanitizeDataExport:!0},externalResources:[this.excelExportService,this.textExportService]},this.loadData(1500)}loadData(e){const a=[];for(let u=0;u{this.selectedLanguage=e}))}static#e=this.ctorParameters=()=>[{type:et}]};A9=$e([ca({template:'
\n

\n {{title}}\n \n \n code\n \n \n

\n
\n\n
\n\n
\n
\n \n Locale: {{selectedLanguage + \'.json\'}}\n\n \n \n \n \n \n \n
\n
\n\n
\n \n \n
\n
'}),Ct("design:paramtypes",[et])],A9);var sge=O(997),dge=O.n(sge);let w9=class{constructor(e){this.translate=e,this.title="Example 9: Grid Menu Control",this.subTitle='\n This example demonstrates using the Slick.Controls.GridMenu plugin to easily add a Grid Menu (aka hamburger menu) on the top right corner of the grid.\n (Wiki docs)\n
\n
    \n
  • You can change the Grid Menu icon, for example "mdi-dots-vertical"    (which is shown in this example)
  • \n
  • By default the Grid Menu shows all columns which you can show/hide them
  • \n
  • You can configure multiple custom "commands" to show up in the Grid Menu and use the "onGridMenuCommand()" callback
  • \n
  • Doing a "right + click" over any column header will also provide a way to show/hide a column (via the Column Picker Plugin)
  • \n
  • You can change the icons of both picker via SASS variables as shown in this demo (check all SASS variables)
  • \n
  • You can also show the Grid Menu anywhere on your page
  • \n
\n ',this.subscriptions=[];this.translate.use("en"),this.selectedLanguage="en"}ngOnDestroy(){rd(this.subscriptions)}ngOnInit(){this.columnDefinitions=[{id:"title",name:"Title",field:"title",nameKey:"TITLE",filterable:!0,type:w.string},{id:"duration",name:"Duration",field:"duration",nameKey:"DURATION",sortable:!0,filterable:!0,type:w.string},{id:"percentComplete",name:"% Complete",field:"percentComplete",nameKey:"PERCENT_COMPLETE",sortable:!0,filterable:!0,type:w.number,formatter:j.percentCompleteBar,filter:{model:ie.compoundSlider,filterOptions:{hideSliderNumber:!1}}},{id:"start",name:"Start",field:"start",nameKey:"START",filterable:!0,type:w.string},{id:"finish",name:"Finish",field:"finish",nameKey:"FINISH",filterable:!0,type:w.string},{id:"effort-driven",name:"Completed",field:"effortDriven",nameKey:"COMPLETED",maxWidth:80,formatter:j.checkmarkMaterial,type:w.boolean,minWidth:100,sortable:!0,filterable:!0,filter:{collection:[{value:"",label:""},{value:!0,label:"true"},{value:!1,label:"false"}],model:ie.singleSelect}}],this.gridOptions={columnPicker:{hideForceFitButton:!0,hideSyncResizeButton:!0,onColumnsChanged:(e,a)=>{console.log("Column selection changed from Column Picker, visible columns: ",a.visibleColumns)}},enableAutoResize:!0,enableGridMenu:!0,autoResize:{container:"#demo-container",rightPadding:10},enableFiltering:!0,enableCellNavigation:!0,gridMenu:{menuUsabilityOverride:()=>!0,commandTitleKey:"CUSTOM_COMMANDS",iconCssClass:"mdi mdi-dots-vertical",hideForceFitButton:!0,hideSyncResizeButton:!0,hideToggleFilterCommand:!1,menuWidth:17,resizeOnShowHeaderRow:!0,subItemChevronClass:"mdi mdi-chevron-down mdi-rotate-270",commandItems:[{iconCssClass:"mdi mdi-help-circle",titleKey:"HELP",disabled:!1,command:"help",positionOrder:90,cssClass:"bold",textCssClass:"blue"},{divider:!0,command:"",positionOrder:89},{title:"Command 1",command:"command1",positionOrder:91,cssClass:"orange",iconCssClass:"mdi mdi-alert",action:(e,a)=>alert(a.command),itemUsabilityOverride:e=>!e||!Array.isArray(e.columns)||e.columns.length===e.visibleColumns.length},{title:"Command 2",command:"command2",positionOrder:92,cssClass:"red",textCssClass:"italic",action:(e,a)=>alert(a.command),itemVisibilityOverride:()=>!this.angularGrid||this.isObjectEmpty(this.angularGrid.filterService.getColumnFilters())},{title:"Disabled command",disabled:!0,command:"disabled-command",positionOrder:98},{command:"",divider:!0,positionOrder:98},{command:"export",title:"Exports",positionOrder:99,commandItems:[{command:"exports-txt",title:"Text (tab delimited)"},{command:"sub-menu",title:"Excel",cssClass:"green",subMenuTitle:"available formats",subMenuTitleCssClass:"text-italic orange",commandItems:[{command:"exports-csv",title:"Excel (csv)"},{command:"exports-xlsx",title:"Excel (xlsx)"}]}]},{command:"feedback",title:"Feedback",positionOrder:100,commandItems:[{command:"request-update",title:"Request update from supplier",iconCssClass:"mdi mdi-star",tooltip:"this will automatically send an alert to the shipping team to contact the user for an update"},"divider",{command:"sub-menu",title:"Contact Us",iconCssClass:"mdi mdi-account",subMenuTitle:"contact us...",subMenuTitleCssClass:"italic",commandItems:[{command:"contact-email",title:"Email us",iconCssClass:"mdi mdi-pencil-outline"},{command:"contact-chat",title:"Chat with us",iconCssClass:"mdi mdi-message-text-outline"},{command:"contact-meeting",title:"Book an appointment",iconCssClass:"mdi mdi-coffee"}]}]}],onCommand:(e,a)=>{const u=a.item?.command;u.includes("exports-")?alert("Exporting as "+a?.item.title):u.includes("contact-")||"help"===u?alert("Command: "+a.command):console.log("onGridMenuCommand",a.command)},onColumnsChanged:(e,a)=>{console.log("Column selection changed from Grid Menu, visible columns: ",a.visibleColumns)}},enableTranslate:!0,i18n:this.translate},this.getData()}angularGridReady(e){this.angularGrid=e}getData(){const e=[];for(let a=0;a<500;a++)e[a]={id:a,title:"Task "+a,phone:this.generatePhoneNumber(),duration:Math.round(25*Math.random())+" days",percentComplete:Math.round(100*Math.random()),start:"01/01/2009",finish:"01/05/2009",effortDriven:a%5==0};this.dataset=e}generatePhoneNumber(){let e="";for(let a=0;a<10;a++)e+=Math.round(9*Math.random())+"";return e}switchLanguage(){const e="en"===this.selectedLanguage?"fr":"en";this.subscriptions.push(this.translate.use(e).subscribe(()=>{this.selectedLanguage=e}))}toggleGridMenu(e){this.angularGrid&&this.angularGrid.extensionService&&this.angularGrid.extensionService.getExtensionInstanceByName(Ea.gridMenu).showGridMenu(e,{dropSide:"right"})}isObjectEmpty(e){for(const a in e)if(a in e&&""!==e[a])return!1;return!0}static#e=this.ctorParameters=()=>[{type:et}]};w9=$e([ca({template:'
\n

\n {{title}}\n \n \n code\n \n \n

\n
\n\n \n \n\n Locale:\n {{selectedLanguage + \'.json\'}}\n \n\n
\n \n \n
\n
',encapsulation:ja.None,styles:[dge()]}),Ct("design:paramtypes",[et])],w9);let B9=class{constructor(e,a){this.cd=e,this.http=a,this.title="Example 5: Grid connected to Backend Server with OData",this.subTitle='\n Sorting/Paging connected to a Backend OData Service (Docs).\n
\n
    \n
  • Only "Name" field is sortable for the demo (because we use JSON files), however "multiColumnSort: true" is also supported
  • \n
  • This example also demos the Grid State feature, open the console log to see the changes
  • \n
  • String column also support operator (>, >=, <, <=, <>, !=, =, ==, *)\n
      \n
    • The (*) can be used as startsWith (ex.: "abc*" => startsWith "abc") / endsWith (ex.: "*xyz" => endsWith "xyz")
    • \n
    • The other operators can be used on column type number for example: ">=100" (bigger or equal than 100)
    • \n
    \n
  • OData Service could be replaced by other Service type in the future (GraphQL or whichever you provide)
  • \n
  • You can also preload a grid with certain "presets" like Filters / Sorters / Pagination Docs - Grid Preset\n
  • NOTE: For demo purposes, the last column (filter & sort) will always throw an\n error and its only purpose is to demo what would happen when you encounter a backend server error\n (the UI should rollback to previous state before you did the action).\n Also changing Page Size to 50,000 will also throw which again is for demo purposes.\n
  • \n
\n ',this.dataset=[],this.isCountEnabled=!0,this.isSelectEnabled=!1,this.isExpandEnabled=!1,this.odataVersion=2,this.odataQuery="",this.processing=!0,this.errorStatus="",this.isPageErrorTest=!1,this.status={text:"processing...",class:"alert alert-danger"}}angularGridReady(e){this.angularGrid=e}ngOnInit(){this.columnDefinitions=[{id:"name",name:"Name",field:"name",sortable:!0,type:w.string,filterable:!0,filter:{model:ie.compoundInput,compoundOperatorList:[{operator:"",desc:"Contains"},{operator:"<>",desc:"Not Contains"},{operator:"=",desc:"Equals"},{operator:"!=",desc:"Not equal to"},{operator:"a*",desc:"Starts With"},{operator:"Custom",desc:"SQL Like"}]}},{id:"gender",name:"Gender",field:"gender",filterable:!0,sortable:!0,filter:{model:ie.singleSelect,collection:[{value:"",label:""},{value:"male",label:"male"},{value:"female",label:"female"}]}},{id:"company",name:"Company",field:"company",filterable:!0,sortable:!0},{id:"category_name",name:"Category",field:"category/name",filterable:!0,sortable:!0}],this.gridOptions={enableAutoResize:!0,autoResize:{container:"#demo-container",rightPadding:10},checkboxSelector:{hideInFilterHeaderRow:!1,hideInColumnTitleRow:!0},compoundOperatorAltTexts:{text:{Custom:{operatorAlt:"%%",descAlt:"SQL Like"}}},enableCellNavigation:!0,enableFiltering:!0,enableCheckboxSelector:!0,enableRowSelection:!0,enablePagination:!0,pagination:{pageSizes:[10,20,50,100,500,5e4],pageSize:20,totalItems:0},presets:{filters:[{columnId:"gender",searchTerms:["male"],operator:te.equal}],sorters:[{columnId:"name",direction:"asc"}],pagination:{pageNumber:2,pageSize:20}},backendServiceApi:{service:new mJ,options:{enableCount:this.isCountEnabled,enableSelect:this.isSelectEnabled,enableExpand:this.isExpandEnabled,filterQueryOverride:({fieldName:e,columnDef:a,columnFilterOperator:u,searchValues:i})=>{if(u===te.custom&&"name"===a?.id){let r=i[0].replace(/\*/g,".*");return r=r.slice(0,1)+"%5E"+r.slice(1),r=r.slice(0,-1)+"$'",`matchesPattern(${e}, ${r})`}},version:this.odataVersion},onError:e=>{this.errorStatus=e.message,this.displaySpinner(!1,!0)},preProcess:()=>{this.errorStatus="",this.displaySpinner(!0)},process:e=>this.getCustomerApiCall(e),postProcess:e=>{this.metrics=e.metrics,this.displaySpinner(!1),this.getCustomerCallback(e),this.cd.detectChanges()}}}}displaySpinner(e,a){this.processing=e,this.status=a?{text:"ERROR!!!",class:"alert alert-danger"}:e?{text:"loading",class:"alert alert-warning"}:{text:"finished",class:"alert alert-success"},this.cd.detectChanges()}getCustomerCallback(e){let a=e.totalRecordCount;this.isCountEnabled&&(a=4===this.odataVersion?e["@odata.count"]:e.d.__count),this.metrics&&(this.metrics.totalItemCount=a),this.paginationOptions={...this.gridOptions.pagination,totalItems:a},this.dataset=4===this.odataVersion?e.value:e.d.results,this.odataQuery=e.query}getCustomerApiCall(e){return this.getCustomerDataApiMock(e)}goToFirstPage(){this.angularGrid.paginationService.goToFirstPage()}goToLastPage(){this.angularGrid.paginationService.goToLastPage()}setFiltersDynamically(){this.angularGrid.filterService.updateFilters([{columnId:"name",searchTerms:["A"],operator:"a*"}])}setSortingDynamically(){this.angularGrid.sortService.updateSorting([{columnId:"name",direction:"DESC"}])}getCustomerDataApiMock(e){return new Promise(a=>{const u=e.toLowerCase().split("&");let i,r=0,o="",d=100;const h={};if(this.isPageErrorTest)throw this.isPageErrorTest=!1,new Error("Server timed out trying to retrieve data for the last page");for(const m of u){if(m.includes("$top=")&&(i=+m.substring(5),5e4===i))throw new Error("Server timed out retrieving 50,000 rows");if(m.includes("$skip=")&&(r=+m.substring(6)),m.includes("$orderby=")&&(o=m.substring(9)),m.includes("$filter=")){const g=m.substring(8).replace("%20"," ");if(g.includes("matchespattern")){const v=new RegExp("matchespattern\\(([a-zA-Z]+),\\s'%5E(.*?)'\\)","i"),k=g.match(v)||[],x=k[1].trim();h[x]={type:"matchespattern",term:"^"+k[2].trim()}}if(g.includes("contains")){const v=g.match(/contains\(([a-zA-Z/]+),\s?'(.*?)'/),k=v[1].trim();h[k]={type:"substring",term:v[2].trim()}}if(g.includes("substringof")){const v=g.match(/substringof\('(.*?)',\s([a-zA-Z/]+)/),k=v[2].trim();h[k]={type:"substring",term:v[1].trim()}}for(const v of["eq","ne","le","lt","gt","ge"])if(g.includes(v)){const x=new RegExp(`([a-zA-Z ]*) ${v} '(.*?)'`).exec(g);if(Array.isArray(x)){const D=x[1].trim();h[D]={type:v,term:x[2].trim()}}}if(g.includes("startswith")&&g.includes("endswith")){const v=g.match(/startswith\(([a-zA-Z ]*),\s?'(.*?)'/)||[],k=g.match(/endswith\(([a-zA-Z ]*),\s?'(.*?)'/)||[],x=v[1].trim();h[x]={type:"starts+ends",term:[v[2].trim(),k[2].trim()]}}else if(g.includes("startswith")){const v=g.match(/startswith\(([a-zA-Z ]*),\s?'(.*?)'/),k=v[1].trim();h[k]={type:"starts",term:v[2].trim()}}else if(g.includes("endswith")){const v=g.match(/endswith\(([a-zA-Z ]*),\s?'(.*?)'/),k=v[1].trim();h[k]={type:"ends",term:v[2].trim()}}if(g.includes("company"))throw new Error('Server could not filter using the field "Company"')}}if(o.includes("company"))throw new Error('Server could not sort using the field "Company"');this.http.get("assets/data/customers_100.json").subscribe(m=>{let g=m;if(o?.length>0){const D=o.split(",");for(const C of D){const F=C.split(" "),A=F[0];let z=L=>L;for(const L of A.split("/")){const I=z;z=W=>I(W)[L]}switch((F[1]??"asc").toLocaleLowerCase()){case"asc":g=g.sort((L,I)=>z(L).localeCompare(z(I)));break;case"desc":g=g.sort((L,I)=>z(I).localeCompare(z(L)))}}}let v=r,k=g;if(h){for(const D in h)D in h&&(k=k.filter(C=>{const F=h[D].type,A=h[D].term;let z=D;if(-1!==D?.indexOf(" ")){const I=D.split(" ");z=I[I.length-1]}let M,L=C;for(const I of z.split("/"))M=L[I],L=M;if(M){const[I,W]=Array.isArray(A)?A:[A];switch(F){case"eq":return M.toLowerCase()===I;case"ne":return M.toLowerCase()!==I;case"le":return M.toLowerCase()<=I;case"lt":return M.toLowerCase()I;case"ge":return M.toLowerCase()>=I;case"ends":return M.toLowerCase().endsWith(I);case"starts":return M.toLowerCase().startsWith(I);case"starts+ends":return M.toLowerCase().startsWith(I)&&M.toLowerCase().endsWith(W);case"substring":return M.toLowerCase().includes(I);case"matchespattern":return new RegExp(I.replaceAll("%25",".*"),"i").test(M)}}}));d=k.length}v>k.length&&(e=e.replace(`$skip=${v}`,""),v=0);const x=k.slice(v,v+i);setTimeout(()=>{const D={query:e};this.isCountEnabled||(D.totalRecordCount=d),4===this.odataVersion?(D.value=x,this.isCountEnabled&&(D["@odata.count"]=d)):(D.d={results:x},this.isCountEnabled&&(D.d.__count=d)),a(D)},100)})})}gridStateChanged(e){console.log("Client sample, Grid State changed:: ",e.change)}throwPageChangeError(){this.isPageErrorTest=!0,this.angularGrid?.paginationService?.goToLastPage()}handleOnBeforeSort(e){return!0}handleOnBeforeSearchChange(e){return!0}handleOnBeforePaginationChange(e){return!0}changeCountEnableFlag(){return this.isCountEnabled=!this.isCountEnabled,this.resetOptions({enableCount:this.isCountEnabled}),!0}changeEnableSelectFlag(){return this.isSelectEnabled=!this.isSelectEnabled,this.resetOptions({enableSelect:this.isSelectEnabled}),!0}changeEnableExpandFlag(){return this.isExpandEnabled=!this.isExpandEnabled,this.resetOptions({enableExpand:this.isExpandEnabled}),!0}setOdataVersion(e){return this.odataVersion=e,this.resetOptions({version:this.odataVersion}),!0}resetOptions(e){this.displaySpinner(!0);const a=this.gridOptions.backendServiceApi.service;a.updateOptions(e),a.clearFilters(),this.angularGrid?.filterService.clearFilters()}static#e=this.ctorParameters=()=>[{type:ei},{type:jt}]};B9=$e([ca({template:'
\n

\n {{title}}\n \n \n code\n \n \n

\n
\n
\n
\n
\n
\n
\n Backend Error: \n
\n
\n
\n\n
\n
\n
\n Status: {{status.text}}\n \n \n \n
\n
\n
\n
\n OData Query: {{odataQuery}}\n
\n
\n
\n\n
\n
\n \n \n
\n \n Metrics: {{metrics.endTime | date: \'yyyy-MM-dd hh:mm aaaaa\\\'m\\\'\'}} | {{metrics.executionTime}}ms\n | {{metrics.totalItemCount}} items\n \n
\n\n
\n \n \n \n \n \n \n \n \n
\n
\n
\n
\n \n\n \n \n
\n \n \n
\n
\n
\n
\n\n \n \n
'}),Ct("design:paramtypes",[ei,jt])],B9);function Df(t,e){return Math.floor(Math.random()*(e-t+1)+t)}const Ege=(t,e,a,u,i,r)=>r.getOptions().i18n.instant("TASK_X",{x:a});let S9=class{constructor(e){this.translate=e,this.title="Example 25: Filtering from Range of Search Values",this.subTitle='\n This demo shows how to use Filters with Range of Search Values (Wiki docs)\n
\n
    \n
  • All input filters support the following operators: (>, >=, <, <=, <>, !=, =, ==, *) and now also the (..) for an input range
  • \n
  • All filters (which support ranges) can be defined via the 2 dots (..) which represents a range, this also works for dates and slider in the "presets"
  • \n
      \n
    • For a numeric range defined in an input filter (must be of type text), you can use 2 dots (..) to represent a range
    • \n
    • example: typing "10..90" will filter values between 10 and 90 (but excluding the number 10 and 90)
    • \n
    \n
      \n
    • note that the examples shown below for the operator, are case sensitive
    • \n
    • by default the range is inclusive which would be the same as defining the filter options to "operator: \'RangeInclusive\'" or "operator: OperatoryType.rangeInclusive"
    • \n
    • you can also set the inverse (exclusive) by defining the filter options to "operator: \'RangeExclusive\'" or "operator: OperatoryType.rangeExclusive"
    • \n
    \n
  • Date Range with Vanilla Calendar Date Picker, they will also use the locale, choose a start date then drag or click on the end date
  • \n
\n ',this.subscriptions=[],this.filterList=[{value:"",label:""},{value:"currentYearTasks",label:"Current Year Completed Tasks"},{value:"nextYearTasks",label:"Next Year Active Tasks"}];this.translate.use("en"),this.selectedLanguage="en"}ngOnDestroy(){rd(this.subscriptions)}ngOnInit(){this.columnDefinitions=[{id:"title",name:"Title",field:"id",nameKey:"TITLE",minWidth:100,formatter:Ege,sortable:!0,filterable:!0,params:{useFormatterOuputToFilter:!0}},{id:"description",name:"Description",field:"description",filterable:!0,sortable:!0,minWidth:80,type:w.string,filter:{model:WT,enableTrimWhiteSpace:!0}},{id:"percentComplete",name:"% Complete",field:"percentComplete",nameKey:"PERCENT_COMPLETE",minWidth:120,sortable:!0,customTooltip:{position:"center"},formatter:j.progressBar,type:w.number,filterable:!0,filter:{model:ie.sliderRange,maxValue:100,operator:te.rangeInclusive,filterOptions:{hideSliderNumbers:!1,min:0,step:5}}},{id:"start",name:"Start",field:"start",nameKey:"START",formatter:j.dateIso,sortable:!0,minWidth:75,width:100,exportWithFormatter:!0,type:w.date,filterable:!0,filter:{model:ie.compoundDate}},{id:"finish",name:"Finish",field:"finish",nameKey:"FINISH",formatter:j.dateIso,sortable:!0,minWidth:75,width:120,exportWithFormatter:!0,type:w.date,filterable:!0,filter:{model:ie.dateRange}},{id:"duration",field:"duration",nameKey:"DURATION",maxWidth:90,type:w.number,sortable:!0,filterable:!0,filter:{model:ie.input,operator:te.rangeExclusive}},{id:"completed",name:"Completed",field:"completed",nameKey:"COMPLETED",minWidth:85,maxWidth:90,formatter:j.checkmarkMaterial,exportWithFormatter:!0,filterable:!0,filter:{collection:[{value:"",label:""},{value:!0,label:"True"},{value:!1,label:"False"}],model:ie.singleSelect,filterOptions:{autoAdjustDropHeight:!0}}}];const e=new Date,a=Ii(O2(new Date,-2),"YYYY-MM-DD"),u=Ii(O2(new Date,e.getDate()<14?28:25),"YYYY-MM-DD");this.gridOptions={autoResize:{container:"#demo-container",rightPadding:10},enableExcelCopyBuffer:!0,enableFiltering:!0,enableTranslate:!0,i18n:this.translate,presets:{filters:[{columnId:"duration",searchTerms:["4..88"]},{columnId:"percentComplete",operator:"RangeInclusive",searchTerms:[5,80]},{columnId:"finish",operator:"RangeInclusive",searchTerms:[a,u]}],sorters:[{columnId:"percentComplete",direction:"DESC"},{columnId:"duration",direction:"ASC"}]},externalResources:[new T7,new Bo]},this.dataset=this.mockData(1500)}angularGridReady(e){this.angularGrid=e}mockData(e,a=0){const u=[];for(let i=a;i=0&&setTimeout(()=>{this.metrics={startTime:new Date,itemCount:a&&a.current||0,totalItemCount:this.dataset.length||0}})}setFiltersDynamically(){const e=Ii(O2(new Date,-5),"YYYY-MM-DD"),a=Ii(O2(new Date,25),"YYYY-MM-DD");this.angularGrid.filterService.updateFilters([{columnId:"duration",searchTerms:["14..78"],operator:"RangeInclusive"},{columnId:"percentComplete",operator:"RangeExclusive",searchTerms:[15,85]},{columnId:"finish",operator:"RangeInclusive",searchTerms:[e,a]}])}setSortingDynamically(){this.angularGrid.sortService.updateSorting([{columnId:"finish",direction:"DESC"},{columnId:"percentComplete",direction:"ASC"}])}usePredefinedFilter(e){let a=[];const u=(new Date).getFullYear();switch(e){case"currentYearTasks":a=[{columnId:"finish",operator:te.rangeInclusive,searchTerms:[`${u}-01-01`,`${u}-12-31`]},{columnId:"completed",operator:te.equal,searchTerms:[!0]}];break;case"nextYearTasks":a=[{columnId:"start",operator:">=",searchTerms:[`${u+1}-01-01`]}]}this.angularGrid.filterService.updateFilters(a)}switchLanguage(){const e="en"===this.selectedLanguage?"fr":"en";this.subscriptions.push(this.translate.use(e).subscribe(()=>{this.selectedLanguage=e}))}static#e=this.ctorParameters=()=>[{type:et}]};S9=$e([ca({template:'
\n

\n {{title}}\n \n \n code\n \n \n

\n
\n\n
\n\n \n Metrics: {{metrics.startTime | date: \'yyyy-MM-dd hh:mm aaaaa\\\'m\\\'\'}} | {{metrics.itemCount}} of\n {{metrics.totalItemCount}} items\n \n\n
\n
\n \n
\n
\n \n
\n
\n \n
\n
\n \n
\n
\n \n
\n
\n \n
\n
\n\n
\n
\n \n Locale: {{selectedLanguage + \'.json\'}}\n
\n
\n\n \n \n
'}),Ct("design:paramtypes",[et])],S9);const bge=(t,e,a,u,i)=>i&&i.brand&&i.brand.name||"",kge=(t,e,a,u,i)=>{let r="";return i&&i.octopart_url&&i.mpn&&(r=`${i.mpn}`),r};let z9=class{constructor(){this._eventHandler=new Ut,this.title="Example 18: Octopart Catalog Search - Remote Model Plugin",this.subTitle='\n This example demonstrates how to use "slick.remotemodel.js" or any Remote implementation through an external Remote Service\n
    \n
  • \n Your browser (Chrome) might block access to the Octopart query, if you get "block content" then just unblock it\n or try with different browser like Firefox or Edge\n
  • \n
  • If the demo throws some errors, try again later (there\'s a limit per day).
  • \n
  • \n Uses slick.remotemodel.js\n which is hooked up to load search results from Octopart, but can easily be extended\n to support any JSONP-compatible backend that accepts paging parameters.\n
  • \n
  • \n This demo implements a custom DataView, however please note that you are on your own to implement all necessary DataView methods\n for Sorting, Filtering, etc...\n
  • \n
  • \n Soure code for this example is available here\n
  • \n
\n ',this.dataset=[],this.loading=!1,this.search=""}angularGridReady(e){this.angularGrid=e,this.gridObj=e.slickGrid,this.loaderDataView?.setSort("score",-1),this.gridObj?.setSortColumn("score",!1),this.gridObj.onViewportChanged.notify()}ngOnDestroy(){this._eventHandler.unsubscribeAll()}ngOnInit(){this.defineGrid(),this.hookAllLoaderEvents()}defineGrid(){this.columnDefinitions=[{id:"mpn",name:"MPN",field:"mpn",formatter:kge,width:100,sortable:!0},{id:"brand",name:"Brand",field:"brand.name",formatter:bge,width:100,sortable:!0},{id:"short_description",name:"Description",field:"short_description",width:520}],this.gridOptions={enableAutoResize:!0,autoResize:{container:"#demo-container",rightPadding:10},enableCellNavigation:!0,enableColumnReorder:!1,enableGridMenu:!1,multiColumnSort:!1}}hookAllLoaderEvents(){this._eventHandler&&this._eventHandler.subscribe&&this.loaderDataView&&this.loaderDataView.onDataLoading&&this.loaderDataView.onDataLoaded&&(this._eventHandler.subscribe(this.loaderDataView.onDataLoading,(e,a)=>{this.loading=!0}),this._eventHandler.subscribe(this.loaderDataView.onDataLoaded,(e,a)=>{if(a&&this.gridObj&&this.gridObj.invalidateRow&&this.gridObj.updateRowCount&&this.gridObj.render){for(let u=a.from;u<=a.to;u++)this.gridObj.invalidateRow(u);this.gridObj.updateRowCount(),this.gridObj.render(),this.loading=!1}}))}onSort(e,a){if(this.gridObj&&this.gridObj.getViewport&&this.loaderDataView&&this.loaderDataView.ensureData&&this.loaderDataView.setSort){const u=this.gridObj.getViewport();a&&a.sortCol&&a.sortCol.field&&this.loaderDataView.setSort(a.sortCol.field,a.sortAsc?1:-1),this.loaderDataView.ensureData(u.top,u.bottom)}}onViewportChanged(){if(this.gridObj&&this.gridObj.getViewport&&this.loaderDataView&&this.loaderDataView.ensureData){const e=this.gridObj.getViewport();this.loaderDataView.ensureData(e.top,e.bottom)}}searchChanged(e){if(e&&this.gridObj&&this.gridObj.getViewport&&this.loaderDataView&&this.loaderDataView.ensureData&&this.loaderDataView.setSearch){const a=this.gridObj.getViewport();this.loaderDataView.setSearch(e),this.loaderDataView.ensureData(a.top,a.bottom)}}static#e=this.ctorParameters=()=>[]};z9=$e([ca({template:'
\n

\n {{title}}\n \n \n code\n \n \n

\n
\n\n
\n \n \n
\n\n \n\n \n\n \n \n
'}),Ct("design:paramtypes",[])],z9);var fge=O(44),Dge=O.n(fge);const _ge=(t,e,a,u,i,r)=>(a=a??"",(r&&r.getOptions&&r.getOptions()).editable&&u.editor?{text:a,addClasses:"editable-field",toolTip:"Click to Edit"}:a),Fge=t=>null!=t&&t.length?/^(task\s\d+)*$/i.test(t)?{valid:!0,msg:""}:{valid:!1,msg:'Your title is invalid, it must start with "Task" followed by a number.'}:{valid:!1,msg:"This is a required field."};let M9=class{constructor(e){this.http=e,this.title="Example 31: Columns Resize by Content",this.subTitle='The grid below uses the optional resize by cell content (with a fixed 950px for demo purposes), you can click on the 2 buttons to see the difference. The "autosizeColumns" is really the default option used by Angular-SlickGrid, the resize by cell content is optional because it requires to read the first thousand rows and do extra width calculation.',this.columnDefinitions=[],this.dataset=[],this.editQueue=[],this.editedItems={},this.isUsingDefaultResize=!1,this.isGridEditable=!0,this.isMassSelectionDisabled=!0,this.complexityLevelList=[{value:0,label:"Very Simple"},{value:1,label:"Simple"},{value:2,label:"Straightforward"},{value:3,label:"Complex"},{value:4,label:"Very Complex"}]}angularGridReady(e){this.angularGrid=e}ngOnInit(){this.defineGrid(),this.dataset=this.loadData(400)}defineGrid(){this.columnDefinitions=[{id:"title",name:"Title",field:"title",sortable:!0,type:w.string,minWidth:65,resizeExtraWidthPadding:4,resizeCharWidthInPx:7.6,resizeCalcWidthRatio:1,resizeMaxWidthThreshold:200,columnGroup:"Common Factor",cssClass:"text-uppercase fw-bold",filterable:!0,filter:{model:ie.inputText,filterPredicate:(e,a)=>{const u=a.parsedSearchTerms||[];if(u?.length){const i=a.columnId,r=u[0],o=e[i].toLowerCase(),d=r.matchAll(/^%([^%\r\n]+)[^%\r\n]*$|(.*)%(.+)%(.*)|(.+)%(.+)|([^%\r\n]+)%$/gi),h=Array.from(d),m=h.length?h[0]:[],[g,v,k,x,D,C,F,A]=m;return v?o.endsWith(v.toLowerCase()):k&&x?o.startsWith(k.toLowerCase())&&o.includes(x.toLowerCase()):x&&D?o.includes(x)&&o.endsWith(D.toLowerCase()):x&&!D?o.includes(x.toLowerCase()):C&&F?o.startsWith(C.toLowerCase())&&o.endsWith(F.toLowerCase()):A?o.startsWith(A.toLowerCase()):o.includes(r.toLowerCase())}return!0}},editor:{model:Ye.longText,required:!0,alwaysSaveOnEnterKey:!0,maxLength:12,editorOptions:{cols:45,rows:6,buttonTexts:{cancel:"Close",save:"Done"}},validator:Fge}},{id:"duration",name:"Duration",field:"duration",sortable:!0,filterable:!0,minWidth:65,type:w.number,columnGroup:"Common Factor",formatter:(e,a,u)=>null==u||""===u?"":u>1?`${u} days`:`${u} day`,editor:{model:Ye.float,decimal:2,valueStep:1,minValue:0,maxValue:1e4,alwaysSaveOnEnterKey:!0,required:!0}},{id:"cost",name:"Cost",field:"cost",minWidth:65,sortable:!0,filterable:!0,type:w.number,columnGroup:"Analysis",filter:{model:ie.compoundInputNumber},formatter:j.dollar},{id:"percentComplete",name:"% Complete",field:"percentComplete",minWidth:100,type:w.number,sortable:!0,filterable:!0,columnGroup:"Analysis",filter:{model:ie.compoundSlider,operator:">="},editor:{model:Ye.slider,minValue:0,maxValue:100}},{id:"complexity",name:"Complexity",field:"complexity",resizeCalcWidthRatio:.82,sortable:!0,filterable:!0,columnGroup:"Analysis",formatter:(e,a,u)=>this.complexityLevelList[u]?.label,exportCustomFormatter:(e,a,u)=>this.complexityLevelList[u]?.label,filter:{model:ie.multipleSelect,collection:this.complexityLevelList},editor:{model:Ye.singleSelect,collection:this.complexityLevelList}},{id:"start",name:"Start",field:"start",sortable:!0,formatter:j.dateUs,columnGroup:"Period",exportCustomFormatter:j.dateUs,type:w.date,outputType:w.dateUs,saveOutputType:w.dateUtc,filterable:!0,filter:{model:ie.compoundDate},editor:{model:Ye.date,params:{hideClearButton:!1}}},{id:"completed",name:"Completed",field:"completed",width:80,minWidth:75,maxWidth:100,cssClass:"text-center",columnGroup:"Period",formatter:j.checkmarkMaterial,exportWithFormatter:!1,filterable:!0,sortable:!0,filter:{collection:[{value:"",label:""},{value:!0,label:"True"},{value:!1,label:"False"}],model:ie.singleSelect},editor:{model:Ye.checkbox}},{id:"finish",name:"Finish",field:"finish",sortable:!0,formatter:j.dateUs,columnGroup:"Period",type:w.date,outputType:w.dateUs,saveOutputType:w.dateUtc,filterable:!0,filter:{model:ie.compoundDate},exportCustomFormatter:j.dateUs,editor:{model:Ye.date,editorOptions:{range:{min:"today"}},validator:(e,a)=>{const u=a&&a.item;return u&&u.completed&&!e?{valid:!1,msg:'You must provide a "Finish" date when "Completed" is checked.'}:{valid:!0,msg:""}}}},{id:"product",name:"Product",field:"product",filterable:!0,columnGroup:"Item",minWidth:100,resizeCharWidthInPx:8,exportWithFormatter:!0,dataKey:"id",labelKey:"itemName",formatter:j.complexObject,exportCustomFormatter:j.complex,type:w.object,sortComparer:ul.objectString,editor:{model:Ye.autocompleter,alwaysSaveOnEnterKey:!0,editorOptions:{minLength:1,fetch:(e,a)=>{a(this.mockProducts().filter(i=>i.itemName.toLowerCase().includes(e.toLowerCase())))},renderItem:{layout:"fourCorners",templateCallback:e=>this.renderItemCallbackWith4Corners(e)}}},filter:{model:ie.inputText,type:w.string,queryField:"product.itemName"}},{id:"origin",name:"Country of Origin",field:"origin",formatter:j.complexObject,columnGroup:"Item",exportCustomFormatter:j.complex,dataKey:"code",labelKey:"name",type:w.object,sortComparer:ul.objectString,filterable:!0,sortable:!0,minWidth:100,editor:{model:Ye.autocompleter,customStructure:{label:"name",value:"code"},collectionAsync:this.http.get("assets/data/countries.json")},filter:{model:ie.inputText,type:w.string,queryField:"origin.name"}},{id:"action",name:"Action",field:"action",width:70,minWidth:70,maxWidth:70,excludeFromExport:!0,formatter:()=>'
',cellMenu:{hideCloseButton:!1,commandTitle:"Commands",commandItems:[{command:"help",title:"Help!",iconCssClass:"mdi mdi-help-circle",positionOrder:66,action:()=>alert("Please Help!")},"divider",{command:"delete-row",title:"Delete Row",positionOrder:64,iconCssClass:"mdi mdi-close color-danger",cssClass:"red",textCssClass:"text-italic color-danger-light",itemVisibilityOverride:e=>!e.dataContext?.completed,action:(e,a)=>{const u=a.dataContext;confirm(`Do you really want to delete row (${(a?.row??0)+1}) with "${u.title}"`)&&this.angularGrid.gridService.deleteItemById(u.id)}}]}}],this.gridOptions={editable:!0,autoAddCustomEditorFormatter:_ge,enableCellNavigation:!0,autoEdit:!0,autoCommitEdit:!0,autoResize:{container:"#smaller-container",rightPadding:10},enableAutoResize:!0,enablePagination:!0,pagination:{pageSize:10,pageSizes:[10,200,500,5e3]},autoFitColumnsOnFirstLoad:!1,enableAutoSizeColumns:!1,autosizeColumnsByCellContentOnFirstLoad:!0,enableAutoResizeColumnsByCellContent:!0,resizeByContentOptions:{defaultRatioForStringType:.92,formatterPaddingWidthInPx:8},enableExcelExport:!0,excelExportOptions:{exportWithFormatter:!1},externalResources:[new Bo],enableFiltering:!0,enableRowSelection:!0,enableCheckboxSelector:!0,checkboxSelector:{hideInFilterHeaderRow:!1,hideInColumnTitleRow:!0},rowSelectionOptions:{selectActiveRow:!1},createPreHeaderPanel:!0,showPreHeaderPanel:!0,preHeaderPanelHeight:28,rowHeight:33,headerRowHeight:35,editCommandHandler:(e,a,u)=>{const i=Array.isArray(u.prevSerializedValue)?u.prevSerializedValue:[u.prevSerializedValue],r=Array.isArray(u.serializedValue)?u.serializedValue:[u.serializedValue],o=this.columnDefinitions.filter(h=>void 0!==h.editor),d=[];i.forEach((h,m)=>{if(i[m]!==r[m]){const k=Array.isArray(u.prevSerializedValue)?o[m]:a;this.editedItems[this.gridOptions.datasetIdPropertyName||"id"]=e,this.angularGrid.slickGrid.invalidate(),u.execute(),this.renderUnsavedCellStyling(e,k,u),d.push(k)}}),this.editQueue.push({item:e,columns:d,editCommand:u})},enableCellMenu:!0}}loadData(e){const a=[];for(let u=0;u100?u>5?100:88:v,x=100===k;a[u]={id:u,title:"Task "+u,duration:Math.floor(100*Math.random())+10,percentComplete:k,analysis:{percentComplete:k},complexity:u%3?0:2,start:new Date(r,d,h,h,m,m,m),finish:x||u%3==0&&g>new Date&&u>3?x?new Date:g:"",cost:u%33==0?null:Math.round(1e4*Math.random())/100,completed:x||u%3==0&&g>new Date&&u>3,product:{id:this.mockProducts()[i]?.id,itemName:this.mockProducts()[i]?.itemName},origin:u%2?{code:"CA",name:"Canada"}:{code:"US",name:"United States"}},u%8||(delete a[u].finish,delete a[u].percentComplete)}return a}handleValidationError(e,a){return a.validationResults&&alert(a.validationResults.msg),!1}handleItemDeleted(e,a){console.log("item deleted with id:",a.itemId)}handleOnBeforeEditCell(e,a){const{column:u,item:i,grid:r}=a;return u&&i&&!function yge(t,e,a){const u=a&&a.getOptions&&a.getOptions(),i=e.editor;let o=!(!u.editable||!i);t&&e&&u&&u.editable&&"finish"===e.id&&(o=!!t?.completed);return o}(i,u,r)&&e.preventDefault(),!1}handleOnCellChange(e,a){const u=a?.item;u&&!u.completed&&(u.finish=null,this.angularGrid.gridService.updateItem(u))}handlePaginationChanged(){this.removeAllUnsavedStylingFromCell(),this.renderUnsavedStylingOnAllVisibleCells()}handleDefaultResizeColumns(){const e=this.angularGrid.slickGrid.getColumns();e.forEach(a=>a.width=a.originalWidth),this.angularGrid.slickGrid.setColumns(e),this.angularGrid.slickGrid.autosizeColumns(),this.isUsingDefaultResize=!0}handleNewResizeColumns(){this.angularGrid.resizerService.resizeColumnsByCellContent(!0),this.isUsingDefaultResize=!1}handleOnSelectedRowIdsChanged(e){console.log("Selected Ids:",e.selectedRowIds)}toggleGridEditReadonly(){this.undoAllEdits(),this.isGridEditable=!this.isGridEditable,this.isGridEditable||(this.isMassSelectionDisabled=!0),this.angularGrid.slickGrid.setOptions({editable:this.isGridEditable})}removeUnsavedStylingFromCell(e,a,u){this.angularGrid.slickGrid.removeCellCssStyles(`unsaved_highlight_${[a.id]}${u}`)}removeAllUnsavedStylingFromCell(){for(const e of this.editQueue){const a=e?.editCommand;if(a)for(const u of e.columns)this.removeUnsavedStylingFromCell(e.item,u,a.row)}}renderUnsavedStylingOnAllVisibleCells(){for(const e of this.editQueue)if(e){const{item:a,columns:u,editCommand:i}=e;Array.isArray(u)&&u.forEach(r=>{this.renderUnsavedCellStyling(a,r,i)})}}renderUnsavedCellStyling(e,a,u){if(u&&e&&a){const i=this.angularGrid.dataView.getRowByItem(e);if(i>=0){const r={[i]:{[a.id]:"unsaved-editable-field"}};this.angularGrid.slickGrid.setCellCssStyles(`unsaved_highlight_${[a.id]}${i}`,r)}}}setSelectedRowIds(){this.angularGrid.dataView?.setSelectedIds([3,4,11])}saveAll(){console.log(this.editQueue),console.log(this.editedItems),this.removeAllUnsavedStylingFromCell(),this.editQueue=[],this.editedItems={}}undoLastEdit(e=!1){const a=this.editQueue.pop(),u=a?.editCommand;if(a&&u&&td.cancelCurrentEdit()){u.undo();for(const i of a.columns)this.removeUnsavedStylingFromCell(a.item,i,u.row);this.angularGrid.slickGrid.invalidate(),e&&this.angularGrid?.slickGrid.gotoCell(u.row,u.cell,!1)}}undoAllEdits(){for(const e of this.editQueue){const a=e?.editCommand;if(a&&td.cancelCurrentEdit()){a.undo();for(const u of e.columns)this.removeUnsavedStylingFromCell(e.item,u,a.row)}}this.angularGrid.slickGrid.invalidate(),this.editQueue=[]}mockProducts(){return[{id:0,itemName:"Sleek Metal Computer",itemNameTranslated:"some fantastic sleek metal computer description",listPrice:2100.23,itemTypeName:"I",image:"http://i.stack.imgur.com/pC1Tv.jpg",icon:`mdi ${this.getRandomIcon(0)}`},{id:1,itemName:"Tasty Granite Table",itemNameTranslated:"an extremely huge and heavy table",listPrice:3200.12,itemTypeName:"I",image:"https://i.imgur.com/Fnm7j6h.jpg",icon:`mdi ${this.getRandomIcon(1)}`},{id:2,itemName:"Awesome Wooden Mouse",itemNameTranslated:"super old mouse",listPrice:15,itemTypeName:"I",image:"https://i.imgur.com/RaVJuLr.jpg",icon:`mdi ${this.getRandomIcon(2)}`},{id:3,itemName:"Gorgeous Fresh Shirt",itemNameTranslated:"what a gorgeous shirt seriously",listPrice:25.76,itemTypeName:"I",image:"http://i.stack.imgur.com/pC1Tv.jpg",icon:`mdi ${this.getRandomIcon(3)}`},{id:4,itemName:"Refined Cotton Table",itemNameTranslated:"super light table that will fall apart amazingly fast",listPrice:13.35,itemTypeName:"I",image:"https://i.imgur.com/Fnm7j6h.jpg",icon:`mdi ${this.getRandomIcon(4)}`},{id:5,itemName:"Intelligent Wooden Pizza",itemNameTranslated:"wood not included",listPrice:23.33,itemTypeName:"I",image:"https://i.imgur.com/RaVJuLr.jpg",icon:`mdi ${this.getRandomIcon(5)}`},{id:6,itemName:"Licensed Cotton Chips",itemNameTranslated:"not sure what that is",listPrice:71.21,itemTypeName:"I",image:"http://i.stack.imgur.com/pC1Tv.jpg",icon:`mdi ${this.getRandomIcon(6)}`},{id:7,itemName:"Ergonomic Rubber Soap",itemNameTranslated:"so good you'll want to use it every night",listPrice:2.43,itemTypeName:"I",image:"https://i.imgur.com/Fnm7j6h.jpg",icon:`mdi ${this.getRandomIcon(7)}`},{id:8,itemName:"Handcrafted Steel Car",itemNameTranslated:"aka tesla truck",listPrice:31288.39,itemTypeName:"I",image:"https://i.imgur.com/RaVJuLr.jpg",icon:`mdi ${this.getRandomIcon(8)}`}]}getRandomIcon(e){const a=["mdi-arrow-collapse","mdi-arrow-expand","mdi-cancel","mdi-check","mdi-checkbox-blank-outline","mdi-check-box-outline","mdi-checkbox-marked","mdi-close","mdi-close-circle","mdi-close-circle-outline","mdi-close-thick","mdi-content-copy","mdi-database-refresh","mdi-download","mdi-file-document-outline","mdi-file-excel-outline","mdi-file-music-outline","mdi-file-pdf-outline","mdi-filter-remove-outline","mdi-flip-vertical","mdi-folder","mdi-folder-open","mdi-help-circle","mdi-help-circle-outline","mdi-history","mdi-information","mdi-information-outline","mdi-link","mdi-link-variant","mdi-menu","mdi-microsoft-excel","mdi-minus","mdi-page-first","mdi-page-last","mdi-paperclip","mdi-pin-off-outline","mdi-pin-outline","mdi-playlist-plus","mdi-playlist-remove","mdi-plus","mdi-redo","mdi-refresh","mdi-shape-square-plus","mdi-sort-ascending","mdi-sort-descending","mdi-swap-horizontal","mdi-swap-vertical","mdi-sync","mdi-table-edit","mdi-table-refresh","mdi-undo"],u=Math.floor(Math.random()*a.length-1);return a[e??u]}renderItemCallbackWith2Rows(e){return`
\n
\n \x3c!----\x3e\n \n
\n
\n \n \n ${e.itemName}\n \n
\n
\n
\n
${e.itemNameTranslated}
\n
`}renderItemCallbackWith4Corners(e){return`
\n
\n \x3c!----\x3e\n \n
\n
\n \n \n ${e.itemName}\n \n ${Pu(e.listPrice,2,2,!1,"$")}\n
\n
\n
\n
${e.itemNameTranslated}
\n Type: ${"I"===e.itemTypeName?"Item":"C"===e.itemTypeName?"PdCat":"Cat"}\n
`}static#e=this.ctorParameters=()=>[{type:jt}]};M9=$e([ca({template:'
\n

\n {{title}}\n \n \n code\n \n \n

\n
\n\n

Container Width (950px)

\n\n
\n
\n
\n \n \n
\n
\n\n
\n
\n \n \n \n \n
\n
\n
\n\n
\n \n \n
\n
',encapsulation:ja.None,styles:[Dge()]}),Ct("design:paramtypes",[jt])],M9);var wge=O(569),Bge=O.n(wge),Sge=O(593),zge=O.n(Sge);let L9=class{alertAssignee(e){alert("string"==typeof e?`Assignee on this task is: ${e.toUpperCase()}`:"No one is assigned to this task.")}deleteRow(e){confirm(`Are you sure that you want to delete ${e.title}?`)&&(this.addon.collapseAll(),this.dataView.deleteItem(e.rowId),this.parent.showFlashMessage(`Deleted row with ${e.title}`,"danger"))}callParentMethod(e){this.parent.showFlashMessage(`We just called Parent Method from the Row Detail Child Component on ${e.title}`)}};L9=$e([ca({template:'
\n

{{model?.title}}

\n
\n
\n
{{model?.reporter}}
\n
{{model?.duration | number : \'1.2-2\'}}
\n
{{model?.percentComplete}}
\n
\n\n
\n
{{model?.start | date: \'yyyy-MM-dd\'}}
\n
{{model?.finish | date: \'yyyy-MM-dd\'}}
\n
\n
\n\n
\n\n
\n

\n Find out who is the Assignee\n \n \n \n

\n
\n
\n \n \n
\n
\n',styles:[Bge(),zge()]})],L9);let T9=class{};T9=$e([ca({template:'

\n \n Loading...\n

'})],T9);let P9=class{constructor(){this._darkMode=!1,this.title="Example 21: Row Detail View",this.subTitle='\n Add functionality to show extra information with a Row Detail View, (Wiki docs)\n
    \n
  • Click on the row "+" icon or anywhere on the row to open it (the latter can be changed via property "useRowClick: false")
  • \n
  • Pass a View/Model as a Template to the Row Detail
  • \n
  • You can use "expandableOverride()" callback to override logic to display expand icon on every row (for example only show it every 2nd row)
  • \n
\n ',this.columnDefinitions=[],this.dataset=[],this.detailViewRowCount=9,this.flashAlertType="info",this.message=""}angularGridReady(e){this.angularGrid=e}get rowDetailInstance(){return this.angularGrid.extensions.rowDetailView?.instance||{}}ngOnInit(){this.defineGrid()}ngOnDestroy(){document.querySelector(".panel-wm-content").classList.remove("dark-mode"),document.querySelector("#demo-container").dataset.bsTheme="light"}defineGrid(){this.columnDefinitions=[{id:"title",name:"Title",field:"title",sortable:!0,type:w.string,width:70,filterable:!0,editor:{model:Ye.text}},{id:"duration",name:"Duration (days)",field:"duration",formatter:j.decimal,params:{minDecimal:1,maxDecimal:2},sortable:!0,type:w.number,minWidth:90,filterable:!0},{id:"percent2",name:"% Complete",field:"percentComplete2",editor:{model:Ye.slider},formatter:j.progressBar,type:w.number,sortable:!0,minWidth:100,filterable:!0,filter:{model:ie.slider,operator:">"}},{id:"start",name:"Start",field:"start",formatter:j.dateIso,sortable:!0,type:w.date,minWidth:90,exportWithFormatter:!0,filterable:!0,filter:{model:ie.compoundDate}},{id:"finish",name:"Finish",field:"finish",formatter:j.dateIso,sortable:!0,type:w.date,minWidth:90,exportWithFormatter:!0,filterable:!0,filter:{model:ie.compoundDate}},{id:"effort-driven",name:"Effort Driven",field:"effortDriven",minWidth:100,formatter:j.checkmarkMaterial,type:w.boolean,filterable:!0,sortable:!0,filter:{collection:[{value:"",label:""},{value:!0,label:"True"},{value:!1,label:"False"}],model:ie.singleSelect}}],this.gridOptions={autoResize:{container:"#demo-container",rightPadding:10},enableFiltering:!0,enableRowDetailView:!0,darkMode:this._darkMode,datasetIdPropertyName:"rowId",rowDetailView:{process:e=>this.simulateServerAsyncCall(e),loadOnce:!0,singleRowExpand:!1,useRowClick:!0,panelRows:this.detailViewRowCount,preloadComponent:T9,viewComponent:L9,parent:this,onBeforeRowDetailToggle:(e,a)=>(console.log("before toggling row detail",a.item),!0)},rowSelectionOptions:{selectActiveRow:!0}},this.getData()}getData(){const e=[];for(let a=0;a<1e3;a++){const u=2e3+Math.floor(10*Math.random()),i=Math.floor(11*Math.random()),r=Math.floor(29*Math.random()),o=Math.round(100*Math.random());e[a]={rowId:a,title:"Task "+a,duration:a%33==0?null:100*Math.random()+"",percentComplete:o,percentComplete2:o,percentCompleteNumber:o,start:new Date(u,i,r),finish:new Date(u,i+1,r),effortDriven:a%5==0}}this.dataset=e}changeDetailViewRowCount(){if(this.angularGrid?.extensionService){const e=this.rowDetailInstance.getOptions();e?.panelRows&&(e.panelRows=this.detailViewRowCount,this.rowDetailInstance.setOptions(e))}}changeEditableGrid(){return this.rowDetailInstance.collapseAll(),this.rowDetailInstance.addonOptions.useRowClick=!1,this.gridOptions.autoCommitEdit=!this.gridOptions.autoCommitEdit,this.angularGrid?.slickGrid.setOptions({editable:!0,autoEdit:!0,enableCellNavigation:!0}),!0}closeAllRowDetail(){this.angularGrid&&this.angularGrid.extensionService&&this.rowDetailInstance.collapseAll()}showFlashMessage(e,a="info"){this.message=e,this.flashAlertType=a}simulateServerAsyncCall(e){const a=["John Doe","Jane Doe","Chuck Norris","Bumblebee","Jackie Chan","Elvis Presley","Bob Marley","Mohammed Ali","Bruce Lee","Rocky Balboa"];return new Promise(u=>{setTimeout(()=>{const i=e;i.assignee=a[this.randomNumber(0,10)],i.reporter=a[this.randomNumber(0,10)],u(i)},1e3)})}toggleDarkMode(){this._darkMode=!this._darkMode,this.toggleBodyBackground(),this.angularGrid.slickGrid?.setOptions({darkMode:this._darkMode}),this.closeAllRowDetail()}toggleBodyBackground(){this._darkMode?(document.querySelector(".panel-wm-content").classList.add("dark-mode"),document.querySelector("#demo-container").dataset.bsTheme="dark"):(document.querySelector(".panel-wm-content").classList.remove("dark-mode"),document.querySelector("#demo-container").dataset.bsTheme="light")}randomNumber(e,a){return Math.floor(Math.random()*(a-e+1)+e)}};P9=$e([ca({template:'
\n

\n {{title}}\n \n \n \n code\n \n \n

\n
\n\n
\n
\n \n \n   \n\n \n \n \n \n \n
\n
\n {{message}}\n
\n
\n\n
\n\n \n \n
'})],P9);let N9=class{constructor(){this.title="Example 17: Row Move & Checkbox Selector",this.subTitle='This example demonstrates using the Slick.Plugins.RowMoveManager plugin to easily move a row in the grid.
\n
    \n
  • Click to select, Ctrl+Click to toggle selection, Shift+Click to select a range.
  • \n
  • Drag one or more rows by the handle (icon) to reorder
  • \n
  • If you plan to use Row Selection + Row Move, then use "singleRowMove: true" and "disableRowSelection: true"
  • \n
  • You can change "columnIndexPosition" to move the icon position of any extension (RowMove, RowDetail or RowSelector icon)
  • \n
      \n
    • You will also want to enable the DataView "syncGridSelection: true" to keep row selection even after a row move
    • \n
    \n
  • If you plan to use only Row Move, then you could keep default values (or omit them completely) of "singleRowMove: false" and "disableRowSelection: false"
  • \n
      \n
    • SingleRowMove has the name suggest will only move 1 row at a time, by default it will move any row(s) that are selected unless you disable the flag
    • \n
    \n
\n '}angularGridReady(e){this.angularGrid=e}get rowMoveInstance(){return this.angularGrid?.extensionService?.getExtensionInstanceByName(Ea.rowMoveManager)??{}}ngOnInit(){this.columnDefinitions=[{id:"title",name:"Title",field:"title",filterable:!0},{id:"duration",name:"Duration",field:"duration",filterable:!0,sortable:!0},{id:"%",name:"% Complete",field:"percentComplete",filterable:!0,sortable:!0},{id:"start",name:"Start",field:"start",filterable:!0,sortable:!0,filter:{model:ie.compoundDate}},{id:"finish",name:"Finish",field:"finish",filterable:!0,sortable:!0,filter:{model:ie.compoundDate}},{id:"effort-driven",name:"Completed",field:"effortDriven",formatter:j.checkmarkMaterial,filterable:!0,sortable:!0,filter:{collection:[{value:"",label:""},{value:!0,label:"True"},{value:!1,label:"False"}],model:ie.singleSelect}}],this.gridOptions={enableAutoResize:!0,autoResize:{container:"#demo-container",rightPadding:10},enableCellNavigation:!0,enableFiltering:!0,enableCheckboxSelector:!0,checkboxSelector:{columnIndexPosition:1,hideInFilterHeaderRow:!1,hideInColumnTitleRow:!0},enableRowSelection:!0,rowSelectionOptions:{selectActiveRow:!1},dataView:{syncGridSelection:!0},enableRowMoveManager:!0,rowMoveManager:{singleRowMove:!0,disableRowSelection:!0,cancelEditOnDrag:!0,hideRowMoveShadow:!1,width:30,onBeforeMoveRows:this.onBeforeMoveRow.bind(this),onMoveRows:this.onMoveRows.bind(this),columnIndexPosition:0},showCustomFooter:!0,presets:{rowSelection:{dataContextIds:[1,2,6,7]}}},this.getData()}getData(){const e=[];for(let a=0;a<500;a++)e[a]={id:a,title:"Task "+a,duration:Math.round(25*Math.random())+" days",percentComplete:Math.round(100*Math.random()),start:"01/01/2009",finish:"01/05/2009",effortDriven:a%5==0};this.dataset=e}onBeforeMoveRow(e,a){for(const u of a.rows)if(u===a.insertBefore||u===a.insertBefore-1&&a.insertBefore-1!==this.angularGrid.dataView.getItemCount())return e.stopPropagation(),!1;return!0}onMoveRows(e,a){const u=a.rows,i=a.insertBefore,r=[];this.angularGrid.dataView.sort(void 0,!0);const o=this.angularGrid.dataView.getItems(),d=this.angularGrid.dataView.getFilteredItems(),h=this.angularGrid.dataView.getItem(i),m=h?this.angularGrid.dataView.getIdxById(h.id):this.angularGrid.dataView.getItemCount(),g=[];u.forEach(C=>g.push(d[C]));const v=g.map(C=>this.angularGrid.dataView.getIdxById(C.id)),k=o.slice(0,m),x=o.slice(m,o.length);u.sort((C,F)=>C-F);for(const C of v)void 0!==C&&r.push(o[C]);v.reverse();for(const C of v)void 0!==C&&void 0!==m&&(C{alert(`Technically we should Edit "Task ${u.dataContext.id}"`)}},{id:"delete-symbol",field:"id",excludeFromColumnPicker:!0,excludeFromGridMenu:!0,excludeFromHeaderMenu:!0,formatter:j.icon,params:{iconCssClass:"mdi mdi-trash-can pointer"},minWidth:30,maxWidth:30,onCellClick:(a,u)=>{confirm("Are you sure?")&&this.angularGrid.gridService.deleteItemById(u.dataContext.id)}}];this.columnDefinitions.splice(0,0,e[0],e[1]),this.columnDefinitions=this.columnDefinitions.slice()}}toggleFilter(){this.angularGrid.filterService.toggleFilterFunctionality()}toggleSorting(){this.angularGrid.sortService.toggleSortFunctionality()}};N9=$e([ca({template:'
\n

\n {{title}}\n \n \n code\n \n \n

\n
\n\n
\n
\n \n \n \n \n \n \n
\n
\n
\n
\n \n \n
\n
\n
'})],N9);var Nge=O(18),Ige=O.n(Nge),Rge=O(322),Hge=O.n(Rge);let I9=class{constructor(e){this.cd=e,this.title="Example 10: Multiple Grids with Row Selection",this.subTitle='\n Row selection, single or multi-select (Wiki docs).\n
    \n
  • Single Select, you can click on any cell to make the row active
  • \n
  • Multiple Selections, you need to specifically click on the checkbox to make 1 or more selections
  • \n
  • You can use "selectableOverride()" callback to override logic to display checkbox on every row (for example only show it every 2nd row)
  • \n
  • NOTE: Any Row Selection(s) will be reset when using Pagination and changing Page (you will need to set it back manually if you want it back)
  • \n
\n ',this.isGrid2WithPagination=!0,this.selectedTitles="",this.selectedTitle=""}ngOnInit(){this.prepareGrid()}angularGridReady1(e){this.angularGrid1=e,this.gridObj1=e&&e.slickGrid||{}}angularGridReady2(e){this.angularGrid2=e,this.gridObj2=e&&e.slickGrid||{}}prepareGrid(){this.columnDefinitions1=[{id:"title",name:"Title",field:"title",sortable:!0,type:w.string,filterable:!0},{id:"duration",name:"Duration (days)",field:"duration",sortable:!0,type:w.number,filterable:!0},{id:"complete",name:"% Complete",field:"percentComplete",formatter:j.percentCompleteBar,type:w.number,filterable:!0,sortable:!0},{id:"start",name:"Start",field:"start",formatter:j.dateIso,exportWithFormatter:!0,type:w.date,filterable:!0,sortable:!0,filter:{model:ie.compoundDate}},{id:"finish",name:"Finish",field:"finish",formatter:j.dateIso,exportWithFormatter:!0,type:w.date,filterable:!0,sortable:!0,filter:{model:ie.compoundDate}},{id:"effort-driven",name:"Effort Driven",field:"effortDriven",formatter:j.checkmarkMaterial,type:w.boolean,sortable:!0,filterable:!0,filter:{collection:[{value:"",label:""},{value:!0,label:"true"},{value:!1,label:"false"}],model:ie.singleSelect}}],this.columnDefinitions2=[{id:"title",name:"Title",field:"title",sortable:!0,type:w.string,filterable:!0},{id:"duration",name:"Duration (days)",field:"duration",sortable:!0,type:w.number,filterable:!0},{id:"complete",name:"% Complete",field:"percentComplete",formatter:j.percentCompleteBar,type:w.number,filterable:!0,sortable:!0},{id:"start",name:"Start",field:"start",formatter:j.dateIso,exportWithFormatter:!0,type:w.date,filterable:!0,sortable:!0,filter:{model:ie.compoundDate}},{id:"finish",name:"Finish",field:"finish",formatter:j.dateIso,exportWithFormatter:!0,type:w.date,filterable:!0,sortable:!0,filter:{model:ie.compoundDate}},{id:"effort-driven",name:"Effort Driven",field:"effortDriven",formatter:j.checkmarkMaterial,type:w.boolean,sortable:!0,filterable:!0,filter:{collection:[{value:"",label:""},{value:!0,label:"true"},{value:!1,label:"false"}],model:ie.singleSelect}}],this.gridOptions1={gridHeight:225,gridWidth:800,enableAutoResize:!1,enableCellNavigation:!0,enableRowSelection:!0,enableCheckboxSelector:!0,enableFiltering:!0,checkboxSelector:{hideSelectAllCheckbox:!0},multiSelect:!1,rowSelectionOptions:{selectActiveRow:!0},columnPicker:{hideForceFitButton:!0},gridMenu:{hideForceFitButton:!0},enablePagination:!0,pagination:{pageSizes:[5,10,15,20,25,50,75,100],pageSize:5},presets:{pagination:{pageNumber:2,pageSize:5}}},this.gridOptions2={gridHeight:255,gridWidth:800,enableAutoResize:!1,enableCellNavigation:!0,enableFiltering:!0,checkboxSelector:{hideInFilterHeaderRow:!1,hideInColumnTitleRow:!0,applySelectOnAllPages:!0},rowSelectionOptions:{selectActiveRow:!1},enableCheckboxSelector:!0,enableRowSelection:!0,enablePagination:!0,pagination:{pageSizes:[5,10,15,20,25,50,75,100],pageSize:5},presets:{rowSelection:{dataContextIds:[3,12,13,522]}}},this.dataset1=this.prepareData(495),this.dataset2=this.prepareData(525)}prepareData(e){const a=[];for(let u=0;ua-u),this.selectedTitles=this.selectedGrid2IDs.map(a=>`Task ${a}`).join(","),this.selectedTitles.length>293&&(this.selectedTitles=this.selectedTitles.substring(0,293)+"..."),this.cd.detectChanges())}togglePaginationGrid2(){this.isGrid2WithPagination=!this.isGrid2WithPagination,this.angularGrid2.paginationService.togglePaginationVisibility(this.isGrid2WithPagination)}handleSelectedRowsChanged1(e,a){Array.isArray(a.rows)&&this.gridObj1&&(this.selectedTitle=a.rows.map(u=>this.gridObj1.getDataItem(u).title||""))}static#e=this.ctorParameters=()=>[{type:ei}]};I9=$e([ca({template:'
\n

\n {{title}}\n \n \n code\n \n \n

\n
\n\n
\n
\n Pagination\n
\n \n \n
\n
\n
\n
\n (single select) Selected Row:\n \n
\n
\n
\n\n
\n \n \n
\n\n
\n\n
\n
\n Pagination: \n \n
\n \n \n
\n
\n
\n
\n
\n (multi-select) Selected Row(s):\n \n
\n
\n
\n\n
\n \n \n
\n
',styles:[Ige(),Hge()]}),Ct("design:paramtypes",[ei])],I9);function Rp(t,e){return Math.floor(Math.random()*(e-t+1)+t)}const R9="gridState";let H9=class{constructor(e){this.translate=e,this.title="Example 16: Grid State & Presets using Local Storage",this.subTitle='\n Grid State & Preset (Wiki docs)\n
\n
    \n
  • Uses Local Storage to persist the Grid State and uses Grid Options "presets" to put the grid back to it\'s previous state
  • \n
      \n
    • to demo this, simply change any columns (position reorder, visibility, size, filter, sort), then refresh your browser with (F5)
    • \n
    \n
  • Local Storage is just one option, you can use whichever is more convenient for you (Local Storage, Session Storage, DB, ...)
  • \n
\n ',this.subscriptions=[],this.selectedLanguage=this.translate.getDefaultLang()}angularGridReady(e){this.angularGrid=e}ngOnDestroy(){rd(this.subscriptions)}ngOnInit(){const e=JSON.parse(localStorage[R9]||null);this.defineGrid(e);this.translate.use("en"),this.selectedLanguage="en"}clearGridStateFromLocalStorage(){this.angularGrid.gridService.resetGrid(this.columnDefinitions),this.angularGrid.paginationService.changeItemPerPage(25),setTimeout(()=>localStorage[R9]=null)}defineGrid(e){const a=[];for(let u=0;u<500;u++)a.push({value:u,label:u});this.columnDefinitions=[{id:"title",name:"Title",field:"title",nameKey:"TITLE",filterable:!0,sortable:!0,type:w.string,minWidth:45,width:100,filter:{model:ie.compoundInput}},{id:"description",name:"Description",field:"description",filterable:!0,sortable:!0,minWidth:80,width:100,type:w.string,filter:{model:ie.input,filterShortcuts:[{titleKey:"BLANK_VALUES",searchTerms:["< A"],iconCssClass:"mdi mdi-filter-minus-outline"},{titleKey:"NON_BLANK_VALUES",searchTerms:["> A"],iconCssClass:"mdi mdi-filter-plus-outline"}]}},{id:"duration",name:"Duration (days)",field:"duration",sortable:!0,type:w.number,exportCsvForceToKeepAsString:!0,minWidth:55,width:100,nameKey:"DURATION",filterable:!0,filter:{collection:a,model:ie.multipleSelect,filterOptions:{maxHeight:250,width:175}}},{id:"complete",name:"% Complete",field:"percentComplete",nameKey:"PERCENT_COMPLETE",minWidth:70,type:w.number,sortable:!0,width:100,formatter:j.percentCompleteBar,filterable:!0,filter:{model:ie.slider,operator:">"}},{id:"start",name:"Start",field:"start",nameKey:"START",formatter:j.dateIso,sortable:!0,minWidth:75,exportWithFormatter:!0,width:100,type:w.date,filterable:!0,filter:{model:ie.compoundDate,filterShortcuts:[{titleKey:"PAST",searchTerms:[Ii(new Date,"YYYY-MM-DD")],operator:"<",iconCssClass:"mdi mdi-calendar"},{titleKey:"FUTURE",searchTerms:[Ii(new Date,"YYYY-MM-DD")],operator:">",iconCssClass:"mdi mdi-calendar-clock"}]}},{id:"completed",field:"completed",nameKey:"COMPLETED",minWidth:85,maxWidth:85,formatter:j.checkmarkMaterial,width:100,type:w.boolean,sortable:!0,filterable:!0,filter:{collection:[{value:"",label:""},{value:!0,label:"True"},{value:!1,label:"False"}],model:ie.singleSelect,filterOptions:{autoAdjustDropHeight:!0}}}],this.gridOptions={autoResize:{container:"#demo-container",rightPadding:10},enableCheckboxSelector:!0,enableFiltering:!0,enableTranslate:!0,i18n:this.translate,columnPicker:{hideForceFitButton:!0},gridMenu:{hideForceFitButton:!0,hideClearFrozenColumnsCommand:!1},headerMenu:{hideFreezeColumnsCommand:!1},enablePagination:!0,pagination:{pageSizes:[5,10,15,20,25,30,40,50,75,100],pageSize:25}},e&&(this.gridOptions.presets=e),this.dataset=this.getData(500)}getData(e){const a=(new Date).getFullYear(),u=[];for(let i=0;i